`ac' files.
Adjust all the Autoconf code to use `m4_define', not `define'.
+2000-11-03 Akim Demaille <akim@epita.fr>
+
+ * autoconf.m4 (define): Reestablish only after having read the
+ `ac' files.
+ Adjust all the Autoconf code to use `m4_define', not `define'.
+
2000-11-03 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (AU_ALIAS): Don't forget to pass the arguments to
2000-11-03 Akim Demaille <akim@epita.fr>
* autoconf.m4: Instead of reactivating the macros before reading
- Autoconf's file, do it afterwards, so that Autoconf promotes the
+ Autoconf's files, do it afterwards, so that Autoconf promotes the
right use, but users still can use the old names.
Of course this revealed numerous non updated uses of old macros in
Autoconf's files. Adjust them.
# Set up the LIBOBJ replacement of `alloca'. Well, not exactly
# AC_LIBOBJ since we actually set the output variable `ALLOCA'.
# Nevertheless, for Automake, AC_LIBOBJ_DECL it.
-define([_AC_LIBOBJ_ALLOCA],
+m4_define([_AC_LIBOBJ_ALLOCA],
[# The SVR3 libPW and SVR4 libucb both contain incompatible functions
# that cause trouble. Some versions do not even contain alloca or
# contain a buggy version. If you still want to use their alloca,
# _AC_LIBOBJ_GETLOADAVG
# ---------------------
# Set up the AC_LIBOBJ replacement of `getloadavg'.
-define([_AC_LIBOBJ_GETLOADAVG],
+m4_define([_AC_LIBOBJ_GETLOADAVG],
[AC_LIBOBJ(getloadavg)
AC_DEFINE(C_GETLOADAVG, 1, [Define if using `getloadavg.c'.])
# Figure out what our getloadavg.c needs.
# If it does, then define HAVE_STAT_EMPTY_STRING_BUG (or
# HAVE_LSTAT_EMPTY_STRING_BUG) and arrange to compile the wrapper
# function.
-define([_AC_FUNC_STAT],
+m4_define([_AC_FUNC_STAT],
[AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])dnl
AC_CACHE_CHECK([whether $1 accepts an empty string],
[ac_cv_func_$1_empty_string_bug],
# _AC_LIBOBJ_STRTOD
# -----------------
-define([_AC_LIBOBJ_STRTOD],
+m4_define([_AC_LIBOBJ_STRTOD],
[AC_LIBOBJ(strtod)
AC_CHECK_FUNC(pow)
if test $ac_cv_func_pow = no; then
# DIVERSION-NAME which is supposed to be an actual diversion number.
# Of course it would be nicer to use m4_case here, instead of zillions
# of little macros, but it then takes twice longer to run `autoconf'!
-define([_m4_divert(KILL)], -1)
+m4_define([_m4_divert(KILL)], -1)
-define([_m4_divert(BINSH)], 0)
-define([_m4_divert(REVISION)], 1)
-define([_m4_divert(NOTICE)], 2)
-define([_m4_divert(DEFAULTS)], 3)
-define([_m4_divert(PARSE_ARGS)], 4)
+m4_define([_m4_divert(BINSH)], 0)
+m4_define([_m4_divert(REVISION)], 1)
+m4_define([_m4_divert(NOTICE)], 2)
+m4_define([_m4_divert(DEFAULTS)], 3)
+m4_define([_m4_divert(PARSE_ARGS)], 4)
-define([_m4_divert(HELP_BEGIN)], 10)
-define([_m4_divert(HELP_CANON)], 11)
-define([_m4_divert(HELP_ENABLE)], 12)
-define([_m4_divert(HELP_WITH)], 13)
-define([_m4_divert(HELP_VAR)], 14)
-define([_m4_divert(HELP_VAR_END)], 15)
-define([_m4_divert(HELP_END)], 16)
+m4_define([_m4_divert(HELP_BEGIN)], 10)
+m4_define([_m4_divert(HELP_CANON)], 11)
+m4_define([_m4_divert(HELP_ENABLE)], 12)
+m4_define([_m4_divert(HELP_WITH)], 13)
+m4_define([_m4_divert(HELP_VAR)], 14)
+m4_define([_m4_divert(HELP_VAR_END)], 15)
+m4_define([_m4_divert(HELP_END)], 16)
-define([_m4_divert(VERSION_BEGIN)], 20)
-define([_m4_divert(VERSION_END)], 21)
+m4_define([_m4_divert(VERSION_BEGIN)], 20)
+m4_define([_m4_divert(VERSION_END)], 21)
-define([_m4_divert(INIT_PREPARE)], 30)
+m4_define([_m4_divert(INIT_PREPARE)], 30)
-define([_m4_divert(BODY)], 40)
+m4_define([_m4_divert(BODY)], 40)
-define([_m4_divert(PREPARE)], 100)
+m4_define([_m4_divert(PREPARE)], 100)
# ---------------------------------------
# Output once CONTENT into DIVERSION-NAME (which may be a number
# actually). An end of line is appended for free to CONTENT.
-define([AC_DIVERT_ONCE],
+m4_define([AC_DIVERT_ONCE],
[AC_EXPAND_ONCE([m4_divert([$1], [$2])])])
# AC_DIVERT_PUSH(DIVERSION-NAME)
# ------------------------------
-define([AC_DIVERT_PUSH],
+m4_define([AC_DIVERT_PUSH],
[m4_divert_push($@)])
# AC_DIVERT_POP
# -------------
-define([AC_DIVERT_POP],
+m4_define([AC_DIVERT_POP],
[m4_divert_pop($@)])
# Initialize the diversion setup.
-define([_m4_divert_diversion], _m4_divert([BODY]))
+m4_define([_m4_divert_diversion], _m4_divert([BODY]))
# Throw away output until AC_INIT is called.
m4_pushdef([_m4_divert_diversion], _m4_divert([KILL]))
# macros. We don't use this macro to define some frequently called
# macros that are not involved in ordering constraints, to save m4
# processing.
-define([AC_DEFUN],
+m4_define([AC_DEFUN],
[m4_defun([$1], [$2[]AC_PROVIDE([$1])])])
# ------------------------------
# As AC_DEFUN, but issues the EXPANSION only once, and warns if used
# several times.
-define([AC_DEFUN_ONCE],
+m4_define([AC_DEFUN_ONCE],
[m4_defun_once([$1], [$2[]AC_PROVIDE([$1])])])
# AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION])
# ------------------------------------------
-define([AC_OBSOLETE],
+m4_define([AC_OBSOLETE],
[AC_DIAGNOSE([obsolete], [$1 is obsolete$2])])
# AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
# ---------------------------------------------
-define([AC_BEFORE],
+m4_define([AC_BEFORE],
[AC_PROVIDE_IFELSE([$2], [AC_DIAGNOSE([syntax], [$2 was called before $1])])])
# such as `C' should dispatch the call to `AC_LANG_COMPILER(C)'. But this
# `extension' prevents `AC_LANG_COMPILER' from having actual arguments that
# it passes to `AC_LANG_COMPILER(C)'.
-define([_AC_REQUIRE],
+m4_define([_AC_REQUIRE],
[_m4_require($@)])
# AC_REQUIRE(STRING)
# ------------------
# If STRING has never been AC_PROVIDE'd, then expand it.
-define([AC_REQUIRE],
+m4_define([AC_REQUIRE],
[m4_require($@)])
# AC_EXPAND_ONCE(TEXT)
# --------------------
# If TEXT has never been expanded, expand it *here*.
-define([AC_EXPAND_ONCE],
+m4_define([AC_EXPAND_ONCE],
[m4_expand_once([$1],
[],
[AC_PROVIDE([$1])[]$1])])
# ----------------------
# Ideally we should use `AC_PROVIDE($1)', but unfortunately many third
# party macros know that we use `AC_PROVIDE_$1' and they depend on it.
-define([AC_PROVIDE],
-[define([AC_PROVIDE_$1])])
+m4_define([AC_PROVIDE],
+[m4_define([AC_PROVIDE_$1])])
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
# 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],
+m4_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],
+m4_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],
+m4_define([AU_DEFUN],
[AU_DEFINE([$1],
[AC_DIAGNOSE([obsolete], [The macro `$1' is obsolete.
You should run autoupdate.])dnl
#
# Do not use `defn' since then autoupdate would replace an old macro
# call with the new macro body instead of the new macro call.
-define([AU_ALIAS],
+m4_define([AU_ALIAS],
[AU_DEFUN([$1], [$2($][@)])])
# --------------------
# Pass TEXT to autoheader.
# This macro is `read' only via `autoconf --trace', it outputs nothing.
-define([AH_OUTPUT], [])
+m4_define([AH_OUTPUT], [])
# AH_VERBATIM(KEY, TEMPLATE)
# may occur if there is AC_CHECK_FUNCS($my_func)), issue an autoheader
# TEMPLATE associated to the KEY. Otherwise, do nothing. TEMPLATE is
# output as is, with no formating.
-define([AH_VERBATIM],
+m4_define([AH_VERBATIM],
[AC_VAR_INDIR_IFELSE([$1],,
[AH_OUTPUT([$1], _AC_SH_QUOTE([[$2]]))])
])
# -----------------------------
# Issue an autoheader template for KEY, i.e., a comment composed of
# DESCRIPTION (properly wrapped), and then #undef KEY.
-define([AH_TEMPLATE],
+m4_define([AH_TEMPLATE],
[AH_VERBATIM([$1],
m4_text_wrap([$2 */], [ ], [/* ])[
#undef $1])])
# AH_TOP(TEXT)
# ------------
# Output TEXT at the top of `config.h.in'.
-define([AH_TOP],
-[define([_AH_COUNTER], m4_incr(_AH_COUNTER))dnl
+m4_define([AH_TOP],
+[m4_define([_AH_COUNTER], m4_incr(_AH_COUNTER))dnl
AH_VERBATIM([0000]_AH_COUNTER, [$1])])
# AH_BOTTOM(TEXT)
# ---------------
# Output TEXT at the bottom of `config.h.in'.
-define([AH_BOTTOM],
-[define([_AH_COUNTER], m4_incr(_AH_COUNTER))dnl
+m4_define([AH_BOTTOM],
+[m4_define([_AH_COUNTER], m4_incr(_AH_COUNTER))dnl
AH_VERBATIM([zzzz]_AH_COUNTER, [$1])])
# Initialize.
-define([_AH_COUNTER], [0])
+m4_define([_AH_COUNTER], [0])
# -------------------------------------------------------
# If EXPRESSION has shell indirections ($var or `expr`), expand
# IF-INDIR, else IF-NOT-INDIR.
-define([AC_VAR_INDIR_IFELSE],
+m4_define([AC_VAR_INDIR_IFELSE],
[ifelse(m4_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],
+m4_define([AC_VAR_SET],
[AC_VAR_INDIR_IFELSE([$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],
+m4_define([AC_VAR_GET],
[AC_VAR_INDIR_IFELSE([$1],
[`eval echo '${'m4_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],
+m4_define([AC_VAR_TEST_SET],
[AC_VAR_INDIR_IFELSE([$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_SET_IFELSE],
+m4_define([AC_VAR_SET_IFELSE],
[AS_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],
+m4_define([AC_VAR_PUSHDEF],
[AC_VAR_INDIR_IFELSE([$2],
[ac_$1=AC_TR_SH($2)
m4_pushdef([$1], [$ac_[$1]])],
# AC_VAR_POPDEF(VARNAME)
# ----------------------
# Free the shell variable accessor VARNAME. To be dnl'ed.
-define([AC_VAR_POPDEF],
+m4_define([AC_VAR_POPDEF],
[m4_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],
+m4_define([AC_TR_CPP],
[AC_VAR_INDIR_IFELSE([$1],
[`echo "$1" | $ac_tr_cpp`],
[m4_patsubst(m4_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],
+m4_define([AC_TR_SH],
[AC_VAR_INDIR_IFELSE([$1],
[`echo "$1" | $ac_tr_sh`],
[m4_patsubst(m4_translit([[$1]], [*+], [pp]),
# b act\
# ive ], [-Var-])end
# => -active--b--active-end
-define([AC_FOREACH],
+m4_define([AC_FOREACH],
[m4_foreach([$1], m4_split(m4_strip(m4_join([$2]))), [$3])])
# | column 2 |
# column 0 column 26
#
-define([AC_HELP_STRING],
+m4_define([AC_HELP_STRING],
[m4_pushdef([AC_Prefix], m4_default([$3], [ ]))dnl
m4_pushdef([AC_Prefix_Format],
[ %-]m4_eval(m4_len(AC_Prefix) - 3)[s ])dnl [ %-23s ]
# _AC_INIT_PACKAGE(PACKAGE, VERSION, [BUG-REPORT])
# ------------------------------------------------
-define([_AC_INIT_PACKAGE],
-[define([AC_PACKAGE_NAME], [$1])dnl
-define([AC_PACKAGE_VERSION], [$2])dnl
-define([AC_PACKAGE_STRING], [$1 $2])dnl
-define([AC_PACKAGE_BUGREPORT], [$3])dnl
+m4_define([_AC_INIT_PACKAGE],
+[m4_define([AC_PACKAGE_NAME], [$1])dnl
+m4_define([AC_PACKAGE_VERSION], [$2])dnl
+m4_define([AC_PACKAGE_STRING], [$1 $2])dnl
+m4_define([AC_PACKAGE_BUGREPORT], [$3])dnl
])
# would have be to use m4_quote to force an evaluation:
#
# m4_patsubst(m4_quote($1), [^], [# ])
-define([AC_COPYRIGHT],
+m4_define([AC_COPYRIGHT],
[m4_divert([NOTICE],
[m4_patsubst([
$1], [^], [@%:@ ])])dnl
# --------------------------
# The second quote in the translit is just to cope with font-lock-mode
# which sees the opening of a string.
-define([AC_REVISION],
+m4_define([AC_REVISION],
[m4_divert([REVISION],
[@%:@ From configure.in m4_translit([$1], $"").])dnl
])
# AC_PREREQ(VERSION)
# ------------------
# Complain and exit if the Autoconf version is less than VERSION.
-define([AC_PREREQ],
+m4_define([AC_PREREQ],
[ifelse(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1,
[AC_FATAL([Autoconf version $1 or higher is required for this script])])])
# _AC_INIT_NOTICE
# ---------------
-define([_AC_INIT_NOTICE],
+m4_define([_AC_INIT_NOTICE],
[m4_divert([NOTICE],
[@%:@ Guess values for system-dependent variables and create Makefiles.
@%:@ Generated by Autoconf AC_ACVERSION[]dnl
# _AC_INIT_COPYRIGHT
# ------------------
-define([_AC_INIT_COPYRIGHT],
+m4_define([_AC_INIT_COPYRIGHT],
[AC_COPYRIGHT(
[Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000
Free Software Foundation, Inc.
# _AC_INIT_DEFAULTS_ENVIRONMENT
# -----------------------------
# Tune the behavior of the shell.
-define([_AC_INIT_DEFAULTS_ENVIRONMENT],
+m4_define([_AC_INIT_DEFAULTS_ENVIRONMENT],
[# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
# ---------------------
# Set up the file descriptors used by `configure'.
-define([AC_FD_MSG], 6)
-define([AC_FD_LOG], 5)
+m4_define([AC_FD_MSG], 6)
+m4_define([AC_FD_LOG], 5)
# That's how it used to be named.
AU_ALIAS([AC_FD_CC], [AC_FD_LOG])
-define([_AC_INIT_DEFAULTS_FDS],
+m4_define([_AC_INIT_DEFAULTS_FDS],
[# File descriptor usage:
# 0 standard input
# 1 file creation
# _AC_INIT_DEFAULTS
# -----------------
# Values which defaults can be set from `configure.in'.
-define([_AC_INIT_DEFAULTS],
+m4_define([_AC_INIT_DEFAULTS],
[m4_divert_push([DEFAULTS])dnl
_AC_INIT_DEFAULTS_ENVIRONMENT
# _AC_INIT_SRCDIR
# ---------------
# Compute `srcdir' based on `$ac_unique_file'.
-define([_AC_INIT_SRCDIR],
+m4_define([_AC_INIT_SRCDIR],
[m4_divert_push([PARSE_ARGS])dnl
# Find the source files, if location was not specified.
# _AC_INIT_PARSE_ARGS
# -------------------
-define([_AC_INIT_PARSE_ARGS],
+m4_define([_AC_INIT_PARSE_ARGS],
[m4_divert_push([PARSE_ARGS])dnl
# Initialize some variables set by options.
# _AC_INIT_HELP
# -------------
# Handle the `configure --help' message.
-define([_AC_INIT_HELP],
+m4_define([_AC_INIT_HELP],
[m4_divert_push([HELP_BEGIN])dnl
#
# _AC_INIT_VERSION
# ----------------
# Handle the `configure --version' message.
-define([_AC_INIT_VERSION],
+m4_define([_AC_INIT_VERSION],
[m4_divert([VERSION_BEGIN],
[if $ac_init_version; then
cat <<\EOF])dnl
# 3. Remember the options given to `configure' for `config.status --recheck'.
# 4. Ensure a correct environment
# 5. Required macros (cache, default AC_SUBST etc.)
-define([_AC_INIT_PREPARE],
+m4_define([_AC_INIT_PREPARE],
[m4_divert_push([INIT_PREPARE])dnl
# Keep a trace of the command line.
# preamble of the `configure' script.
# Note that the order is important: first initialize, then set the
# AC_CONFIG_SRCDIR.
-define([AC_INIT],
+m4_define([AC_INIT],
[ifval([$2], [_AC_INIT_PACKAGE($@)])dnl
m4_divert([BINSH], [@%:@! /bin/sh])
_AC_INIT_DEFAULTS()dnl
# Simulate AC_INIT, i.e., pretend this is the beginning of the `configure'
# generation. This is used by some tests, and let `autoconf' be used to
# generate other scripts than `configure'.
-define([AC_PLAIN_SCRIPT],
+m4_define([AC_PLAIN_SCRIPT],
[m4_divert_pop()])
#
# In subsequent runs, after having loaded the cache, compare
# ac_cv_env_foo against ac_env_foo. See _AC_ARG_VAR_VALIDATE.
-define([_AC_ARG_VAR_PRECIOUS],
+m4_define([_AC_ARG_VAR_PRECIOUS],
[AC_DIVERT_ONCE([PARSE_ARGS],
[ac_env_$1_set=${$1+set}
ac_env_$1_value=$$1
# _AC_ARG_VAR_VALIDATE
# --------------------
-define([_AC_ARG_VAR_VALIDATE],
+m4_define([_AC_ARG_VAR_VALIDATE],
[# Check that the precious variables saved in the cache have kept the same
# value.
ac_suggest_removing_cache=false
# _AC_CANONICAL_SPLIT(THING)
# --------------------------
# Generate the variables THING, THING_{alias cpu vendor os}.
-define([_AC_CANONICAL_SPLIT],
+m4_define([_AC_CANONICAL_SPLIT],
[AC_SUBST([$1], [$ac_cv_$1])dnl
dnl FIXME: AC_SUBST([$1_alias], [$ac_cv_$1_alias])dnl
AC_SUBST([$1_cpu],
# AC_SITE_LOAD
# ------------
# Look for site or system specific initialization scripts.
-define([AC_SITE_LOAD],
+m4_define([AC_SITE_LOAD],
[# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
# AC_CACHE_LOAD
# -------------
-define([AC_CACHE_LOAD],
+m4_define([AC_CACHE_LOAD],
[if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special
# files actually), so we avoid doing that.
# _AC_CACHE_DUMP
# --------------
# Dump the cache to stdout. It can be in a pipe (this is a requirement).
-define([_AC_CACHE_DUMP],
+m4_define([_AC_CACHE_DUMP],
[# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# -------------
# Save the cache.
# Allow a site initialization script to override cache values.
-define([AC_CACHE_SAVE],
+m4_define([AC_CACHE_SAVE],
[cat >confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# ------------------------------------------
# The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
# Should be dnl'ed. Try to catch common mistakes.
-define([AC_CACHE_VAL],
+m4_define([AC_CACHE_VAL],
[ifelse(m4_regexp([$2], [AC_DEFINE]), [-1], [],
[AC_DIAGNOSE(syntax,
[$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
# AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
# -------------------------------------------
# Do not call this macro with a dnl right behind.
-define([AC_CACHE_CHECK],
+m4_define([AC_CACHE_CHECK],
[AC_MSG_CHECKING([$1])
AC_CACHE_VAL([$2], [$3])dnl
AC_MSG_RESULT_UNQUOTED(AC_VAR_GET([$2]))])
# -------------------------------------------
# This macro is useless, it is used only with --trace to collect the
# list of *literals* CPP values passed to AC_DEFINE/AC_DEFINE_UNQUOTED.
-define([AC_DEFINE_TRACE_LITERAL])
+m4_define([AC_DEFINE_TRACE_LITERAL])
# AC_DEFINE_TRACE(CPP-SYMBOL)
# ---------------------------
# This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters
# out non literal symbols.
-define([AC_DEFINE_TRACE],
+m4_define([AC_DEFINE_TRACE],
[AC_VAR_INDIR_IFELSE([$1], [], [AC_DEFINE_TRACE_LITERAL([$1])])])
# 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],
+m4_define([AC_DEFINE],
[AC_DEFINE_TRACE([$1])dnl
ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
cat >>confdefs.h <<\EOF
# AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION])
# ----------------------------------------------------
# Similar, but perform shell substitutions $ ` \ once on VALUE.
-define([AC_DEFINE_UNQUOTED],
+m4_define([AC_DEFINE_UNQUOTED],
[AC_DEFINE_TRACE([$1])dnl
ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
cat >>confdefs.h <<EOF
# ----------------------------
# If VARIABLE has not already been AC_SUBST'ed, append the sed PROGRAM
# to `_AC_SUBST_SED_PROGRAM'.
-define([_AC_SUBST],
+m4_define([_AC_SUBST],
[AC_EXPAND_ONCE([m4_append([_AC_SUBST_SED_PROGRAM],
[$2
])])dnl
])
# Initialize.
-define([_AC_SUBST_SED_PROGRAM])
+m4_define([_AC_SUBST_SED_PROGRAM])
# AC_SUBST(VARIABLE, [VALUE])
#
# Beware that if you change this macro, you also have to change the
# sed script at the top of _AC_OUTPUT_FILES.
-define([AC_SUBST],
+m4_define([AC_SUBST],
[m4_ifvanl([$2], [$1=$2])[]dnl
_AC_SUBST([$1], [s,@$1@,[$]$1,;t t])dnl
])# AC_SUBST
# AC_SUBST_FILE(VARIABLE)
# -----------------------
# Read the comments of the preceding macro.
-define([AC_SUBST_FILE],
+m4_define([AC_SUBST_FILE],
[_AC_SUBST([$1], [/@$1@/r [$]$1
s,@$1@,,;t t])])
# ------------------------------
# Report a MESSAGE to the user of autoconf if `-W' or `-W all' was
# specified.
-define([AC_DIAGNOSE],
+m4_define([AC_DIAGNOSE],
[m4_warn($@)])
# -------------------
# Report a MESSAGE to the user of autoconf if `-W' or `-W all' was
# specified.
-define([AC_WARNING],
+m4_define([AC_WARNING],
[AC_DIAGNOSE([syntax], [$1])])
# AC_FATAL(MESSAGE, [EXIT-STATUS])
# --------------------------------
-define([AC_FATAL],
+m4_define([AC_FATAL],
[m4_fatal($@)])
# If STRING contains `\"' or `\`', it's old.
# Otherwise it's modern.
# We use two quotes in the pattern to keep highlighting tools at peace.
-define([_AC_SH_QUOTE_IFELSE],
+m4_define([_AC_SH_QUOTE_IFELSE],
[ifelse(m4_regexp([$1], [\\[\\$]]),
[-1], [ifelse(m4_regexp([$1], [\\[`""]]),
[-1], [$2],
# FIXME: In a distant future (2.51 or +), this warning should be
# classified as `syntax'. It is claissified as `obsolete' to ease
# the transition (for Libtool for instance).
-define([_AC_SH_QUOTE],
+m4_define([_AC_SH_QUOTE],
[_AC_SH_QUOTE_IFELSE([$1],
[m4_patsubst([$1], [\([`""]\)], [\\\1])],
[AC_DIAGNOSE([obsolete],
# _AC_ECHO_UNQUOTED(STRING, [FD = AC_FD_MSG])
# -------------------------------------------
# Perform shell expansions on STRING and echo the string to FD.
-define([_AC_ECHO_UNQUOTED],
+m4_define([_AC_ECHO_UNQUOTED],
[echo "$1" >&m4_default([$2], [AC_FD_MSG])])
# _AC_ECHO(STRING, [FD = AC_FD_MSG])
# ----------------------------------
# Protect STRING from backquote expansion, echo the result to FD.
-define([_AC_ECHO],
+m4_define([_AC_ECHO],
[_AC_ECHO_UNQUOTED([_AC_SH_QUOTE([$1])], $2)])
# _AC_ECHO_N(STRING, [FD = AC_FD_MSG])
# ------------------------------------
# Same as _AC_ECHO, but echo doesn't return to a new line.
-define([_AC_ECHO_N],
+m4_define([_AC_ECHO_N],
[echo $ECHO_N "_AC_SH_QUOTE([$1])$ECHO_C" >&m4_default([$2], [AC_FD_MSG])])
# AC_MSG_NOTICE(STRING)
# ---------------------
-define([AC_MSG_NOTICE],
+m4_define([AC_MSG_NOTICE],
[_AC_ECHO([configure:__oline__: notice: $1], AC_FD_LOG)
_AC_ECHO([$1])[]dnl
])
# AC_MSG_CHECKING(FEATURE)
# ------------------------
-define([AC_MSG_CHECKING],
+m4_define([AC_MSG_CHECKING],
[_AC_ECHO([configure:__oline__: checking $1], AC_FD_LOG)
_AC_ECHO_N([checking $1... ])[]dnl
])
# AC_MSG_RESULT(RESULT)
# ---------------------
-define([AC_MSG_RESULT],
+m4_define([AC_MSG_RESULT],
[_AC_ECHO([configure:__oline__: result: $1], AC_FD_LOG)
_AC_ECHO([${ECHO_T}$1])[]dnl
])
# AC_MSG_RESULT_UNQUOTED(RESULT)
# ------------------------------
# Likewise, but perform $ ` \ shell substitutions.
-define([AC_MSG_RESULT_UNQUOTED],
+m4_define([AC_MSG_RESULT_UNQUOTED],
[_AC_ECHO_UNQUOTED([configure:__oline__: result: $1], AC_FD_LOG)
_AC_ECHO_UNQUOTED([${ECHO_T}$1])[]dnl
])
# AC_MSG_WARN(PROBLEM)
# --------------------
-define([AC_MSG_WARN],
+m4_define([AC_MSG_WARN],
[{ _AC_ECHO([configure:__oline__: WARNING: $1], AC_FD_LOG)
_AC_ECHO([configure: WARNING: $1], 2); }])
# AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1])
# --------------------------------------
-define([AC_MSG_ERROR],
+m4_define([AC_MSG_ERROR],
[{ _AC_ECHO([configure:__oline__: error: $1], AC_FD_LOG)
_AC_ECHO([configure: error: $1], 2)
AS_EXIT([$2]); }])
# 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],
+m4_define([AC_INCLUDES_DEFAULT],
[ifelse([$1], [], [$ac_includes_default], [$1
])])
# POSIX.2 word splitting is done only on the output of word
# expansions, not every word. This closes a longstanding sh security
# hole.
-define([AC_SHELL_PATH_WALK],
+m4_define([AC_SHELL_PATH_WALK],
[ac_save_IFS=$IFS; IFS=':'
ac_dummy="m4_default([$1], [$PATH])"
for ac_dir in $ac_dummy; do
# AH_CHECK_LIB(LIBNAME)
# ---------------------
-define([AH_CHECK_LIB],
+m4_define([AH_CHECK_LIB],
[AH_TEMPLATE(AC_TR_CPP(HAVE_LIB$1),
[Define if you have the `]$1[' library (-l]$1[).])])
# ---------------------------------------------------------------------
# Try to compile PROGRAM.
# This macro can be used during the selection of a compiler.
-define([_AC_COMPILE_IFELSE],
+m4_define([_AC_COMPILE_IFELSE],
[m4_ifvanl([$1], [AC_LANG_CONFTEST([$1])])dnl
rm -f conftest.$ac_objext
if AC_TRY_EVAL(ac_compile) && test -s conftest.$ac_objext; then
# ------------------------------------------------------------------
# Try to link PROGRAM.
# This macro can be used during the selection of a compiler.
-define([_AC_LINK_IFELSE],
+m4_define([_AC_LINK_IFELSE],
[m4_ifvanl([$1], [AC_LANG_CONFTEST([$1])])dnl
rm -f conftest.$ac_objext conftest$ac_exeext
if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
# ------------------------------------------------------------
# Compile, link, and run.
# This macro can be used during the selection of a compiler.
-define([_AC_RUN_IFELSE],
+m4_define([_AC_RUN_IFELSE],
[m4_ifvanl([$1], [AC_LANG_CONFTEST([$1])])dnl
rm -f conftest$ac_exeext
if AC_TRY_EVAL(ac_link) &&
])# AC_CHECK_HEADER
-define([AH_CHECK_HEADERS],
+m4_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_LIBOBJ_DECL(FILENAME-NOEXT)
# ------------------------------
# Announce we might need the file `FILENAME-NOEXT.c'.
-define([AC_LIBOBJ_DECL], [])
+m4_define([AC_LIBOBJ_DECL], [])
# _AC_LIBOBJ(FILENAME-NOEXT, ACTION-IF-INDIR)
# -------------------------------------------
# We need `FILENAME-NOEXT.o', save this into `LIBOBJS'.
# We don't use AC_SUBST/2 because it forces an unneeded eol.
-define([_AC_LIBOBJ],
+m4_define([_AC_LIBOBJ],
[AC_VAR_INDIR_IFELSE([$1],
[$2],
[AC_LIBOBJ_DECL([$1])])dnl
# -------------------------
# We need `FILENAME-NOEXT.o', save this into `LIBOBJS'.
# We don't use AC_SUBST/2 because it forces an unneeded eol.
-define([AC_LIBOBJ],
+m4_define([AC_LIBOBJ],
[_AC_LIBOBJ([$1],
[AC_DIAGNOSE(syntax,
[$0($1): you should use literals])])dnl
# ---------------------------------------------------------
# Compute the integer EXPRESSION and store the result in the VARIABLE.
# Works OK if cross compiling.
-define([_AC_COMPUTE_INT_COMPILE],
+m4_define([_AC_COMPUTE_INT_COMPILE],
[# Depending upon the size, compute the lo and hi bounds.
AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= 0])],
[ac_lo=0 ac_try=0
# _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, [INCLUDES], [IF-FAILS])
# -----------------------------------------------------------------
# Store the evaluation of the integer EXPRESSION in VARIABLE.
-define([_AC_COMPUTE_INT_RUN],
+m4_define([_AC_COMPUTE_INT_RUN],
[AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])],
[$2=`cat conftestval`], [$4])])
# _AC_COMPUTE_INT(EXPRESSION, VARIABLE, INCLUDES, IF-FAILS)
# ---------------------------------------------------------
-define([_AC_COMPUTE_INT],
+m4_define([_AC_COMPUTE_INT],
[if test "$cross_compiling" = yes; then
_AC_COMPUTE_INT_COMPILE([$1], [$2], [$3])
else
# (not necessarily size_t etc.). Equally, instead of defining an unused
# variable, we just use a cast to avoid warnings from the compiler.
# Suggested by Paul Eggert.
-define([_AC_CHECK_TYPE_NEW],
+m4_define([_AC_CHECK_TYPE_NEW],
[AC_REQUIRE([AC_HEADER_STDC])dnl
AC_VAR_PUSHDEF([ac_Type], [ac_cv_type_$1])dnl
AC_CACHE_CHECK([for $1], ac_Type,
# FIXME: This is an extremely badly chosen name, since this
# macro actually performs an AC_REPLACE_TYPE. Some day we
# have to clean this up.
-define([_AC_CHECK_TYPE_OLD],
+m4_define([_AC_CHECK_TYPE_OLD],
[_AC_CHECK_TYPE_NEW([$1],,
[AC_DEFINE_UNQUOTED([$1], [$2],
[Define to `$2' if <sys/types.h> does not define.])])dnl
# that are defining types.
# Because many people have used `off_t' and `size_t' too, they are added
# for better common-useward backward compatibility.
-define([_AC_CHECK_TYPE_REPLACEMENT_TYPE_P],
+m4_define([_AC_CHECK_TYPE_REPLACEMENT_TYPE_P],
[ifelse(m4_regexp([$1],
[^\(_Bool\|bool\|char\|double\|float\|int\|long\|short\|\(un\)?signed\|size_t\|off_t\)\([_a-zA-Z0-9() *]\|\[\|\]\)*$]),
0, 1, 0)dnl
# _AC_CHECK_TYPE_MAYBE_TYPE_P(STRING)
# -----------------------------------
# Return `1' if STRING looks like a C/C++ type.
-define([_AC_CHECK_TYPE_MAYBE_TYPE_P],
+m4_define([_AC_CHECK_TYPE_MAYBE_TYPE_P],
[ifelse(m4_regexp([$1], [^[_a-zA-Z0-9 ]+\([_a-zA-Z0-9() *]\|\[\|\]\)*$]),
0, 1, 0)dnl
])# _AC_CHECK_TYPE_MAYBE_TYPE_P
# 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],
+m4_define([AC_CONFIG_IF_MEMBER],
[ifelse(m4_regexp($2, [\(^\| \)]m4_patsubst([$1],
[\([+*.]\)], [\\\1])[\(:\| \|$\)]),
-1, [$4], [$3])])
# -----------------------------------------------------
# This macro does nothing, it's a hook to be read with `autoconf --trace'.
# It announces DEST depends upon the SOURCE1 etc.
-define([AC_FILE_DEPENDENCY_TRACE], [])
+m4_define([AC_FILE_DEPENDENCY_TRACE], [])
# _AC_CONFIG_DEPENDENCY(DEST, [SOURCE1], [SOURCE2...])
# ----------------------------------------------------
# Be sure that a missing dependency is expressed as a dependency upon
# `DEST.in'.
-define([_AC_CONFIG_DEPENDENCY],
+m4_define([_AC_CONFIG_DEPENDENCY],
[ifval([$2],
[AC_FILE_DEPENDENCY_TRACE($@)],
[AC_FILE_DEPENDENCY_TRACE([$1], [$1.in])])])
# _AC_CONFIG_DEPENDENCIES(DEST[:SOURCE1[:SOURCE2...]]...)
# -------------------------------------------------------
# Declare the DESTs depend upon their SOURCE1 etc.
-define([_AC_CONFIG_DEPENDENCIES],
+m4_define([_AC_CONFIG_DEPENDENCIES],
[m4_divert_push([KILL])
AC_FOREACH([AC_File], [$1],
[_AC_CONFIG_DEPENDENCY(m4_patsubst(AC_File, [:], [,]))])
#
# Note that this macro does not check if the list $[1] itself
# contains doubles.
-define([_AC_CONFIG_UNIQUE],
+m4_define([_AC_CONFIG_UNIQUE],
[m4_divert_push([KILL])
AC_FOREACH([AC_File], [$1],
[m4_pushdef([AC_Dest], m4_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],
+m4_define([_AC_CONFIG_COMMANDS_INIT],
[ifval([$1],
[m4_append([_AC_OUTPUT_COMMANDS_INIT], [$1
])])])
# Initialize.
-define([_AC_OUTPUT_COMMANDS_INIT])
+m4_define([_AC_OUTPUT_COMMANDS_INIT])
# AC_CONFIG_COMMANDS(NAME...,[COMMANDS], [INIT-CMDS])
])dnl
# Initialize the lists.
-define([AC_LIST_COMMANDS])
-define([AC_LIST_COMMANDS_COMMANDS])
+m4_define([AC_LIST_COMMANDS])
+m4_define([AC_LIST_COMMANDS_COMMANDS])
# AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS)
# 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],
-[define([_AC_OUTPUT_COMMANDS_CNT], m4_incr(_AC_OUTPUT_COMMANDS_CNT))dnl
+[m4_define([_AC_OUTPUT_COMMANDS_CNT], m4_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
])
])])
# Initialize.
-define([AC_OUTPUT_COMMANDS_PRE])
+m4_define([AC_OUTPUT_COMMANDS_PRE])
# AC_CONFIG_COMMANDS_POST(CMDS)
])])
# Initialize.
-define([AC_OUTPUT_COMMANDS_POST])
+m4_define([AC_OUTPUT_COMMANDS_POST])
# AC_CONFIG_HEADERS(HEADERS..., [COMMANDS], [INIT-CMDS])
# Initialize to empty. It is much easier and uniform to have a config
# list expand to empty when undefined, instead of special casing when
# not defined (since in this case, AC_CONFIG_FOO expands to AC_CONFIG_FOO).
-define([AC_LIST_HEADERS])
-define([AC_LIST_HEADERS_COMMANDS])
+m4_define([AC_LIST_HEADERS])
+m4_define([AC_LIST_HEADERS_COMMANDS])
# AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
# Initialize the list.
-define([AC_LIST_LINKS])
-define([AC_LIST_LINKS_COMMANDS])
+m4_define([AC_LIST_LINKS])
+m4_define([AC_LIST_LINKS_COMMANDS])
# AC_LINK_FILES(SOURCE..., DEST...)
AU_DEFUN([AC_LINK_FILES],
[ifelse($#, 2, ,
[m4_fatal([$0: incorrect number of arguments])])dnl
-define([_AC_LINK_FILES_CNT], m4_incr(_AC_LINK_FILES_CNT))dnl
+m4_define([_AC_LINK_FILES_CNT], m4_incr(_AC_LINK_FILES_CNT))dnl
ac_sources="$1"
ac_dests="$2"
while test -n "$ac_sources"; do
])dnl
# Initialize the lists.
-define([AC_LIST_FILES])
-define([AC_LIST_FILES_COMMANDS])
+m4_define([AC_LIST_FILES])
+m4_define([AC_LIST_FILES_COMMANDS])
# AC_CONFIG_SUBDIRS(DIR ...)
])
# Initialize the list.
-define([_AC_LIST_SUBDIRS])
+m4_define([_AC_LIST_SUBDIRS])
# autoupdate::AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS])
# The CONFIG_HEADERS are defined in the m4 variable AC_LIST_HEADERS.
# Pay special attention not to have too long here docs: some old
# shells die. Unfortunately the limit is not known precisely...
-define([AC_OUTPUT],
+m4_define([AC_OUTPUT],
[dnl Dispatch the extra arguments to their native macros.
ifval([$1],
[AC_CONFIG_FILES([$1])])dnl
# Produce config.status. Called by AC_OUTPUT.
# Pay special attention not to have too long here docs: some old
# shells die. Unfortunately the limit is not known precisely...
-define([_AC_OUTPUT_CONFIG_STATUS],
+m4_define([_AC_OUTPUT_CONFIG_STATUS],
[echo creating $CONFIG_STATUS
cat >$CONFIG_STATUS <<\EOF
#! /bin/sh
# 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],
+m4_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],
+m4_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],
+m4_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],
+m4_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],
+m4_define([_AC_OUTPUT_COMMANDS],
[cat >>$CONFIG_STATUS <<\EOF
#
# ------------------
# This is a subroutine of AC_OUTPUT, but it does not go into
# config.status, rather, it is called after running config.status.
-define([_AC_OUTPUT_SUBDIRS],
+m4_define([_AC_OUTPUT_SUBDIRS],
[
#
# CONFIG_SUBDIRS section.
# ------------------------------------------------------------
# Expand into IF-LANG1 if the current language is LANG1 etc. else
# into default.
-define([AC_LANG_CASE],
+m4_define([AC_LANG_CASE],
[m4_case(_AC_LANG, $@)])
# ------------------------------------
# Call the specialization of MACRO for LANG with ARGS. Complain if
# unavailable.
-define([_AC_LANG_DISPATCH],
+m4_define([_AC_LANG_DISPATCH],
[ifdef([$1($2)],
[m4_indir([$1($2)], m4_shiftn(2, $@))],
[AC_FATAL([$1: unknown language: $2])])])
# If you add quotes here, they will be part of the name too, yielding
# `AC_LANG([C])' for instance, which does not exist.
AC_DEFUN([AC_LANG],
-[define([_AC_LANG], [$1])dnl
+[m4_define([_AC_LANG], [$1])dnl
_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
# AC_LANG_PUSH(LANG)
# ------------------
# Save the current language, and use LANG.
-define([AC_LANG_PUSH],
+m4_define([AC_LANG_PUSH],
[m4_pushdef([_AC_LANG])dnl
AC_LANG([$1])])
# AC_LANG_POP
# -----------
# Restore the previous language.
-define([AC_LANG_POP],
+m4_define([AC_LANG_POP],
[m4_popdef([_AC_LANG])dnl
ifelse(_AC_LANG, [_AC_LANG],
[AC_FATAL([too many $0])])dnl
# ---------------
# Return a short signature of _AC_LANG which can be used in shell
# variable names, or in M4 macro names.
-define([_AC_LANG_ABBREV],
+m4_define([_AC_LANG_ABBREV],
[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
# AC_LANG(C)
# ----------
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-define([AC_LANG(C)],
+m4_define([AC_LANG(C)],
[ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
# _AC_LANG_ABBREV(C)
# ------------------
-define([_AC_LANG_ABBREV(C)], [c])
+m4_define([_AC_LANG_ABBREV(C)], [c])
# ---------------------- #
# AC_LANG(C++)
# ------------
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-define([AC_LANG(C++)],
+m4_define([AC_LANG(C++)],
[ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
# _AC_LANG_ABBREV(C++)
# --------------------
-define([_AC_LANG_ABBREV(C++)], [cxx])
+m4_define([_AC_LANG_ABBREV(C++)], [cxx])
# ----------------------------- #
# AC_LANG(Fortran 77)
# -------------------
-define([AC_LANG(Fortran 77)],
+m4_define([AC_LANG(Fortran 77)],
[ac_ext=f
ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${F77-f77} -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
# _AC_LANG_ABBREV(Fortran 77)
# ---------------------------
-define([_AC_LANG_ABBREV(Fortran 77)], [f77])
+m4_define([_AC_LANG_ABBREV(Fortran 77)], [f77])
# AC_LANG_CONFTEST(BODY)
# ----------------------
# Save the BODY in `conftest.$ac_ext'. Add a trailing new line.
-define([AC_LANG_CONFTEST],
+m4_define([AC_LANG_CONFTEST],
[cat >conftest.$ac_ext <<_ACEOF
$1
_ACEOF])
# -----------------------
# This sometimes fails to find confdefs.h, for some reason.
# #line __oline__ "$[0]"
-define([AC_LANG_SOURCE(C)],
+m4_define([AC_LANG_SOURCE(C)],
[#line __oline__ "configure"
#include "confdefs.h"
$1])
# AC_LANG_PROGRAM(C)([PROLOGUE], [BODY])
# --------------------------------------
-define([AC_LANG_PROGRAM(C)],
+m4_define([AC_LANG_PROGRAM(C)],
[$1
int
main ()
# AC_LANG_CALL(C)(PROLOGUE, FUNCTION)
# -----------------------------------
# Avoid conflicting decl of main.
-define([AC_LANG_CALL(C)],
+m4_define([AC_LANG_CALL(C)],
[AC_LANG_PROGRAM([$1
ifelse([$2], [main], ,
[/* Override any gcc2 internal prototype to avoid an error. */
# Don't include <ctype.h> because on OSF/1 3.0 it includes
# <sys/types.h> which includes <sys/select.h> which contains a
# prototype for select. Similarly for bzero.
-define([AC_LANG_FUNC_LINK_TRY(C)],
+m4_define([AC_LANG_FUNC_LINK_TRY(C)],
[AC_LANG_PROGRAM(
[/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $1 (); below. */
# AC_LANG_BOOL_COMPILE_TRY(C)(PROLOGUE, EXPRESSION)
# -------------------------------------------------
-define([AC_LANG_BOOL_COMPILE_TRY(C)],
+m4_define([AC_LANG_BOOL_COMPILE_TRY(C)],
[AC_LANG_PROGRAM([$1], [int _array_ @<:@1 - 2 * !($2)@:>@])])
# -----------------------------------------
# We need `stdio.h' to open a `FILE', so the prologue defaults to the
# inclusion of `stdio.h'.
-define([AC_LANG_INT_SAVE(C)],
+m4_define([AC_LANG_INT_SAVE(C)],
[AC_LANG_PROGRAM([m4_default([$1], [@%:@include "stdio.h"])],
[FILE *f = fopen ("conftestval", "w");
if (!f)
# AC_LANG_SOURCE(C++)(BODY)
# -------------------------
-define([AC_LANG_SOURCE(C++)],
+m4_define([AC_LANG_SOURCE(C++)],
[#line __oline__ "configure"
#include "confdefs.h"
#ifdef __cplusplus
# AC_LANG_PROGRAM(C++)([PROLOGUE], [BODY])
# ----------------------------------------
# Same as C.
-define([AC_LANG_PROGRAM(C++)], m4_defn([AC_LANG_PROGRAM(C)]))
+m4_define([AC_LANG_PROGRAM(C++)], m4_defn([AC_LANG_PROGRAM(C)]))
# AC_LANG_CALL(C++)(PROLOGUE, FUNCTION)
# -------------------------------------
# Same as C.
-define([AC_LANG_CALL(C++)], m4_defn([AC_LANG_CALL(C)]))
+m4_define([AC_LANG_CALL(C++)], m4_defn([AC_LANG_CALL(C)]))
# AC_LANG_FUNC_LINK_TRY(C++)(FUNCTION)
# ------------------------------------
# Same as C.
-define([AC_LANG_FUNC_LINK_TRY(C++)], m4_defn([AC_LANG_FUNC_LINK_TRY(C)]))
+m4_define([AC_LANG_FUNC_LINK_TRY(C++)], m4_defn([AC_LANG_FUNC_LINK_TRY(C)]))
# AC_LANG_BOOL_COMPILE_TRY(C++)(PROLOGUE, EXPRESSION)
# ---------------------------------------------------
# Same as C.
-define([AC_LANG_BOOL_COMPILE_TRY(C++)], m4_defn([AC_LANG_BOOL_COMPILE_TRY(C)]))
+m4_define([AC_LANG_BOOL_COMPILE_TRY(C++)], m4_defn([AC_LANG_BOOL_COMPILE_TRY(C)]))
# AC_LANG_INT_SAVE(C++)(PROLOGUE, EXPRESSION)
# -------------------------------------------
# Same as C.
-define([AC_LANG_INT_SAVE(C++)], m4_defn([AC_LANG_INT_SAVE(C)]))
+m4_define([AC_LANG_INT_SAVE(C++)], m4_defn([AC_LANG_INT_SAVE(C)]))
# FIXME: Apparently, according to former AC_TRY_COMPILER, the CPP
# directives must not be included. But AC_TRY_RUN_NATIVE was not
# avoiding them, so?
-define([AC_LANG_SOURCE(Fortran 77)],
+m4_define([AC_LANG_SOURCE(Fortran 77)],
[$1])
# AC_LANG_PROGRAM(Fortran 77)([PROLOGUE], [BODY])
# -----------------------------------------------
# Yes, we discard the PROLOGUE.
-define([AC_LANG_PROGRAM(Fortran 77)],
+m4_define([AC_LANG_PROGRAM(Fortran 77)],
[ program main
$2
end])
# AC_LANG_CALL(Fortran 77)(PROLOGUE, FUNCTION)
# --------------------------------------------
# FIXME: This is a guess, help!
-define([AC_LANG_CALL(Fortran 77)],
+m4_define([AC_LANG_CALL(Fortran 77)],
[AC_LANG_PROGRAM([$1],
[ call $2])])
# Find a compiler for the current LANG. Note that because we might
# AC_REQUIRE `AC_LANG_COMPILER(C)' for instance, the latter must be
# AC_DEFUN'd, not just define'd.
-define([AC_LANG_COMPILER],
+m4_define([AC_LANG_COMPILER],
[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
# _AC_LANG_COMPILER_WORKS
# -----------------------
-define([_AC_LANG_COMPILER_WORKS],
+m4_define([_AC_LANG_COMPILER_WORKS],
[AC_MSG_CHECKING([whether the _AC_LANG compiler works])
_AC_LINK_IFELSE([AC_LANG_PROGRAM()],
[# FIXME: these cross compiler hacks should be removed for autoconf 3.0
# _AC_LANG_COMPILER_GNU
# ---------------------
# Check whether the compiler for the current language is GNU.
-define([_AC_LANG_COMPILER_GNU],
+m4_define([_AC_LANG_COMPILER_GNU],
[AC_CACHE_CHECK([whether we are using the GNU _AC_LANG compiler],
[ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu],
[_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifndef __GNUC__
AC_BEFORE([$0], [_AC_LANG_COMPILER_WORKS])
AC_BEFORE([$0], [_AC_EXEEXT])
-define([_AC_LANG_COMPILER_WORKS], [cross_compiling=maybe])
+m4_define([_AC_LANG_COMPILER_WORKS], [cross_compiling=maybe])
-define([_AC_EXEEXT], [EXEEXT=])
+m4_define([_AC_EXEEXT], [EXEEXT=])
-define([AC_LINK_IFELSE],
+m4_define([AC_LINK_IFELSE],
[AC_FATAL([All the tests involving linking were disabled by $0])])
m4_divert_pop()dnl
# Check whether -g works, even if CFLAGS is set, in case the package
# plays around with CFLAGS (such as to build both debugging and normal
# versions of a library), tasteless as that idea is.
-define([_AC_PROG_CC_G],
+m4_define([_AC_PROG_CC_G],
[ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
CFLAGS="-g"
# Check whether -g works, even if CXXFLAGS is set, in case the package
# plays around with CXXFLAGS (such as to build both debugging and
# normal versions of a library), tasteless as that idea is.
-define([_AC_PROG_CXX_G],
+m4_define([_AC_PROG_CXX_G],
[ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="-g"
# Check whether -g works, even if FFLAGS is set, in case the package
# plays around with FFLAGS (such as to build both debugging and normal
# versions of a library), tasteless as that idea is.
-define([_AC_PROG_F77_G],
+m4_define([_AC_PROG_F77_G],
[ac_test_FFLAGS=${FFLAGS+set}
ac_save_FFLAGS=$FFLAGS
FFLAGS=
# has little interest.
# Idea borrowed from dist 3.0. Use `*c*,', not `*c,' because if `\c'
# failed there is also a new-line to match.
-define([_AC_PROG_ECHO],
+m4_define([_AC_PROG_ECHO],
[case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
*c*,-n*) ECHO_N= ECHO_C='
' ECHO_T=' ' ;;
# _AC_DECL_YYTEXT
# ---------------
# Check if lex declares yytext as a char * by default, not a char[].
-define([_AC_DECL_YYTEXT],
+m4_define([_AC_DECL_YYTEXT],
[AC_REQUIRE_CPP()dnl
AC_CACHE_CHECK(lex output file root, ac_cv_prog_lex_root,
[# The minimal lex program is just a single line: %%. But some broken lexes
# -----------------------------------------------------------------
# Like AC_CHECK_HEADER, except also make sure that HEADER-FILE
# defines the type `DIR'. dirent.h on NextStep 3.2 doesn't.
-define([_AC_CHECK_HEADER_DIRENT],
+m4_define([_AC_CHECK_HEADER_DIRENT],
[AC_VAR_PUSHDEF([ac_Header], [ac_cv_header_dirent_$1])dnl
AC_CACHE_CHECK([for $1 that defines DIR], ac_Header,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
# AH_CHECK_HEADERS_DIRENT(HEADERS...)
# -----------------------------------
-define([AH_CHECK_HEADERS_DIRENT],
+m4_define([AH_CHECK_HEADERS_DIRENT],
[AC_FOREACH([AC_Header], [$1],
[AH_TEMPLATE(AC_TR_CPP(HAVE_[]AC_Header),
[Define if you have the <]AC_Header[> header file, and
# _AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H
# ----------------------------------
-define([_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H],
+m4_define([_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H],
[AC_CACHE_CHECK([whether termios.h defines TIOCGWINSZ],
ac_cv_sys_tiocgwinsz_in_termios_h,
[AC_EGREP_CPP([yes],
# _AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL
# ----------------------------------
-define([_AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL],
+m4_define([_AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL],
[AC_CACHE_CHECK([whether sys/ioctl.h defines TIOCGWINSZ],
ac_cv_sys_tiocgwinsz_in_sys_ioctl_h,
[AC_EGREP_CPP([yes],
# _AC_SYS_LARGEFILE_SOURCE(PROLOGUE, BODY)
# ----------------------------------------
-define([_AC_SYS_LARGEFILE_SOURCE],
+m4_define([_AC_SYS_LARGEFILE_SOURCE],
[AC_LANG_PROGRAM(
[$1
@%:@include <sys/types.h>
# DESCRIPTION,
# [INCLUDES], [FUNCTION-BODY])
# ----------------------------------------------------------
-define([_AC_SYS_LARGEFILE_MACRO_VALUE],
+m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE],
[AC_CACHE_CHECK([for $1 value needed for large files], [$3],
[while :; do
$3=no
# ----------------
# Internal subroutine of AC_PATH_X.
# Set ac_x_includes and/or ac_x_libraries.
-define([_AC_PATH_X_XMKMF],
+m4_define([_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.
-define([_AC_PATH_X_DIRECT],
+m4_define([_AC_PATH_X_DIRECT],
[# Standard set of common directories for X headers.
# Check X11 before X11Rn because it is often a symlink to the current release.
ac_x_header_dirs='
# ----------
# Check for Cygwin. This is a way to set the right value for
# EXEEXT.
-define([_AC_CYGWIN],
+m4_define([_AC_CYGWIN],
[AC_CACHE_CHECK(for Cygwin environment, ac_cv_cygwin,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
[#ifndef __CYGWIN__
# ----------
# Check for EMX on OS/2. This is another way to set the right value
# for EXEEXT.
-define([_AC_EMXOS2],
+m4_define([_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],
# -----------
# Check for mingw32. This is another way to set the right value for
# EXEEXT.
-define([_AC_MINGW32],
+m4_define([_AC_MINGW32],
[AC_CACHE_CHECK(for mingw32 environment, ac_cv_mingw32,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return __MINGW32__;])],
[ac_cv_mingw32=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.
-define([_AC_EXEEXT],
+m4_define([_AC_EXEEXT],
[AC_CACHE_CHECK([for executable suffix], ac_cv_exeext,
[case "$CYGWIN $MINGW32 $EMXOS2" in
*yes*) ac_cv_exeext=.exe ;;
# 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.
-define([_AC_OBJEXT],
+m4_define([_AC_OBJEXT],
[AC_CACHE_CHECK([for object suffix], ac_cv_objext,
[AC_LANG_CONFTEST([AC_LANG_PROGRAM()])
if AC_TRY_EVAL(ac_compile); then
# Version of Autoconf.
# Copyright 1999, 2000 Free Software Foundation, Inc.
-define([AC_ACVERSION], [@VERSION@])
+m4_define([AC_ACVERSION], [@VERSION@])
m4_include([m4sh.m4])
-m4_copy_unm4([m4_define])
-
m4_include([acversion.m4])
m4_include([acgeneral.m4])
m4_include([aclang.m4])
m4_include([acoldnames.m4])
# We discourage the use of the non prefixed macro names: M4sugar maps
-# them all into `m4_'. Autoconf has been converted to these names
-# too. But users may still depend upon these, so reestablish them.
+# all the builtins into `m4_'. Autoconf has been converted to these
+# names too. But users may still depend upon these, so reestablish
+# them.
m4_copy_unm4([m4_builtin])
m4_copy_unm4([m4_changequote])
m4_copy_unm4([m4_decr])
+m4_copy_unm4([m4_define])
m4_copy_unm4([m4_defn])
m4_copy_unm4([m4_incr])
m4_copy_unm4([m4_index])
m4_include([m4sh.m4])
-m4_copy_unm4([m4_define])
-
m4_include([acversion.m4])
m4_include([acgeneral.m4])
m4_include([aclang.m4])
m4_include([acoldnames.m4])
# We discourage the use of the non prefixed macro names: M4sugar maps
-# them all into `m4_'. Autoconf has been converted to these names
-# too. But users may still depend upon these, so reestablish them.
+# all the builtins into `m4_'. Autoconf has been converted to these
+# names too. But users may still depend upon these, so reestablish
+# them.
m4_copy_unm4([m4_builtin])
m4_copy_unm4([m4_changequote])
m4_copy_unm4([m4_decr])
+m4_copy_unm4([m4_define])
m4_copy_unm4([m4_defn])
m4_copy_unm4([m4_incr])
m4_copy_unm4([m4_index])
# ------------------------------------------------------------
# Expand into IF-LANG1 if the current language is LANG1 etc. else
# into default.
-define([AC_LANG_CASE],
+m4_define([AC_LANG_CASE],
[m4_case(_AC_LANG, $@)])
# ------------------------------------
# Call the specialization of MACRO for LANG with ARGS. Complain if
# unavailable.
-define([_AC_LANG_DISPATCH],
+m4_define([_AC_LANG_DISPATCH],
[ifdef([$1($2)],
[m4_indir([$1($2)], m4_shiftn(2, $@))],
[AC_FATAL([$1: unknown language: $2])])])
# If you add quotes here, they will be part of the name too, yielding
# `AC_LANG([C])' for instance, which does not exist.
AC_DEFUN([AC_LANG],
-[define([_AC_LANG], [$1])dnl
+[m4_define([_AC_LANG], [$1])dnl
_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
# AC_LANG_PUSH(LANG)
# ------------------
# Save the current language, and use LANG.
-define([AC_LANG_PUSH],
+m4_define([AC_LANG_PUSH],
[m4_pushdef([_AC_LANG])dnl
AC_LANG([$1])])
# AC_LANG_POP
# -----------
# Restore the previous language.
-define([AC_LANG_POP],
+m4_define([AC_LANG_POP],
[m4_popdef([_AC_LANG])dnl
ifelse(_AC_LANG, [_AC_LANG],
[AC_FATAL([too many $0])])dnl
# ---------------
# Return a short signature of _AC_LANG which can be used in shell
# variable names, or in M4 macro names.
-define([_AC_LANG_ABBREV],
+m4_define([_AC_LANG_ABBREV],
[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
# AC_LANG(C)
# ----------
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-define([AC_LANG(C)],
+m4_define([AC_LANG(C)],
[ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
# _AC_LANG_ABBREV(C)
# ------------------
-define([_AC_LANG_ABBREV(C)], [c])
+m4_define([_AC_LANG_ABBREV(C)], [c])
# ---------------------- #
# AC_LANG(C++)
# ------------
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-define([AC_LANG(C++)],
+m4_define([AC_LANG(C++)],
[ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
# _AC_LANG_ABBREV(C++)
# --------------------
-define([_AC_LANG_ABBREV(C++)], [cxx])
+m4_define([_AC_LANG_ABBREV(C++)], [cxx])
# ----------------------------- #
# AC_LANG(Fortran 77)
# -------------------
-define([AC_LANG(Fortran 77)],
+m4_define([AC_LANG(Fortran 77)],
[ac_ext=f
ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${F77-f77} -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
# _AC_LANG_ABBREV(Fortran 77)
# ---------------------------
-define([_AC_LANG_ABBREV(Fortran 77)], [f77])
+m4_define([_AC_LANG_ABBREV(Fortran 77)], [f77])
# AC_LANG_CONFTEST(BODY)
# ----------------------
# Save the BODY in `conftest.$ac_ext'. Add a trailing new line.
-define([AC_LANG_CONFTEST],
+m4_define([AC_LANG_CONFTEST],
[cat >conftest.$ac_ext <<_ACEOF
$1
_ACEOF])
# -----------------------
# This sometimes fails to find confdefs.h, for some reason.
# #line __oline__ "$[0]"
-define([AC_LANG_SOURCE(C)],
+m4_define([AC_LANG_SOURCE(C)],
[#line __oline__ "configure"
#include "confdefs.h"
$1])
# AC_LANG_PROGRAM(C)([PROLOGUE], [BODY])
# --------------------------------------
-define([AC_LANG_PROGRAM(C)],
+m4_define([AC_LANG_PROGRAM(C)],
[$1
int
main ()
# AC_LANG_CALL(C)(PROLOGUE, FUNCTION)
# -----------------------------------
# Avoid conflicting decl of main.
-define([AC_LANG_CALL(C)],
+m4_define([AC_LANG_CALL(C)],
[AC_LANG_PROGRAM([$1
ifelse([$2], [main], ,
[/* Override any gcc2 internal prototype to avoid an error. */
# Don't include <ctype.h> because on OSF/1 3.0 it includes
# <sys/types.h> which includes <sys/select.h> which contains a
# prototype for select. Similarly for bzero.
-define([AC_LANG_FUNC_LINK_TRY(C)],
+m4_define([AC_LANG_FUNC_LINK_TRY(C)],
[AC_LANG_PROGRAM(
[/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $1 (); below. */
# AC_LANG_BOOL_COMPILE_TRY(C)(PROLOGUE, EXPRESSION)
# -------------------------------------------------
-define([AC_LANG_BOOL_COMPILE_TRY(C)],
+m4_define([AC_LANG_BOOL_COMPILE_TRY(C)],
[AC_LANG_PROGRAM([$1], [int _array_ @<:@1 - 2 * !($2)@:>@])])
# -----------------------------------------
# We need `stdio.h' to open a `FILE', so the prologue defaults to the
# inclusion of `stdio.h'.
-define([AC_LANG_INT_SAVE(C)],
+m4_define([AC_LANG_INT_SAVE(C)],
[AC_LANG_PROGRAM([m4_default([$1], [@%:@include "stdio.h"])],
[FILE *f = fopen ("conftestval", "w");
if (!f)
# AC_LANG_SOURCE(C++)(BODY)
# -------------------------
-define([AC_LANG_SOURCE(C++)],
+m4_define([AC_LANG_SOURCE(C++)],
[#line __oline__ "configure"
#include "confdefs.h"
#ifdef __cplusplus
# AC_LANG_PROGRAM(C++)([PROLOGUE], [BODY])
# ----------------------------------------
# Same as C.
-define([AC_LANG_PROGRAM(C++)], m4_defn([AC_LANG_PROGRAM(C)]))
+m4_define([AC_LANG_PROGRAM(C++)], m4_defn([AC_LANG_PROGRAM(C)]))
# AC_LANG_CALL(C++)(PROLOGUE, FUNCTION)
# -------------------------------------
# Same as C.
-define([AC_LANG_CALL(C++)], m4_defn([AC_LANG_CALL(C)]))
+m4_define([AC_LANG_CALL(C++)], m4_defn([AC_LANG_CALL(C)]))
# AC_LANG_FUNC_LINK_TRY(C++)(FUNCTION)
# ------------------------------------
# Same as C.
-define([AC_LANG_FUNC_LINK_TRY(C++)], m4_defn([AC_LANG_FUNC_LINK_TRY(C)]))
+m4_define([AC_LANG_FUNC_LINK_TRY(C++)], m4_defn([AC_LANG_FUNC_LINK_TRY(C)]))
# AC_LANG_BOOL_COMPILE_TRY(C++)(PROLOGUE, EXPRESSION)
# ---------------------------------------------------
# Same as C.
-define([AC_LANG_BOOL_COMPILE_TRY(C++)], m4_defn([AC_LANG_BOOL_COMPILE_TRY(C)]))
+m4_define([AC_LANG_BOOL_COMPILE_TRY(C++)], m4_defn([AC_LANG_BOOL_COMPILE_TRY(C)]))
# AC_LANG_INT_SAVE(C++)(PROLOGUE, EXPRESSION)
# -------------------------------------------
# Same as C.
-define([AC_LANG_INT_SAVE(C++)], m4_defn([AC_LANG_INT_SAVE(C)]))
+m4_define([AC_LANG_INT_SAVE(C++)], m4_defn([AC_LANG_INT_SAVE(C)]))
# FIXME: Apparently, according to former AC_TRY_COMPILER, the CPP
# directives must not be included. But AC_TRY_RUN_NATIVE was not
# avoiding them, so?
-define([AC_LANG_SOURCE(Fortran 77)],
+m4_define([AC_LANG_SOURCE(Fortran 77)],
[$1])
# AC_LANG_PROGRAM(Fortran 77)([PROLOGUE], [BODY])
# -----------------------------------------------
# Yes, we discard the PROLOGUE.
-define([AC_LANG_PROGRAM(Fortran 77)],
+m4_define([AC_LANG_PROGRAM(Fortran 77)],
[ program main
$2
end])
# AC_LANG_CALL(Fortran 77)(PROLOGUE, FUNCTION)
# --------------------------------------------
# FIXME: This is a guess, help!
-define([AC_LANG_CALL(Fortran 77)],
+m4_define([AC_LANG_CALL(Fortran 77)],
[AC_LANG_PROGRAM([$1],
[ call $2])])
# Find a compiler for the current LANG. Note that because we might
# AC_REQUIRE `AC_LANG_COMPILER(C)' for instance, the latter must be
# AC_DEFUN'd, not just define'd.
-define([AC_LANG_COMPILER],
+m4_define([AC_LANG_COMPILER],
[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
# _AC_LANG_COMPILER_WORKS
# -----------------------
-define([_AC_LANG_COMPILER_WORKS],
+m4_define([_AC_LANG_COMPILER_WORKS],
[AC_MSG_CHECKING([whether the _AC_LANG compiler works])
_AC_LINK_IFELSE([AC_LANG_PROGRAM()],
[# FIXME: these cross compiler hacks should be removed for autoconf 3.0
# _AC_LANG_COMPILER_GNU
# ---------------------
# Check whether the compiler for the current language is GNU.
-define([_AC_LANG_COMPILER_GNU],
+m4_define([_AC_LANG_COMPILER_GNU],
[AC_CACHE_CHECK([whether we are using the GNU _AC_LANG compiler],
[ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu],
[_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifndef __GNUC__
AC_BEFORE([$0], [_AC_LANG_COMPILER_WORKS])
AC_BEFORE([$0], [_AC_EXEEXT])
-define([_AC_LANG_COMPILER_WORKS], [cross_compiling=maybe])
+m4_define([_AC_LANG_COMPILER_WORKS], [cross_compiling=maybe])
-define([_AC_EXEEXT], [EXEEXT=])
+m4_define([_AC_EXEEXT], [EXEEXT=])
-define([AC_LINK_IFELSE],
+m4_define([AC_LINK_IFELSE],
[AC_FATAL([All the tests involving linking were disabled by $0])])
m4_divert_pop()dnl
# Check whether -g works, even if CFLAGS is set, in case the package
# plays around with CFLAGS (such as to build both debugging and normal
# versions of a library), tasteless as that idea is.
-define([_AC_PROG_CC_G],
+m4_define([_AC_PROG_CC_G],
[ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
CFLAGS="-g"
# Check whether -g works, even if CXXFLAGS is set, in case the package
# plays around with CXXFLAGS (such as to build both debugging and
# normal versions of a library), tasteless as that idea is.
-define([_AC_PROG_CXX_G],
+m4_define([_AC_PROG_CXX_G],
[ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="-g"
# Check whether -g works, even if FFLAGS is set, in case the package
# plays around with FFLAGS (such as to build both debugging and normal
# versions of a library), tasteless as that idea is.
-define([_AC_PROG_F77_G],
+m4_define([_AC_PROG_F77_G],
[ac_test_FFLAGS=${FFLAGS+set}
ac_save_FFLAGS=$FFLAGS
FFLAGS=
# ------------------------------------------------------------
# Expand into IF-LANG1 if the current language is LANG1 etc. else
# into default.
-define([AC_LANG_CASE],
+m4_define([AC_LANG_CASE],
[m4_case(_AC_LANG, $@)])
# ------------------------------------
# Call the specialization of MACRO for LANG with ARGS. Complain if
# unavailable.
-define([_AC_LANG_DISPATCH],
+m4_define([_AC_LANG_DISPATCH],
[ifdef([$1($2)],
[m4_indir([$1($2)], m4_shiftn(2, $@))],
[AC_FATAL([$1: unknown language: $2])])])
# If you add quotes here, they will be part of the name too, yielding
# `AC_LANG([C])' for instance, which does not exist.
AC_DEFUN([AC_LANG],
-[define([_AC_LANG], [$1])dnl
+[m4_define([_AC_LANG], [$1])dnl
_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
# AC_LANG_PUSH(LANG)
# ------------------
# Save the current language, and use LANG.
-define([AC_LANG_PUSH],
+m4_define([AC_LANG_PUSH],
[m4_pushdef([_AC_LANG])dnl
AC_LANG([$1])])
# AC_LANG_POP
# -----------
# Restore the previous language.
-define([AC_LANG_POP],
+m4_define([AC_LANG_POP],
[m4_popdef([_AC_LANG])dnl
ifelse(_AC_LANG, [_AC_LANG],
[AC_FATAL([too many $0])])dnl
# ---------------
# Return a short signature of _AC_LANG which can be used in shell
# variable names, or in M4 macro names.
-define([_AC_LANG_ABBREV],
+m4_define([_AC_LANG_ABBREV],
[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
# AC_LANG(C)
# ----------
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-define([AC_LANG(C)],
+m4_define([AC_LANG(C)],
[ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
# _AC_LANG_ABBREV(C)
# ------------------
-define([_AC_LANG_ABBREV(C)], [c])
+m4_define([_AC_LANG_ABBREV(C)], [c])
# ---------------------- #
# AC_LANG(C++)
# ------------
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-define([AC_LANG(C++)],
+m4_define([AC_LANG(C++)],
[ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
# _AC_LANG_ABBREV(C++)
# --------------------
-define([_AC_LANG_ABBREV(C++)], [cxx])
+m4_define([_AC_LANG_ABBREV(C++)], [cxx])
# ----------------------------- #
# AC_LANG(Fortran 77)
# -------------------
-define([AC_LANG(Fortran 77)],
+m4_define([AC_LANG(Fortran 77)],
[ac_ext=f
ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${F77-f77} -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
# _AC_LANG_ABBREV(Fortran 77)
# ---------------------------
-define([_AC_LANG_ABBREV(Fortran 77)], [f77])
+m4_define([_AC_LANG_ABBREV(Fortran 77)], [f77])
# AC_LANG_CONFTEST(BODY)
# ----------------------
# Save the BODY in `conftest.$ac_ext'. Add a trailing new line.
-define([AC_LANG_CONFTEST],
+m4_define([AC_LANG_CONFTEST],
[cat >conftest.$ac_ext <<_ACEOF
$1
_ACEOF])
# -----------------------
# This sometimes fails to find confdefs.h, for some reason.
# #line __oline__ "$[0]"
-define([AC_LANG_SOURCE(C)],
+m4_define([AC_LANG_SOURCE(C)],
[#line __oline__ "configure"
#include "confdefs.h"
$1])
# AC_LANG_PROGRAM(C)([PROLOGUE], [BODY])
# --------------------------------------
-define([AC_LANG_PROGRAM(C)],
+m4_define([AC_LANG_PROGRAM(C)],
[$1
int
main ()
# AC_LANG_CALL(C)(PROLOGUE, FUNCTION)
# -----------------------------------
# Avoid conflicting decl of main.
-define([AC_LANG_CALL(C)],
+m4_define([AC_LANG_CALL(C)],
[AC_LANG_PROGRAM([$1
ifelse([$2], [main], ,
[/* Override any gcc2 internal prototype to avoid an error. */
# Don't include <ctype.h> because on OSF/1 3.0 it includes
# <sys/types.h> which includes <sys/select.h> which contains a
# prototype for select. Similarly for bzero.
-define([AC_LANG_FUNC_LINK_TRY(C)],
+m4_define([AC_LANG_FUNC_LINK_TRY(C)],
[AC_LANG_PROGRAM(
[/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $1 (); below. */
# AC_LANG_BOOL_COMPILE_TRY(C)(PROLOGUE, EXPRESSION)
# -------------------------------------------------
-define([AC_LANG_BOOL_COMPILE_TRY(C)],
+m4_define([AC_LANG_BOOL_COMPILE_TRY(C)],
[AC_LANG_PROGRAM([$1], [int _array_ @<:@1 - 2 * !($2)@:>@])])
# -----------------------------------------
# We need `stdio.h' to open a `FILE', so the prologue defaults to the
# inclusion of `stdio.h'.
-define([AC_LANG_INT_SAVE(C)],
+m4_define([AC_LANG_INT_SAVE(C)],
[AC_LANG_PROGRAM([m4_default([$1], [@%:@include "stdio.h"])],
[FILE *f = fopen ("conftestval", "w");
if (!f)
# AC_LANG_SOURCE(C++)(BODY)
# -------------------------
-define([AC_LANG_SOURCE(C++)],
+m4_define([AC_LANG_SOURCE(C++)],
[#line __oline__ "configure"
#include "confdefs.h"
#ifdef __cplusplus
# AC_LANG_PROGRAM(C++)([PROLOGUE], [BODY])
# ----------------------------------------
# Same as C.
-define([AC_LANG_PROGRAM(C++)], m4_defn([AC_LANG_PROGRAM(C)]))
+m4_define([AC_LANG_PROGRAM(C++)], m4_defn([AC_LANG_PROGRAM(C)]))
# AC_LANG_CALL(C++)(PROLOGUE, FUNCTION)
# -------------------------------------
# Same as C.
-define([AC_LANG_CALL(C++)], m4_defn([AC_LANG_CALL(C)]))
+m4_define([AC_LANG_CALL(C++)], m4_defn([AC_LANG_CALL(C)]))
# AC_LANG_FUNC_LINK_TRY(C++)(FUNCTION)
# ------------------------------------
# Same as C.
-define([AC_LANG_FUNC_LINK_TRY(C++)], m4_defn([AC_LANG_FUNC_LINK_TRY(C)]))
+m4_define([AC_LANG_FUNC_LINK_TRY(C++)], m4_defn([AC_LANG_FUNC_LINK_TRY(C)]))
# AC_LANG_BOOL_COMPILE_TRY(C++)(PROLOGUE, EXPRESSION)
# ---------------------------------------------------
# Same as C.
-define([AC_LANG_BOOL_COMPILE_TRY(C++)], m4_defn([AC_LANG_BOOL_COMPILE_TRY(C)]))
+m4_define([AC_LANG_BOOL_COMPILE_TRY(C++)], m4_defn([AC_LANG_BOOL_COMPILE_TRY(C)]))
# AC_LANG_INT_SAVE(C++)(PROLOGUE, EXPRESSION)
# -------------------------------------------
# Same as C.
-define([AC_LANG_INT_SAVE(C++)], m4_defn([AC_LANG_INT_SAVE(C)]))
+m4_define([AC_LANG_INT_SAVE(C++)], m4_defn([AC_LANG_INT_SAVE(C)]))
# FIXME: Apparently, according to former AC_TRY_COMPILER, the CPP
# directives must not be included. But AC_TRY_RUN_NATIVE was not
# avoiding them, so?
-define([AC_LANG_SOURCE(Fortran 77)],
+m4_define([AC_LANG_SOURCE(Fortran 77)],
[$1])
# AC_LANG_PROGRAM(Fortran 77)([PROLOGUE], [BODY])
# -----------------------------------------------
# Yes, we discard the PROLOGUE.
-define([AC_LANG_PROGRAM(Fortran 77)],
+m4_define([AC_LANG_PROGRAM(Fortran 77)],
[ program main
$2
end])
# AC_LANG_CALL(Fortran 77)(PROLOGUE, FUNCTION)
# --------------------------------------------
# FIXME: This is a guess, help!
-define([AC_LANG_CALL(Fortran 77)],
+m4_define([AC_LANG_CALL(Fortran 77)],
[AC_LANG_PROGRAM([$1],
[ call $2])])
# Find a compiler for the current LANG. Note that because we might
# AC_REQUIRE `AC_LANG_COMPILER(C)' for instance, the latter must be
# AC_DEFUN'd, not just define'd.
-define([AC_LANG_COMPILER],
+m4_define([AC_LANG_COMPILER],
[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
# _AC_LANG_COMPILER_WORKS
# -----------------------
-define([_AC_LANG_COMPILER_WORKS],
+m4_define([_AC_LANG_COMPILER_WORKS],
[AC_MSG_CHECKING([whether the _AC_LANG compiler works])
_AC_LINK_IFELSE([AC_LANG_PROGRAM()],
[# FIXME: these cross compiler hacks should be removed for autoconf 3.0
# _AC_LANG_COMPILER_GNU
# ---------------------
# Check whether the compiler for the current language is GNU.
-define([_AC_LANG_COMPILER_GNU],
+m4_define([_AC_LANG_COMPILER_GNU],
[AC_CACHE_CHECK([whether we are using the GNU _AC_LANG compiler],
[ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu],
[_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifndef __GNUC__
AC_BEFORE([$0], [_AC_LANG_COMPILER_WORKS])
AC_BEFORE([$0], [_AC_EXEEXT])
-define([_AC_LANG_COMPILER_WORKS], [cross_compiling=maybe])
+m4_define([_AC_LANG_COMPILER_WORKS], [cross_compiling=maybe])
-define([_AC_EXEEXT], [EXEEXT=])
+m4_define([_AC_EXEEXT], [EXEEXT=])
-define([AC_LINK_IFELSE],
+m4_define([AC_LINK_IFELSE],
[AC_FATAL([All the tests involving linking were disabled by $0])])
m4_divert_pop()dnl
# Check whether -g works, even if CFLAGS is set, in case the package
# plays around with CFLAGS (such as to build both debugging and normal
# versions of a library), tasteless as that idea is.
-define([_AC_PROG_CC_G],
+m4_define([_AC_PROG_CC_G],
[ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
CFLAGS="-g"
# Check whether -g works, even if CXXFLAGS is set, in case the package
# plays around with CXXFLAGS (such as to build both debugging and
# normal versions of a library), tasteless as that idea is.
-define([_AC_PROG_CXX_G],
+m4_define([_AC_PROG_CXX_G],
[ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="-g"
# Check whether -g works, even if FFLAGS is set, in case the package
# plays around with FFLAGS (such as to build both debugging and normal
# versions of a library), tasteless as that idea is.
-define([_AC_PROG_F77_G],
+m4_define([_AC_PROG_F77_G],
[ac_test_FFLAGS=${FFLAGS+set}
ac_save_FFLAGS=$FFLAGS
FFLAGS=
# Set up the LIBOBJ replacement of `alloca'. Well, not exactly
# AC_LIBOBJ since we actually set the output variable `ALLOCA'.
# Nevertheless, for Automake, AC_LIBOBJ_DECL it.
-define([_AC_LIBOBJ_ALLOCA],
+m4_define([_AC_LIBOBJ_ALLOCA],
[# The SVR3 libPW and SVR4 libucb both contain incompatible functions
# that cause trouble. Some versions do not even contain alloca or
# contain a buggy version. If you still want to use their alloca,
# _AC_LIBOBJ_GETLOADAVG
# ---------------------
# Set up the AC_LIBOBJ replacement of `getloadavg'.
-define([_AC_LIBOBJ_GETLOADAVG],
+m4_define([_AC_LIBOBJ_GETLOADAVG],
[AC_LIBOBJ(getloadavg)
AC_DEFINE(C_GETLOADAVG, 1, [Define if using `getloadavg.c'.])
# Figure out what our getloadavg.c needs.
# If it does, then define HAVE_STAT_EMPTY_STRING_BUG (or
# HAVE_LSTAT_EMPTY_STRING_BUG) and arrange to compile the wrapper
# function.
-define([_AC_FUNC_STAT],
+m4_define([_AC_FUNC_STAT],
[AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])dnl
AC_CACHE_CHECK([whether $1 accepts an empty string],
[ac_cv_func_$1_empty_string_bug],
# _AC_LIBOBJ_STRTOD
# -----------------
-define([_AC_LIBOBJ_STRTOD],
+m4_define([_AC_LIBOBJ_STRTOD],
[AC_LIBOBJ(strtod)
AC_CHECK_FUNC(pow)
if test $ac_cv_func_pow = no; then
# DIVERSION-NAME which is supposed to be an actual diversion number.
# Of course it would be nicer to use m4_case here, instead of zillions
# of little macros, but it then takes twice longer to run `autoconf'!
-define([_m4_divert(KILL)], -1)
+m4_define([_m4_divert(KILL)], -1)
-define([_m4_divert(BINSH)], 0)
-define([_m4_divert(REVISION)], 1)
-define([_m4_divert(NOTICE)], 2)
-define([_m4_divert(DEFAULTS)], 3)
-define([_m4_divert(PARSE_ARGS)], 4)
+m4_define([_m4_divert(BINSH)], 0)
+m4_define([_m4_divert(REVISION)], 1)
+m4_define([_m4_divert(NOTICE)], 2)
+m4_define([_m4_divert(DEFAULTS)], 3)
+m4_define([_m4_divert(PARSE_ARGS)], 4)
-define([_m4_divert(HELP_BEGIN)], 10)
-define([_m4_divert(HELP_CANON)], 11)
-define([_m4_divert(HELP_ENABLE)], 12)
-define([_m4_divert(HELP_WITH)], 13)
-define([_m4_divert(HELP_VAR)], 14)
-define([_m4_divert(HELP_VAR_END)], 15)
-define([_m4_divert(HELP_END)], 16)
+m4_define([_m4_divert(HELP_BEGIN)], 10)
+m4_define([_m4_divert(HELP_CANON)], 11)
+m4_define([_m4_divert(HELP_ENABLE)], 12)
+m4_define([_m4_divert(HELP_WITH)], 13)
+m4_define([_m4_divert(HELP_VAR)], 14)
+m4_define([_m4_divert(HELP_VAR_END)], 15)
+m4_define([_m4_divert(HELP_END)], 16)
-define([_m4_divert(VERSION_BEGIN)], 20)
-define([_m4_divert(VERSION_END)], 21)
+m4_define([_m4_divert(VERSION_BEGIN)], 20)
+m4_define([_m4_divert(VERSION_END)], 21)
-define([_m4_divert(INIT_PREPARE)], 30)
+m4_define([_m4_divert(INIT_PREPARE)], 30)
-define([_m4_divert(BODY)], 40)
+m4_define([_m4_divert(BODY)], 40)
-define([_m4_divert(PREPARE)], 100)
+m4_define([_m4_divert(PREPARE)], 100)
# ---------------------------------------
# Output once CONTENT into DIVERSION-NAME (which may be a number
# actually). An end of line is appended for free to CONTENT.
-define([AC_DIVERT_ONCE],
+m4_define([AC_DIVERT_ONCE],
[AC_EXPAND_ONCE([m4_divert([$1], [$2])])])
# AC_DIVERT_PUSH(DIVERSION-NAME)
# ------------------------------
-define([AC_DIVERT_PUSH],
+m4_define([AC_DIVERT_PUSH],
[m4_divert_push($@)])
# AC_DIVERT_POP
# -------------
-define([AC_DIVERT_POP],
+m4_define([AC_DIVERT_POP],
[m4_divert_pop($@)])
# Initialize the diversion setup.
-define([_m4_divert_diversion], _m4_divert([BODY]))
+m4_define([_m4_divert_diversion], _m4_divert([BODY]))
# Throw away output until AC_INIT is called.
m4_pushdef([_m4_divert_diversion], _m4_divert([KILL]))
# macros. We don't use this macro to define some frequently called
# macros that are not involved in ordering constraints, to save m4
# processing.
-define([AC_DEFUN],
+m4_define([AC_DEFUN],
[m4_defun([$1], [$2[]AC_PROVIDE([$1])])])
# ------------------------------
# As AC_DEFUN, but issues the EXPANSION only once, and warns if used
# several times.
-define([AC_DEFUN_ONCE],
+m4_define([AC_DEFUN_ONCE],
[m4_defun_once([$1], [$2[]AC_PROVIDE([$1])])])
# AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION])
# ------------------------------------------
-define([AC_OBSOLETE],
+m4_define([AC_OBSOLETE],
[AC_DIAGNOSE([obsolete], [$1 is obsolete$2])])
# AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
# ---------------------------------------------
-define([AC_BEFORE],
+m4_define([AC_BEFORE],
[AC_PROVIDE_IFELSE([$2], [AC_DIAGNOSE([syntax], [$2 was called before $1])])])
# such as `C' should dispatch the call to `AC_LANG_COMPILER(C)'. But this
# `extension' prevents `AC_LANG_COMPILER' from having actual arguments that
# it passes to `AC_LANG_COMPILER(C)'.
-define([_AC_REQUIRE],
+m4_define([_AC_REQUIRE],
[_m4_require($@)])
# AC_REQUIRE(STRING)
# ------------------
# If STRING has never been AC_PROVIDE'd, then expand it.
-define([AC_REQUIRE],
+m4_define([AC_REQUIRE],
[m4_require($@)])
# AC_EXPAND_ONCE(TEXT)
# --------------------
# If TEXT has never been expanded, expand it *here*.
-define([AC_EXPAND_ONCE],
+m4_define([AC_EXPAND_ONCE],
[m4_expand_once([$1],
[],
[AC_PROVIDE([$1])[]$1])])
# ----------------------
# Ideally we should use `AC_PROVIDE($1)', but unfortunately many third
# party macros know that we use `AC_PROVIDE_$1' and they depend on it.
-define([AC_PROVIDE],
-[define([AC_PROVIDE_$1])])
+m4_define([AC_PROVIDE],
+[m4_define([AC_PROVIDE_$1])])
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
# 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],
+m4_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],
+m4_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],
+m4_define([AU_DEFUN],
[AU_DEFINE([$1],
[AC_DIAGNOSE([obsolete], [The macro `$1' is obsolete.
You should run autoupdate.])dnl
#
# Do not use `defn' since then autoupdate would replace an old macro
# call with the new macro body instead of the new macro call.
-define([AU_ALIAS],
+m4_define([AU_ALIAS],
[AU_DEFUN([$1], [$2($][@)])])
# --------------------
# Pass TEXT to autoheader.
# This macro is `read' only via `autoconf --trace', it outputs nothing.
-define([AH_OUTPUT], [])
+m4_define([AH_OUTPUT], [])
# AH_VERBATIM(KEY, TEMPLATE)
# may occur if there is AC_CHECK_FUNCS($my_func)), issue an autoheader
# TEMPLATE associated to the KEY. Otherwise, do nothing. TEMPLATE is
# output as is, with no formating.
-define([AH_VERBATIM],
+m4_define([AH_VERBATIM],
[AC_VAR_INDIR_IFELSE([$1],,
[AH_OUTPUT([$1], _AC_SH_QUOTE([[$2]]))])
])
# -----------------------------
# Issue an autoheader template for KEY, i.e., a comment composed of
# DESCRIPTION (properly wrapped), and then #undef KEY.
-define([AH_TEMPLATE],
+m4_define([AH_TEMPLATE],
[AH_VERBATIM([$1],
m4_text_wrap([$2 */], [ ], [/* ])[
#undef $1])])
# AH_TOP(TEXT)
# ------------
# Output TEXT at the top of `config.h.in'.
-define([AH_TOP],
-[define([_AH_COUNTER], m4_incr(_AH_COUNTER))dnl
+m4_define([AH_TOP],
+[m4_define([_AH_COUNTER], m4_incr(_AH_COUNTER))dnl
AH_VERBATIM([0000]_AH_COUNTER, [$1])])
# AH_BOTTOM(TEXT)
# ---------------
# Output TEXT at the bottom of `config.h.in'.
-define([AH_BOTTOM],
-[define([_AH_COUNTER], m4_incr(_AH_COUNTER))dnl
+m4_define([AH_BOTTOM],
+[m4_define([_AH_COUNTER], m4_incr(_AH_COUNTER))dnl
AH_VERBATIM([zzzz]_AH_COUNTER, [$1])])
# Initialize.
-define([_AH_COUNTER], [0])
+m4_define([_AH_COUNTER], [0])
# -------------------------------------------------------
# If EXPRESSION has shell indirections ($var or `expr`), expand
# IF-INDIR, else IF-NOT-INDIR.
-define([AC_VAR_INDIR_IFELSE],
+m4_define([AC_VAR_INDIR_IFELSE],
[ifelse(m4_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],
+m4_define([AC_VAR_SET],
[AC_VAR_INDIR_IFELSE([$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],
+m4_define([AC_VAR_GET],
[AC_VAR_INDIR_IFELSE([$1],
[`eval echo '${'m4_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],
+m4_define([AC_VAR_TEST_SET],
[AC_VAR_INDIR_IFELSE([$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_SET_IFELSE],
+m4_define([AC_VAR_SET_IFELSE],
[AS_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],
+m4_define([AC_VAR_PUSHDEF],
[AC_VAR_INDIR_IFELSE([$2],
[ac_$1=AC_TR_SH($2)
m4_pushdef([$1], [$ac_[$1]])],
# AC_VAR_POPDEF(VARNAME)
# ----------------------
# Free the shell variable accessor VARNAME. To be dnl'ed.
-define([AC_VAR_POPDEF],
+m4_define([AC_VAR_POPDEF],
[m4_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],
+m4_define([AC_TR_CPP],
[AC_VAR_INDIR_IFELSE([$1],
[`echo "$1" | $ac_tr_cpp`],
[m4_patsubst(m4_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],
+m4_define([AC_TR_SH],
[AC_VAR_INDIR_IFELSE([$1],
[`echo "$1" | $ac_tr_sh`],
[m4_patsubst(m4_translit([[$1]], [*+], [pp]),
# b act\
# ive ], [-Var-])end
# => -active--b--active-end
-define([AC_FOREACH],
+m4_define([AC_FOREACH],
[m4_foreach([$1], m4_split(m4_strip(m4_join([$2]))), [$3])])
# | column 2 |
# column 0 column 26
#
-define([AC_HELP_STRING],
+m4_define([AC_HELP_STRING],
[m4_pushdef([AC_Prefix], m4_default([$3], [ ]))dnl
m4_pushdef([AC_Prefix_Format],
[ %-]m4_eval(m4_len(AC_Prefix) - 3)[s ])dnl [ %-23s ]
# _AC_INIT_PACKAGE(PACKAGE, VERSION, [BUG-REPORT])
# ------------------------------------------------
-define([_AC_INIT_PACKAGE],
-[define([AC_PACKAGE_NAME], [$1])dnl
-define([AC_PACKAGE_VERSION], [$2])dnl
-define([AC_PACKAGE_STRING], [$1 $2])dnl
-define([AC_PACKAGE_BUGREPORT], [$3])dnl
+m4_define([_AC_INIT_PACKAGE],
+[m4_define([AC_PACKAGE_NAME], [$1])dnl
+m4_define([AC_PACKAGE_VERSION], [$2])dnl
+m4_define([AC_PACKAGE_STRING], [$1 $2])dnl
+m4_define([AC_PACKAGE_BUGREPORT], [$3])dnl
])
# would have be to use m4_quote to force an evaluation:
#
# m4_patsubst(m4_quote($1), [^], [# ])
-define([AC_COPYRIGHT],
+m4_define([AC_COPYRIGHT],
[m4_divert([NOTICE],
[m4_patsubst([
$1], [^], [@%:@ ])])dnl
# --------------------------
# The second quote in the translit is just to cope with font-lock-mode
# which sees the opening of a string.
-define([AC_REVISION],
+m4_define([AC_REVISION],
[m4_divert([REVISION],
[@%:@ From configure.in m4_translit([$1], $"").])dnl
])
# AC_PREREQ(VERSION)
# ------------------
# Complain and exit if the Autoconf version is less than VERSION.
-define([AC_PREREQ],
+m4_define([AC_PREREQ],
[ifelse(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1,
[AC_FATAL([Autoconf version $1 or higher is required for this script])])])
# _AC_INIT_NOTICE
# ---------------
-define([_AC_INIT_NOTICE],
+m4_define([_AC_INIT_NOTICE],
[m4_divert([NOTICE],
[@%:@ Guess values for system-dependent variables and create Makefiles.
@%:@ Generated by Autoconf AC_ACVERSION[]dnl
# _AC_INIT_COPYRIGHT
# ------------------
-define([_AC_INIT_COPYRIGHT],
+m4_define([_AC_INIT_COPYRIGHT],
[AC_COPYRIGHT(
[Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000
Free Software Foundation, Inc.
# _AC_INIT_DEFAULTS_ENVIRONMENT
# -----------------------------
# Tune the behavior of the shell.
-define([_AC_INIT_DEFAULTS_ENVIRONMENT],
+m4_define([_AC_INIT_DEFAULTS_ENVIRONMENT],
[# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
# ---------------------
# Set up the file descriptors used by `configure'.
-define([AC_FD_MSG], 6)
-define([AC_FD_LOG], 5)
+m4_define([AC_FD_MSG], 6)
+m4_define([AC_FD_LOG], 5)
# That's how it used to be named.
AU_ALIAS([AC_FD_CC], [AC_FD_LOG])
-define([_AC_INIT_DEFAULTS_FDS],
+m4_define([_AC_INIT_DEFAULTS_FDS],
[# File descriptor usage:
# 0 standard input
# 1 file creation
# _AC_INIT_DEFAULTS
# -----------------
# Values which defaults can be set from `configure.in'.
-define([_AC_INIT_DEFAULTS],
+m4_define([_AC_INIT_DEFAULTS],
[m4_divert_push([DEFAULTS])dnl
_AC_INIT_DEFAULTS_ENVIRONMENT
# _AC_INIT_SRCDIR
# ---------------
# Compute `srcdir' based on `$ac_unique_file'.
-define([_AC_INIT_SRCDIR],
+m4_define([_AC_INIT_SRCDIR],
[m4_divert_push([PARSE_ARGS])dnl
# Find the source files, if location was not specified.
# _AC_INIT_PARSE_ARGS
# -------------------
-define([_AC_INIT_PARSE_ARGS],
+m4_define([_AC_INIT_PARSE_ARGS],
[m4_divert_push([PARSE_ARGS])dnl
# Initialize some variables set by options.
# _AC_INIT_HELP
# -------------
# Handle the `configure --help' message.
-define([_AC_INIT_HELP],
+m4_define([_AC_INIT_HELP],
[m4_divert_push([HELP_BEGIN])dnl
#
# _AC_INIT_VERSION
# ----------------
# Handle the `configure --version' message.
-define([_AC_INIT_VERSION],
+m4_define([_AC_INIT_VERSION],
[m4_divert([VERSION_BEGIN],
[if $ac_init_version; then
cat <<\EOF])dnl
# 3. Remember the options given to `configure' for `config.status --recheck'.
# 4. Ensure a correct environment
# 5. Required macros (cache, default AC_SUBST etc.)
-define([_AC_INIT_PREPARE],
+m4_define([_AC_INIT_PREPARE],
[m4_divert_push([INIT_PREPARE])dnl
# Keep a trace of the command line.
# preamble of the `configure' script.
# Note that the order is important: first initialize, then set the
# AC_CONFIG_SRCDIR.
-define([AC_INIT],
+m4_define([AC_INIT],
[ifval([$2], [_AC_INIT_PACKAGE($@)])dnl
m4_divert([BINSH], [@%:@! /bin/sh])
_AC_INIT_DEFAULTS()dnl
# Simulate AC_INIT, i.e., pretend this is the beginning of the `configure'
# generation. This is used by some tests, and let `autoconf' be used to
# generate other scripts than `configure'.
-define([AC_PLAIN_SCRIPT],
+m4_define([AC_PLAIN_SCRIPT],
[m4_divert_pop()])
#
# In subsequent runs, after having loaded the cache, compare
# ac_cv_env_foo against ac_env_foo. See _AC_ARG_VAR_VALIDATE.
-define([_AC_ARG_VAR_PRECIOUS],
+m4_define([_AC_ARG_VAR_PRECIOUS],
[AC_DIVERT_ONCE([PARSE_ARGS],
[ac_env_$1_set=${$1+set}
ac_env_$1_value=$$1
# _AC_ARG_VAR_VALIDATE
# --------------------
-define([_AC_ARG_VAR_VALIDATE],
+m4_define([_AC_ARG_VAR_VALIDATE],
[# Check that the precious variables saved in the cache have kept the same
# value.
ac_suggest_removing_cache=false
# _AC_CANONICAL_SPLIT(THING)
# --------------------------
# Generate the variables THING, THING_{alias cpu vendor os}.
-define([_AC_CANONICAL_SPLIT],
+m4_define([_AC_CANONICAL_SPLIT],
[AC_SUBST([$1], [$ac_cv_$1])dnl
dnl FIXME: AC_SUBST([$1_alias], [$ac_cv_$1_alias])dnl
AC_SUBST([$1_cpu],
# AC_SITE_LOAD
# ------------
# Look for site or system specific initialization scripts.
-define([AC_SITE_LOAD],
+m4_define([AC_SITE_LOAD],
[# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
# AC_CACHE_LOAD
# -------------
-define([AC_CACHE_LOAD],
+m4_define([AC_CACHE_LOAD],
[if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special
# files actually), so we avoid doing that.
# _AC_CACHE_DUMP
# --------------
# Dump the cache to stdout. It can be in a pipe (this is a requirement).
-define([_AC_CACHE_DUMP],
+m4_define([_AC_CACHE_DUMP],
[# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# -------------
# Save the cache.
# Allow a site initialization script to override cache values.
-define([AC_CACHE_SAVE],
+m4_define([AC_CACHE_SAVE],
[cat >confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# ------------------------------------------
# The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
# Should be dnl'ed. Try to catch common mistakes.
-define([AC_CACHE_VAL],
+m4_define([AC_CACHE_VAL],
[ifelse(m4_regexp([$2], [AC_DEFINE]), [-1], [],
[AC_DIAGNOSE(syntax,
[$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
# AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
# -------------------------------------------
# Do not call this macro with a dnl right behind.
-define([AC_CACHE_CHECK],
+m4_define([AC_CACHE_CHECK],
[AC_MSG_CHECKING([$1])
AC_CACHE_VAL([$2], [$3])dnl
AC_MSG_RESULT_UNQUOTED(AC_VAR_GET([$2]))])
# -------------------------------------------
# This macro is useless, it is used only with --trace to collect the
# list of *literals* CPP values passed to AC_DEFINE/AC_DEFINE_UNQUOTED.
-define([AC_DEFINE_TRACE_LITERAL])
+m4_define([AC_DEFINE_TRACE_LITERAL])
# AC_DEFINE_TRACE(CPP-SYMBOL)
# ---------------------------
# This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters
# out non literal symbols.
-define([AC_DEFINE_TRACE],
+m4_define([AC_DEFINE_TRACE],
[AC_VAR_INDIR_IFELSE([$1], [], [AC_DEFINE_TRACE_LITERAL([$1])])])
# 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],
+m4_define([AC_DEFINE],
[AC_DEFINE_TRACE([$1])dnl
ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
cat >>confdefs.h <<\EOF
# AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION])
# ----------------------------------------------------
# Similar, but perform shell substitutions $ ` \ once on VALUE.
-define([AC_DEFINE_UNQUOTED],
+m4_define([AC_DEFINE_UNQUOTED],
[AC_DEFINE_TRACE([$1])dnl
ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
cat >>confdefs.h <<EOF
# ----------------------------
# If VARIABLE has not already been AC_SUBST'ed, append the sed PROGRAM
# to `_AC_SUBST_SED_PROGRAM'.
-define([_AC_SUBST],
+m4_define([_AC_SUBST],
[AC_EXPAND_ONCE([m4_append([_AC_SUBST_SED_PROGRAM],
[$2
])])dnl
])
# Initialize.
-define([_AC_SUBST_SED_PROGRAM])
+m4_define([_AC_SUBST_SED_PROGRAM])
# AC_SUBST(VARIABLE, [VALUE])
#
# Beware that if you change this macro, you also have to change the
# sed script at the top of _AC_OUTPUT_FILES.
-define([AC_SUBST],
+m4_define([AC_SUBST],
[m4_ifvanl([$2], [$1=$2])[]dnl
_AC_SUBST([$1], [s,@$1@,[$]$1,;t t])dnl
])# AC_SUBST
# AC_SUBST_FILE(VARIABLE)
# -----------------------
# Read the comments of the preceding macro.
-define([AC_SUBST_FILE],
+m4_define([AC_SUBST_FILE],
[_AC_SUBST([$1], [/@$1@/r [$]$1
s,@$1@,,;t t])])
# ------------------------------
# Report a MESSAGE to the user of autoconf if `-W' or `-W all' was
# specified.
-define([AC_DIAGNOSE],
+m4_define([AC_DIAGNOSE],
[m4_warn($@)])
# -------------------
# Report a MESSAGE to the user of autoconf if `-W' or `-W all' was
# specified.
-define([AC_WARNING],
+m4_define([AC_WARNING],
[AC_DIAGNOSE([syntax], [$1])])
# AC_FATAL(MESSAGE, [EXIT-STATUS])
# --------------------------------
-define([AC_FATAL],
+m4_define([AC_FATAL],
[m4_fatal($@)])
# If STRING contains `\"' or `\`', it's old.
# Otherwise it's modern.
# We use two quotes in the pattern to keep highlighting tools at peace.
-define([_AC_SH_QUOTE_IFELSE],
+m4_define([_AC_SH_QUOTE_IFELSE],
[ifelse(m4_regexp([$1], [\\[\\$]]),
[-1], [ifelse(m4_regexp([$1], [\\[`""]]),
[-1], [$2],
# FIXME: In a distant future (2.51 or +), this warning should be
# classified as `syntax'. It is claissified as `obsolete' to ease
# the transition (for Libtool for instance).
-define([_AC_SH_QUOTE],
+m4_define([_AC_SH_QUOTE],
[_AC_SH_QUOTE_IFELSE([$1],
[m4_patsubst([$1], [\([`""]\)], [\\\1])],
[AC_DIAGNOSE([obsolete],
# _AC_ECHO_UNQUOTED(STRING, [FD = AC_FD_MSG])
# -------------------------------------------
# Perform shell expansions on STRING and echo the string to FD.
-define([_AC_ECHO_UNQUOTED],
+m4_define([_AC_ECHO_UNQUOTED],
[echo "$1" >&m4_default([$2], [AC_FD_MSG])])
# _AC_ECHO(STRING, [FD = AC_FD_MSG])
# ----------------------------------
# Protect STRING from backquote expansion, echo the result to FD.
-define([_AC_ECHO],
+m4_define([_AC_ECHO],
[_AC_ECHO_UNQUOTED([_AC_SH_QUOTE([$1])], $2)])
# _AC_ECHO_N(STRING, [FD = AC_FD_MSG])
# ------------------------------------
# Same as _AC_ECHO, but echo doesn't return to a new line.
-define([_AC_ECHO_N],
+m4_define([_AC_ECHO_N],
[echo $ECHO_N "_AC_SH_QUOTE([$1])$ECHO_C" >&m4_default([$2], [AC_FD_MSG])])
# AC_MSG_NOTICE(STRING)
# ---------------------
-define([AC_MSG_NOTICE],
+m4_define([AC_MSG_NOTICE],
[_AC_ECHO([configure:__oline__: notice: $1], AC_FD_LOG)
_AC_ECHO([$1])[]dnl
])
# AC_MSG_CHECKING(FEATURE)
# ------------------------
-define([AC_MSG_CHECKING],
+m4_define([AC_MSG_CHECKING],
[_AC_ECHO([configure:__oline__: checking $1], AC_FD_LOG)
_AC_ECHO_N([checking $1... ])[]dnl
])
# AC_MSG_RESULT(RESULT)
# ---------------------
-define([AC_MSG_RESULT],
+m4_define([AC_MSG_RESULT],
[_AC_ECHO([configure:__oline__: result: $1], AC_FD_LOG)
_AC_ECHO([${ECHO_T}$1])[]dnl
])
# AC_MSG_RESULT_UNQUOTED(RESULT)
# ------------------------------
# Likewise, but perform $ ` \ shell substitutions.
-define([AC_MSG_RESULT_UNQUOTED],
+m4_define([AC_MSG_RESULT_UNQUOTED],
[_AC_ECHO_UNQUOTED([configure:__oline__: result: $1], AC_FD_LOG)
_AC_ECHO_UNQUOTED([${ECHO_T}$1])[]dnl
])
# AC_MSG_WARN(PROBLEM)
# --------------------
-define([AC_MSG_WARN],
+m4_define([AC_MSG_WARN],
[{ _AC_ECHO([configure:__oline__: WARNING: $1], AC_FD_LOG)
_AC_ECHO([configure: WARNING: $1], 2); }])
# AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1])
# --------------------------------------
-define([AC_MSG_ERROR],
+m4_define([AC_MSG_ERROR],
[{ _AC_ECHO([configure:__oline__: error: $1], AC_FD_LOG)
_AC_ECHO([configure: error: $1], 2)
AS_EXIT([$2]); }])
# 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],
+m4_define([AC_INCLUDES_DEFAULT],
[ifelse([$1], [], [$ac_includes_default], [$1
])])
# POSIX.2 word splitting is done only on the output of word
# expansions, not every word. This closes a longstanding sh security
# hole.
-define([AC_SHELL_PATH_WALK],
+m4_define([AC_SHELL_PATH_WALK],
[ac_save_IFS=$IFS; IFS=':'
ac_dummy="m4_default([$1], [$PATH])"
for ac_dir in $ac_dummy; do
# AH_CHECK_LIB(LIBNAME)
# ---------------------
-define([AH_CHECK_LIB],
+m4_define([AH_CHECK_LIB],
[AH_TEMPLATE(AC_TR_CPP(HAVE_LIB$1),
[Define if you have the `]$1[' library (-l]$1[).])])
# ---------------------------------------------------------------------
# Try to compile PROGRAM.
# This macro can be used during the selection of a compiler.
-define([_AC_COMPILE_IFELSE],
+m4_define([_AC_COMPILE_IFELSE],
[m4_ifvanl([$1], [AC_LANG_CONFTEST([$1])])dnl
rm -f conftest.$ac_objext
if AC_TRY_EVAL(ac_compile) && test -s conftest.$ac_objext; then
# ------------------------------------------------------------------
# Try to link PROGRAM.
# This macro can be used during the selection of a compiler.
-define([_AC_LINK_IFELSE],
+m4_define([_AC_LINK_IFELSE],
[m4_ifvanl([$1], [AC_LANG_CONFTEST([$1])])dnl
rm -f conftest.$ac_objext conftest$ac_exeext
if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
# ------------------------------------------------------------
# Compile, link, and run.
# This macro can be used during the selection of a compiler.
-define([_AC_RUN_IFELSE],
+m4_define([_AC_RUN_IFELSE],
[m4_ifvanl([$1], [AC_LANG_CONFTEST([$1])])dnl
rm -f conftest$ac_exeext
if AC_TRY_EVAL(ac_link) &&
])# AC_CHECK_HEADER
-define([AH_CHECK_HEADERS],
+m4_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_LIBOBJ_DECL(FILENAME-NOEXT)
# ------------------------------
# Announce we might need the file `FILENAME-NOEXT.c'.
-define([AC_LIBOBJ_DECL], [])
+m4_define([AC_LIBOBJ_DECL], [])
# _AC_LIBOBJ(FILENAME-NOEXT, ACTION-IF-INDIR)
# -------------------------------------------
# We need `FILENAME-NOEXT.o', save this into `LIBOBJS'.
# We don't use AC_SUBST/2 because it forces an unneeded eol.
-define([_AC_LIBOBJ],
+m4_define([_AC_LIBOBJ],
[AC_VAR_INDIR_IFELSE([$1],
[$2],
[AC_LIBOBJ_DECL([$1])])dnl
# -------------------------
# We need `FILENAME-NOEXT.o', save this into `LIBOBJS'.
# We don't use AC_SUBST/2 because it forces an unneeded eol.
-define([AC_LIBOBJ],
+m4_define([AC_LIBOBJ],
[_AC_LIBOBJ([$1],
[AC_DIAGNOSE(syntax,
[$0($1): you should use literals])])dnl
# ---------------------------------------------------------
# Compute the integer EXPRESSION and store the result in the VARIABLE.
# Works OK if cross compiling.
-define([_AC_COMPUTE_INT_COMPILE],
+m4_define([_AC_COMPUTE_INT_COMPILE],
[# Depending upon the size, compute the lo and hi bounds.
AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= 0])],
[ac_lo=0 ac_try=0
# _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, [INCLUDES], [IF-FAILS])
# -----------------------------------------------------------------
# Store the evaluation of the integer EXPRESSION in VARIABLE.
-define([_AC_COMPUTE_INT_RUN],
+m4_define([_AC_COMPUTE_INT_RUN],
[AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])],
[$2=`cat conftestval`], [$4])])
# _AC_COMPUTE_INT(EXPRESSION, VARIABLE, INCLUDES, IF-FAILS)
# ---------------------------------------------------------
-define([_AC_COMPUTE_INT],
+m4_define([_AC_COMPUTE_INT],
[if test "$cross_compiling" = yes; then
_AC_COMPUTE_INT_COMPILE([$1], [$2], [$3])
else
# (not necessarily size_t etc.). Equally, instead of defining an unused
# variable, we just use a cast to avoid warnings from the compiler.
# Suggested by Paul Eggert.
-define([_AC_CHECK_TYPE_NEW],
+m4_define([_AC_CHECK_TYPE_NEW],
[AC_REQUIRE([AC_HEADER_STDC])dnl
AC_VAR_PUSHDEF([ac_Type], [ac_cv_type_$1])dnl
AC_CACHE_CHECK([for $1], ac_Type,
# FIXME: This is an extremely badly chosen name, since this
# macro actually performs an AC_REPLACE_TYPE. Some day we
# have to clean this up.
-define([_AC_CHECK_TYPE_OLD],
+m4_define([_AC_CHECK_TYPE_OLD],
[_AC_CHECK_TYPE_NEW([$1],,
[AC_DEFINE_UNQUOTED([$1], [$2],
[Define to `$2' if <sys/types.h> does not define.])])dnl
# that are defining types.
# Because many people have used `off_t' and `size_t' too, they are added
# for better common-useward backward compatibility.
-define([_AC_CHECK_TYPE_REPLACEMENT_TYPE_P],
+m4_define([_AC_CHECK_TYPE_REPLACEMENT_TYPE_P],
[ifelse(m4_regexp([$1],
[^\(_Bool\|bool\|char\|double\|float\|int\|long\|short\|\(un\)?signed\|size_t\|off_t\)\([_a-zA-Z0-9() *]\|\[\|\]\)*$]),
0, 1, 0)dnl
# _AC_CHECK_TYPE_MAYBE_TYPE_P(STRING)
# -----------------------------------
# Return `1' if STRING looks like a C/C++ type.
-define([_AC_CHECK_TYPE_MAYBE_TYPE_P],
+m4_define([_AC_CHECK_TYPE_MAYBE_TYPE_P],
[ifelse(m4_regexp([$1], [^[_a-zA-Z0-9 ]+\([_a-zA-Z0-9() *]\|\[\|\]\)*$]),
0, 1, 0)dnl
])# _AC_CHECK_TYPE_MAYBE_TYPE_P
# 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],
+m4_define([AC_CONFIG_IF_MEMBER],
[ifelse(m4_regexp($2, [\(^\| \)]m4_patsubst([$1],
[\([+*.]\)], [\\\1])[\(:\| \|$\)]),
-1, [$4], [$3])])
# -----------------------------------------------------
# This macro does nothing, it's a hook to be read with `autoconf --trace'.
# It announces DEST depends upon the SOURCE1 etc.
-define([AC_FILE_DEPENDENCY_TRACE], [])
+m4_define([AC_FILE_DEPENDENCY_TRACE], [])
# _AC_CONFIG_DEPENDENCY(DEST, [SOURCE1], [SOURCE2...])
# ----------------------------------------------------
# Be sure that a missing dependency is expressed as a dependency upon
# `DEST.in'.
-define([_AC_CONFIG_DEPENDENCY],
+m4_define([_AC_CONFIG_DEPENDENCY],
[ifval([$2],
[AC_FILE_DEPENDENCY_TRACE($@)],
[AC_FILE_DEPENDENCY_TRACE([$1], [$1.in])])])
# _AC_CONFIG_DEPENDENCIES(DEST[:SOURCE1[:SOURCE2...]]...)
# -------------------------------------------------------
# Declare the DESTs depend upon their SOURCE1 etc.
-define([_AC_CONFIG_DEPENDENCIES],
+m4_define([_AC_CONFIG_DEPENDENCIES],
[m4_divert_push([KILL])
AC_FOREACH([AC_File], [$1],
[_AC_CONFIG_DEPENDENCY(m4_patsubst(AC_File, [:], [,]))])
#
# Note that this macro does not check if the list $[1] itself
# contains doubles.
-define([_AC_CONFIG_UNIQUE],
+m4_define([_AC_CONFIG_UNIQUE],
[m4_divert_push([KILL])
AC_FOREACH([AC_File], [$1],
[m4_pushdef([AC_Dest], m4_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],
+m4_define([_AC_CONFIG_COMMANDS_INIT],
[ifval([$1],
[m4_append([_AC_OUTPUT_COMMANDS_INIT], [$1
])])])
# Initialize.
-define([_AC_OUTPUT_COMMANDS_INIT])
+m4_define([_AC_OUTPUT_COMMANDS_INIT])
# AC_CONFIG_COMMANDS(NAME...,[COMMANDS], [INIT-CMDS])
])dnl
# Initialize the lists.
-define([AC_LIST_COMMANDS])
-define([AC_LIST_COMMANDS_COMMANDS])
+m4_define([AC_LIST_COMMANDS])
+m4_define([AC_LIST_COMMANDS_COMMANDS])
# AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS)
# 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],
-[define([_AC_OUTPUT_COMMANDS_CNT], m4_incr(_AC_OUTPUT_COMMANDS_CNT))dnl
+[m4_define([_AC_OUTPUT_COMMANDS_CNT], m4_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
])
])])
# Initialize.
-define([AC_OUTPUT_COMMANDS_PRE])
+m4_define([AC_OUTPUT_COMMANDS_PRE])
# AC_CONFIG_COMMANDS_POST(CMDS)
])])
# Initialize.
-define([AC_OUTPUT_COMMANDS_POST])
+m4_define([AC_OUTPUT_COMMANDS_POST])
# AC_CONFIG_HEADERS(HEADERS..., [COMMANDS], [INIT-CMDS])
# Initialize to empty. It is much easier and uniform to have a config
# list expand to empty when undefined, instead of special casing when
# not defined (since in this case, AC_CONFIG_FOO expands to AC_CONFIG_FOO).
-define([AC_LIST_HEADERS])
-define([AC_LIST_HEADERS_COMMANDS])
+m4_define([AC_LIST_HEADERS])
+m4_define([AC_LIST_HEADERS_COMMANDS])
# AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
# Initialize the list.
-define([AC_LIST_LINKS])
-define([AC_LIST_LINKS_COMMANDS])
+m4_define([AC_LIST_LINKS])
+m4_define([AC_LIST_LINKS_COMMANDS])
# AC_LINK_FILES(SOURCE..., DEST...)
AU_DEFUN([AC_LINK_FILES],
[ifelse($#, 2, ,
[m4_fatal([$0: incorrect number of arguments])])dnl
-define([_AC_LINK_FILES_CNT], m4_incr(_AC_LINK_FILES_CNT))dnl
+m4_define([_AC_LINK_FILES_CNT], m4_incr(_AC_LINK_FILES_CNT))dnl
ac_sources="$1"
ac_dests="$2"
while test -n "$ac_sources"; do
])dnl
# Initialize the lists.
-define([AC_LIST_FILES])
-define([AC_LIST_FILES_COMMANDS])
+m4_define([AC_LIST_FILES])
+m4_define([AC_LIST_FILES_COMMANDS])
# AC_CONFIG_SUBDIRS(DIR ...)
])
# Initialize the list.
-define([_AC_LIST_SUBDIRS])
+m4_define([_AC_LIST_SUBDIRS])
# autoupdate::AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS])
# The CONFIG_HEADERS are defined in the m4 variable AC_LIST_HEADERS.
# Pay special attention not to have too long here docs: some old
# shells die. Unfortunately the limit is not known precisely...
-define([AC_OUTPUT],
+m4_define([AC_OUTPUT],
[dnl Dispatch the extra arguments to their native macros.
ifval([$1],
[AC_CONFIG_FILES([$1])])dnl
# Produce config.status. Called by AC_OUTPUT.
# Pay special attention not to have too long here docs: some old
# shells die. Unfortunately the limit is not known precisely...
-define([_AC_OUTPUT_CONFIG_STATUS],
+m4_define([_AC_OUTPUT_CONFIG_STATUS],
[echo creating $CONFIG_STATUS
cat >$CONFIG_STATUS <<\EOF
#! /bin/sh
# 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],
+m4_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],
+m4_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],
+m4_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],
+m4_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],
+m4_define([_AC_OUTPUT_COMMANDS],
[cat >>$CONFIG_STATUS <<\EOF
#
# ------------------
# This is a subroutine of AC_OUTPUT, but it does not go into
# config.status, rather, it is called after running config.status.
-define([_AC_OUTPUT_SUBDIRS],
+m4_define([_AC_OUTPUT_SUBDIRS],
[
#
# CONFIG_SUBDIRS section.
# ------------------------------------------------------------
# Expand into IF-LANG1 if the current language is LANG1 etc. else
# into default.
-define([AC_LANG_CASE],
+m4_define([AC_LANG_CASE],
[m4_case(_AC_LANG, $@)])
# ------------------------------------
# Call the specialization of MACRO for LANG with ARGS. Complain if
# unavailable.
-define([_AC_LANG_DISPATCH],
+m4_define([_AC_LANG_DISPATCH],
[ifdef([$1($2)],
[m4_indir([$1($2)], m4_shiftn(2, $@))],
[AC_FATAL([$1: unknown language: $2])])])
# If you add quotes here, they will be part of the name too, yielding
# `AC_LANG([C])' for instance, which does not exist.
AC_DEFUN([AC_LANG],
-[define([_AC_LANG], [$1])dnl
+[m4_define([_AC_LANG], [$1])dnl
_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
# AC_LANG_PUSH(LANG)
# ------------------
# Save the current language, and use LANG.
-define([AC_LANG_PUSH],
+m4_define([AC_LANG_PUSH],
[m4_pushdef([_AC_LANG])dnl
AC_LANG([$1])])
# AC_LANG_POP
# -----------
# Restore the previous language.
-define([AC_LANG_POP],
+m4_define([AC_LANG_POP],
[m4_popdef([_AC_LANG])dnl
ifelse(_AC_LANG, [_AC_LANG],
[AC_FATAL([too many $0])])dnl
# ---------------
# Return a short signature of _AC_LANG which can be used in shell
# variable names, or in M4 macro names.
-define([_AC_LANG_ABBREV],
+m4_define([_AC_LANG_ABBREV],
[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
# AC_LANG(C)
# ----------
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-define([AC_LANG(C)],
+m4_define([AC_LANG(C)],
[ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
# _AC_LANG_ABBREV(C)
# ------------------
-define([_AC_LANG_ABBREV(C)], [c])
+m4_define([_AC_LANG_ABBREV(C)], [c])
# ---------------------- #
# AC_LANG(C++)
# ------------
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-define([AC_LANG(C++)],
+m4_define([AC_LANG(C++)],
[ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
# _AC_LANG_ABBREV(C++)
# --------------------
-define([_AC_LANG_ABBREV(C++)], [cxx])
+m4_define([_AC_LANG_ABBREV(C++)], [cxx])
# ----------------------------- #
# AC_LANG(Fortran 77)
# -------------------
-define([AC_LANG(Fortran 77)],
+m4_define([AC_LANG(Fortran 77)],
[ac_ext=f
ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${F77-f77} -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
# _AC_LANG_ABBREV(Fortran 77)
# ---------------------------
-define([_AC_LANG_ABBREV(Fortran 77)], [f77])
+m4_define([_AC_LANG_ABBREV(Fortran 77)], [f77])
# AC_LANG_CONFTEST(BODY)
# ----------------------
# Save the BODY in `conftest.$ac_ext'. Add a trailing new line.
-define([AC_LANG_CONFTEST],
+m4_define([AC_LANG_CONFTEST],
[cat >conftest.$ac_ext <<_ACEOF
$1
_ACEOF])
# -----------------------
# This sometimes fails to find confdefs.h, for some reason.
# #line __oline__ "$[0]"
-define([AC_LANG_SOURCE(C)],
+m4_define([AC_LANG_SOURCE(C)],
[#line __oline__ "configure"
#include "confdefs.h"
$1])
# AC_LANG_PROGRAM(C)([PROLOGUE], [BODY])
# --------------------------------------
-define([AC_LANG_PROGRAM(C)],
+m4_define([AC_LANG_PROGRAM(C)],
[$1
int
main ()
# AC_LANG_CALL(C)(PROLOGUE, FUNCTION)
# -----------------------------------
# Avoid conflicting decl of main.
-define([AC_LANG_CALL(C)],
+m4_define([AC_LANG_CALL(C)],
[AC_LANG_PROGRAM([$1
ifelse([$2], [main], ,
[/* Override any gcc2 internal prototype to avoid an error. */
# Don't include <ctype.h> because on OSF/1 3.0 it includes
# <sys/types.h> which includes <sys/select.h> which contains a
# prototype for select. Similarly for bzero.
-define([AC_LANG_FUNC_LINK_TRY(C)],
+m4_define([AC_LANG_FUNC_LINK_TRY(C)],
[AC_LANG_PROGRAM(
[/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $1 (); below. */
# AC_LANG_BOOL_COMPILE_TRY(C)(PROLOGUE, EXPRESSION)
# -------------------------------------------------
-define([AC_LANG_BOOL_COMPILE_TRY(C)],
+m4_define([AC_LANG_BOOL_COMPILE_TRY(C)],
[AC_LANG_PROGRAM([$1], [int _array_ @<:@1 - 2 * !($2)@:>@])])
# -----------------------------------------
# We need `stdio.h' to open a `FILE', so the prologue defaults to the
# inclusion of `stdio.h'.
-define([AC_LANG_INT_SAVE(C)],
+m4_define([AC_LANG_INT_SAVE(C)],
[AC_LANG_PROGRAM([m4_default([$1], [@%:@include "stdio.h"])],
[FILE *f = fopen ("conftestval", "w");
if (!f)
# AC_LANG_SOURCE(C++)(BODY)
# -------------------------
-define([AC_LANG_SOURCE(C++)],
+m4_define([AC_LANG_SOURCE(C++)],
[#line __oline__ "configure"
#include "confdefs.h"
#ifdef __cplusplus
# AC_LANG_PROGRAM(C++)([PROLOGUE], [BODY])
# ----------------------------------------
# Same as C.
-define([AC_LANG_PROGRAM(C++)], m4_defn([AC_LANG_PROGRAM(C)]))
+m4_define([AC_LANG_PROGRAM(C++)], m4_defn([AC_LANG_PROGRAM(C)]))
# AC_LANG_CALL(C++)(PROLOGUE, FUNCTION)
# -------------------------------------
# Same as C.
-define([AC_LANG_CALL(C++)], m4_defn([AC_LANG_CALL(C)]))
+m4_define([AC_LANG_CALL(C++)], m4_defn([AC_LANG_CALL(C)]))
# AC_LANG_FUNC_LINK_TRY(C++)(FUNCTION)
# ------------------------------------
# Same as C.
-define([AC_LANG_FUNC_LINK_TRY(C++)], m4_defn([AC_LANG_FUNC_LINK_TRY(C)]))
+m4_define([AC_LANG_FUNC_LINK_TRY(C++)], m4_defn([AC_LANG_FUNC_LINK_TRY(C)]))
# AC_LANG_BOOL_COMPILE_TRY(C++)(PROLOGUE, EXPRESSION)
# ---------------------------------------------------
# Same as C.
-define([AC_LANG_BOOL_COMPILE_TRY(C++)], m4_defn([AC_LANG_BOOL_COMPILE_TRY(C)]))
+m4_define([AC_LANG_BOOL_COMPILE_TRY(C++)], m4_defn([AC_LANG_BOOL_COMPILE_TRY(C)]))
# AC_LANG_INT_SAVE(C++)(PROLOGUE, EXPRESSION)
# -------------------------------------------
# Same as C.
-define([AC_LANG_INT_SAVE(C++)], m4_defn([AC_LANG_INT_SAVE(C)]))
+m4_define([AC_LANG_INT_SAVE(C++)], m4_defn([AC_LANG_INT_SAVE(C)]))
# FIXME: Apparently, according to former AC_TRY_COMPILER, the CPP
# directives must not be included. But AC_TRY_RUN_NATIVE was not
# avoiding them, so?
-define([AC_LANG_SOURCE(Fortran 77)],
+m4_define([AC_LANG_SOURCE(Fortran 77)],
[$1])
# AC_LANG_PROGRAM(Fortran 77)([PROLOGUE], [BODY])
# -----------------------------------------------
# Yes, we discard the PROLOGUE.
-define([AC_LANG_PROGRAM(Fortran 77)],
+m4_define([AC_LANG_PROGRAM(Fortran 77)],
[ program main
$2
end])
# AC_LANG_CALL(Fortran 77)(PROLOGUE, FUNCTION)
# --------------------------------------------
# FIXME: This is a guess, help!
-define([AC_LANG_CALL(Fortran 77)],
+m4_define([AC_LANG_CALL(Fortran 77)],
[AC_LANG_PROGRAM([$1],
[ call $2])])
# Find a compiler for the current LANG. Note that because we might
# AC_REQUIRE `AC_LANG_COMPILER(C)' for instance, the latter must be
# AC_DEFUN'd, not just define'd.
-define([AC_LANG_COMPILER],
+m4_define([AC_LANG_COMPILER],
[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
# _AC_LANG_COMPILER_WORKS
# -----------------------
-define([_AC_LANG_COMPILER_WORKS],
+m4_define([_AC_LANG_COMPILER_WORKS],
[AC_MSG_CHECKING([whether the _AC_LANG compiler works])
_AC_LINK_IFELSE([AC_LANG_PROGRAM()],
[# FIXME: these cross compiler hacks should be removed for autoconf 3.0
# _AC_LANG_COMPILER_GNU
# ---------------------
# Check whether the compiler for the current language is GNU.
-define([_AC_LANG_COMPILER_GNU],
+m4_define([_AC_LANG_COMPILER_GNU],
[AC_CACHE_CHECK([whether we are using the GNU _AC_LANG compiler],
[ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu],
[_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifndef __GNUC__
AC_BEFORE([$0], [_AC_LANG_COMPILER_WORKS])
AC_BEFORE([$0], [_AC_EXEEXT])
-define([_AC_LANG_COMPILER_WORKS], [cross_compiling=maybe])
+m4_define([_AC_LANG_COMPILER_WORKS], [cross_compiling=maybe])
-define([_AC_EXEEXT], [EXEEXT=])
+m4_define([_AC_EXEEXT], [EXEEXT=])
-define([AC_LINK_IFELSE],
+m4_define([AC_LINK_IFELSE],
[AC_FATAL([All the tests involving linking were disabled by $0])])
m4_divert_pop()dnl
# Check whether -g works, even if CFLAGS is set, in case the package
# plays around with CFLAGS (such as to build both debugging and normal
# versions of a library), tasteless as that idea is.
-define([_AC_PROG_CC_G],
+m4_define([_AC_PROG_CC_G],
[ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
CFLAGS="-g"
# Check whether -g works, even if CXXFLAGS is set, in case the package
# plays around with CXXFLAGS (such as to build both debugging and
# normal versions of a library), tasteless as that idea is.
-define([_AC_PROG_CXX_G],
+m4_define([_AC_PROG_CXX_G],
[ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="-g"
# Check whether -g works, even if FFLAGS is set, in case the package
# plays around with FFLAGS (such as to build both debugging and normal
# versions of a library), tasteless as that idea is.
-define([_AC_PROG_F77_G],
+m4_define([_AC_PROG_F77_G],
[ac_test_FFLAGS=${FFLAGS+set}
ac_save_FFLAGS=$FFLAGS
FFLAGS=
# has little interest.
# Idea borrowed from dist 3.0. Use `*c*,', not `*c,' because if `\c'
# failed there is also a new-line to match.
-define([_AC_PROG_ECHO],
+m4_define([_AC_PROG_ECHO],
[case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
*c*,-n*) ECHO_N= ECHO_C='
' ECHO_T=' ' ;;
# _AC_DECL_YYTEXT
# ---------------
# Check if lex declares yytext as a char * by default, not a char[].
-define([_AC_DECL_YYTEXT],
+m4_define([_AC_DECL_YYTEXT],
[AC_REQUIRE_CPP()dnl
AC_CACHE_CHECK(lex output file root, ac_cv_prog_lex_root,
[# The minimal lex program is just a single line: %%. But some broken lexes
# -----------------------------------------------------------------
# Like AC_CHECK_HEADER, except also make sure that HEADER-FILE
# defines the type `DIR'. dirent.h on NextStep 3.2 doesn't.
-define([_AC_CHECK_HEADER_DIRENT],
+m4_define([_AC_CHECK_HEADER_DIRENT],
[AC_VAR_PUSHDEF([ac_Header], [ac_cv_header_dirent_$1])dnl
AC_CACHE_CHECK([for $1 that defines DIR], ac_Header,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
# AH_CHECK_HEADERS_DIRENT(HEADERS...)
# -----------------------------------
-define([AH_CHECK_HEADERS_DIRENT],
+m4_define([AH_CHECK_HEADERS_DIRENT],
[AC_FOREACH([AC_Header], [$1],
[AH_TEMPLATE(AC_TR_CPP(HAVE_[]AC_Header),
[Define if you have the <]AC_Header[> header file, and
# _AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H
# ----------------------------------
-define([_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H],
+m4_define([_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H],
[AC_CACHE_CHECK([whether termios.h defines TIOCGWINSZ],
ac_cv_sys_tiocgwinsz_in_termios_h,
[AC_EGREP_CPP([yes],
# _AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL
# ----------------------------------
-define([_AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL],
+m4_define([_AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL],
[AC_CACHE_CHECK([whether sys/ioctl.h defines TIOCGWINSZ],
ac_cv_sys_tiocgwinsz_in_sys_ioctl_h,
[AC_EGREP_CPP([yes],
# _AC_SYS_LARGEFILE_SOURCE(PROLOGUE, BODY)
# ----------------------------------------
-define([_AC_SYS_LARGEFILE_SOURCE],
+m4_define([_AC_SYS_LARGEFILE_SOURCE],
[AC_LANG_PROGRAM(
[$1
@%:@include <sys/types.h>
# DESCRIPTION,
# [INCLUDES], [FUNCTION-BODY])
# ----------------------------------------------------------
-define([_AC_SYS_LARGEFILE_MACRO_VALUE],
+m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE],
[AC_CACHE_CHECK([for $1 value needed for large files], [$3],
[while :; do
$3=no
# ----------------
# Internal subroutine of AC_PATH_X.
# Set ac_x_includes and/or ac_x_libraries.
-define([_AC_PATH_X_XMKMF],
+m4_define([_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.
-define([_AC_PATH_X_DIRECT],
+m4_define([_AC_PATH_X_DIRECT],
[# Standard set of common directories for X headers.
# Check X11 before X11Rn because it is often a symlink to the current release.
ac_x_header_dirs='
# ----------
# Check for Cygwin. This is a way to set the right value for
# EXEEXT.
-define([_AC_CYGWIN],
+m4_define([_AC_CYGWIN],
[AC_CACHE_CHECK(for Cygwin environment, ac_cv_cygwin,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
[#ifndef __CYGWIN__
# ----------
# Check for EMX on OS/2. This is another way to set the right value
# for EXEEXT.
-define([_AC_EMXOS2],
+m4_define([_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],
# -----------
# Check for mingw32. This is another way to set the right value for
# EXEEXT.
-define([_AC_MINGW32],
+m4_define([_AC_MINGW32],
[AC_CACHE_CHECK(for mingw32 environment, ac_cv_mingw32,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return __MINGW32__;])],
[ac_cv_mingw32=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.
-define([_AC_EXEEXT],
+m4_define([_AC_EXEEXT],
[AC_CACHE_CHECK([for executable suffix], ac_cv_exeext,
[case "$CYGWIN $MINGW32 $EMXOS2" in
*yes*) ac_cv_exeext=.exe ;;
# 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.
-define([_AC_OBJEXT],
+m4_define([_AC_OBJEXT],
[AC_CACHE_CHECK([for object suffix], ac_cv_objext,
[AC_LANG_CONFTEST([AC_LANG_PROGRAM()])
if AC_TRY_EVAL(ac_compile); then