diff --git a/ChangeLog b/ChangeLog index cf3e8543..622aac01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-11-03 Akim Demaille + + * 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 * acgeneral.m4 (AU_ALIAS): Don't forget to pass the arguments to @@ -11,7 +17,7 @@ 2000-11-03 Akim Demaille * 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. diff --git a/acfunctions.m4 b/acfunctions.m4 index 546675d0..41c5cb22 100644 --- a/acfunctions.m4 +++ b/acfunctions.m4 @@ -131,7 +131,7 @@ AU_ALIAS([AC_HAVE_FUNCS], [AC_CHECK_FUNCS]) # 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, @@ -420,7 +420,7 @@ LIBS=$ac_save_LIBS # _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. @@ -1183,7 +1183,7 @@ fi # 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], @@ -1217,7 +1217,7 @@ AC_DEFUN([AC_FUNC_LSTAT], [_AC_FUNC_STAT(lstat)]) # _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 diff --git a/acgeneral.m4 b/acgeneral.m4 index bf41696d..7ae5b45d 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -109,30 +109,30 @@ # 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) @@ -140,24 +140,24 @@ 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])) @@ -181,7 +181,7 @@ 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])])]) @@ -189,13 +189,13 @@ define([AC_DEFUN], # ------------------------------ # 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])]) @@ -209,7 +209,7 @@ define([AC_OBSOLETE], # 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])])]) @@ -242,21 +242,21 @@ define([AC_BEFORE], # 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])]) @@ -266,8 +266,8 @@ define([AC_EXPAND_ONCE], # ---------------------- # 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) @@ -276,7 +276,7 @@ define([AC_PROVIDE], # 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])]) @@ -294,7 +294,7 @@ define([AC_PROVIDE_IFELSE], # 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])]) @@ -309,7 +309,7 @@ define([AU_DEFINE], # 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 @@ -327,7 +327,7 @@ $2], # # 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($][@)])]) @@ -341,7 +341,7 @@ define([AU_ALIAS], # -------------------- # 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) @@ -350,7 +350,7 @@ define([AH_OUTPUT], []) # 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]]))]) ]) @@ -360,7 +360,7 @@ define([AH_VERBATIM], # ----------------------------- # 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])]) @@ -369,20 +369,20 @@ define([AH_TEMPLATE], # 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]) @@ -404,7 +404,7 @@ 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])]) @@ -414,7 +414,7 @@ define([AC_VAR_INDIR_IFELSE], # 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])]) @@ -425,7 +425,7 @@ define([AC_VAR_SET], # 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])]) @@ -435,7 +435,7 @@ define([AC_VAR_GET], # ------------------------- # 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])]) @@ -445,7 +445,7 @@ define([AC_VAR_TEST_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])]) @@ -480,7 +480,7 @@ define([AC_VAR_SET_IFELSE], # 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]])], @@ -490,7 +490,7 @@ 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])]) @@ -509,7 +509,7 @@ define([AC_VAR_POPDEF], # 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]], @@ -523,7 +523,7 @@ define([AC_TR_CPP], # 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]), @@ -549,7 +549,7 @@ define([AC_TR_SH], # 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])]) @@ -601,7 +601,7 @@ define([AC_FOREACH], # | 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 ] @@ -631,11 +631,11 @@ m4_popdef([AC_Prefix])dnl # _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 ]) @@ -649,7 +649,7 @@ 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 @@ -663,7 +663,7 @@ $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 ]) @@ -696,7 +696,7 @@ AU_DEFUN([AC_PREREQ], # 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])])]) @@ -717,7 +717,7 @@ define([AC_PREREQ], # _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 @@ -732,7 +732,7 @@ ifset([AC_PACKAGE_BUGREPORT], # _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. @@ -744,7 +744,7 @@ gives unlimited permission to copy, distribute and modify it.])dnl # _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 @@ -780,12 +780,12 @@ AS_UNSET([CDPATH], [:]) # --------------------- # 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 @@ -832,7 +832,7 @@ hostinfo = `(hostinfo) 2>/dev/null` # _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 @@ -925,7 +925,7 @@ AC_DEFUN([AC_CONFIG_SRCDIR], # _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. @@ -958,7 +958,7 @@ m4_divert_pop()dnl # _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. @@ -1336,7 +1336,7 @@ m4_divert_pop()dnl # _AC_INIT_HELP # ------------- # Handle the `configure --help' message. -define([_AC_INIT_HELP], +m4_define([_AC_INIT_HELP], [m4_divert_push([HELP_BEGIN])dnl # @@ -1483,7 +1483,7 @@ m4_divert_pop()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 @@ -1505,7 +1505,7 @@ fi])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. @@ -1590,7 +1590,7 @@ AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl # 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 @@ -1613,7 +1613,7 @@ ifval([$2], , [ifval([$1], [AC_CONFIG_SRCDIR([$1])])])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()]) @@ -1691,7 +1691,7 @@ AU_DEFUN([AC_WITH], # # 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 @@ -1702,7 +1702,7 @@ ac_cv_env_$1_value=$$1])dnl # _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 @@ -1869,7 +1869,7 @@ AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # _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], @@ -1965,7 +1965,7 @@ AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], []) # 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 @@ -1985,7 +1985,7 @@ done # 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. @@ -2006,7 +2006,7 @@ fi # _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. @@ -2036,7 +2036,7 @@ define([_AC_CACHE_DUMP], # ------------- # 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 @@ -2070,7 +2070,7 @@ rm -f confcache[]dnl # ------------------------------------------ # 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 @@ -2083,7 +2083,7 @@ AC_VAR_SET_IFELSE([$1], # 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]))]) @@ -2099,14 +2099,14 @@ 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])])]) @@ -2115,7 +2115,7 @@ define([AC_DEFINE_TRACE], # 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 @@ -2127,7 +2127,7 @@ 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 <&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 ]) @@ -2279,7 +2279,7 @@ _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 ]) @@ -2287,7 +2287,7 @@ _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 ]) @@ -2296,7 +2296,7 @@ _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 ]) @@ -2304,14 +2304,14 @@ _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]); }]) @@ -2409,7 +2409,7 @@ AC_DEFUN([AC_TRY_COMMAND], # 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 ])]) @@ -2483,7 +2483,7 @@ $2], # 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 @@ -2787,7 +2787,7 @@ AC_VAR_POPDEF([ac_Lib])dnl # 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[).])]) @@ -2903,7 +2903,7 @@ rm -f conftest* # --------------------------------------------------------------------- # 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 @@ -2944,7 +2944,7 @@ AC_DEFUN([AC_TRY_COMPILE], # ------------------------------------------------------------------ # 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 @@ -3002,7 +3002,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5]) # ------------------------------------------------------------ # 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) && @@ -3064,7 +3064,7 @@ AC_VAR_POPDEF([ac_Header])dnl ])# 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.])])]) @@ -3173,14 +3173,14 @@ $3], # 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 @@ -3192,7 +3192,7 @@ LIBOBJS="$LIBOBJS $1.$ac_objext"]) # ------------------------- # 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 @@ -3209,7 +3209,7 @@ define([AC_LIBOBJ], # --------------------------------------------------------- # 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 @@ -3237,14 +3237,14 @@ $2=$ac_lo[]dnl # _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 @@ -3360,7 +3360,7 @@ AC_DEFINE_UNQUOTED(AC_TR_CPP(sizeof_$1), $AC_TR_SH([ac_cv_sizeof_$1]), # (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, @@ -3399,7 +3399,7 @@ $2], # 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 does not define.])])dnl @@ -3414,7 +3414,7 @@ define([_AC_CHECK_TYPE_OLD], # 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 @@ -3424,7 +3424,7 @@ define([_AC_CHECK_TYPE_REPLACEMENT_TYPE_P], # _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 @@ -3541,7 +3541,7 @@ AC_DEFUN([AC_CHECK_TYPE], # 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])]) @@ -3551,14 +3551,14 @@ define([AC_CONFIG_IF_MEMBER], # ----------------------------------------------------- # 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])])]) @@ -3567,7 +3567,7 @@ define([_AC_CONFIG_DEPENDENCY], # _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, [:], [,]))]) @@ -3584,7 +3584,7 @@ m4_divert_pop()dnl # # 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, [:.*])) @@ -3610,13 +3610,13 @@ m4_divert_pop()dnl # `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]) @@ -3640,8 +3640,8 @@ ac_config_commands="$ac_config_commands $1" ])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) @@ -3659,7 +3659,7 @@ define([AC_LIST_COMMANDS_COMMANDS]) # 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 ]) @@ -3676,7 +3676,7 @@ AC_DEFUN([AC_CONFIG_COMMANDS_PRE], ])]) # Initialize. -define([AC_OUTPUT_COMMANDS_PRE]) +m4_define([AC_OUTPUT_COMMANDS_PRE]) # AC_CONFIG_COMMANDS_POST(CMDS) @@ -3687,7 +3687,7 @@ AC_DEFUN([AC_CONFIG_COMMANDS_POST], ])]) # Initialize. -define([AC_OUTPUT_COMMANDS_POST]) +m4_define([AC_OUTPUT_COMMANDS_POST]) # AC_CONFIG_HEADERS(HEADERS..., [COMMANDS], [INIT-CMDS]) @@ -3720,8 +3720,8 @@ ac_config_headers="$ac_config_headers $1" # 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 ...) @@ -3756,8 +3756,8 @@ ac_config_links="$ac_config_links $1" # 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...) @@ -3777,7 +3777,7 @@ define([AC_LIST_LINKS_COMMANDS]) 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 @@ -3826,8 +3826,8 @@ ac_config_files="$ac_config_files $1" ])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 ...) @@ -3854,7 +3854,7 @@ AC_SUBST(subdirs, "$subdirs $1")dnl ]) # Initialize the list. -define([_AC_LIST_SUBDIRS]) +m4_define([_AC_LIST_SUBDIRS]) # autoupdate::AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS]) @@ -3879,7 +3879,7 @@ m4_ifvanl([$2$3], # 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 @@ -3931,7 +3931,7 @@ AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [_AC_OUTPUT_SUBDIRS()])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 @@ -4153,7 +4153,7 @@ chmod +x $CONFIG_STATUS # 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. @@ -4192,7 +4192,7 @@ rm -f confdef2opt.sed # # 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 <>$CONFIG_STATUS <<\EOF # @@ -4622,7 +4622,7 @@ 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 # @@ -4684,7 +4684,7 @@ 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 # @@ -4710,7 +4710,7 @@ 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. diff --git a/aclang.m4 b/aclang.m4 index abada399..9a6ccc8f 100644 --- a/aclang.m4 +++ b/aclang.m4 @@ -94,7 +94,7 @@ # ------------------------------------------------------------ # 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, $@)]) @@ -102,7 +102,7 @@ define([AC_LANG_CASE], # ------------------------------------ # 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])])]) @@ -117,14 +117,14 @@ define([_AC_LANG_DISPATCH], # 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])]) @@ -132,7 +132,7 @@ 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 @@ -159,7 +159,7 @@ AU_DEFUN([AC_LANG_RESTORE], [AC_LANG_POP($@)]) # --------------- # 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, $@)]) @@ -171,7 +171,7 @@ define([_AC_LANG_ABBREV], # 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' @@ -187,7 +187,7 @@ AU_DEFUN([AC_LANG_C], [AC_LANG(C)]) # _AC_LANG_ABBREV(C) # ------------------ -define([_AC_LANG_ABBREV(C)], [c]) +m4_define([_AC_LANG_ABBREV(C)], [c]) # ---------------------- # @@ -198,7 +198,7 @@ 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' @@ -214,7 +214,7 @@ AU_DEFUN([AC_LANG_CPLUSPLUS], [AC_LANG(C++)]) # _AC_LANG_ABBREV(C++) # -------------------- -define([_AC_LANG_ABBREV(C++)], [cxx]) +m4_define([_AC_LANG_ABBREV(C++)], [cxx]) # ----------------------------- # @@ -224,7 +224,7 @@ 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' @@ -239,7 +239,7 @@ AU_DEFUN([AC_LANG_FORTRAN77], [AC_LANG(Fortran 77)]) # _AC_LANG_ABBREV(Fortran 77) # --------------------------- -define([_AC_LANG_ABBREV(Fortran 77)], [f77]) +m4_define([_AC_LANG_ABBREV(Fortran 77)], [f77]) @@ -256,7 +256,7 @@ 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]) @@ -319,7 +319,7 @@ AC_DEFUN([AC_LANG_INT_SAVE], # ----------------------- # 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]) @@ -327,7 +327,7 @@ $1]) # AC_LANG_PROGRAM(C)([PROLOGUE], [BODY]) # -------------------------------------- -define([AC_LANG_PROGRAM(C)], +m4_define([AC_LANG_PROGRAM(C)], [$1 int main () @@ -343,7 +343,7 @@ $2 # 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. */ @@ -360,7 +360,7 @@ char $2 ();])], [$2 ();])]) # Don't include because on OSF/1 3.0 it includes # which includes 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. */ @@ -387,7 +387,7 @@ f = $1; # 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)@:>@])]) @@ -395,7 +395,7 @@ define([AC_LANG_BOOL_COMPILE_TRY(C)], # ----------------------------------------- # 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) @@ -409,7 +409,7 @@ fprintf (f, "%d\n", ($2));])]) # AC_LANG_SOURCE(C++)(BODY) # ------------------------- -define([AC_LANG_SOURCE(C++)], +m4_define([AC_LANG_SOURCE(C++)], [#line __oline__ "configure" #include "confdefs.h" #ifdef __cplusplus @@ -421,31 +421,31 @@ $1]) # 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)])) @@ -458,14 +458,14 @@ 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]) @@ -474,7 +474,7 @@ $2 # 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])]) @@ -494,7 +494,7 @@ define([AC_LANG_CALL(Fortran 77)], # 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, $@)]) @@ -518,7 +518,7 @@ AC_DEFUN([AC_REQUIRE_CPP], # _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 @@ -546,7 +546,7 @@ AC_MSG_RESULT($cross_compiling) # _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__ @@ -582,11 +582,11 @@ AC_DEFUN_ONCE([AC_NO_EXECUTABLES], 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 @@ -725,7 +725,7 @@ AC_LANG_POP # 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" @@ -914,7 +914,7 @@ AC_LANG_POP # 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" @@ -999,7 +999,7 @@ AC_LANG_POP # 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= diff --git a/acspecific.m4 b/acspecific.m4 index b4d081f9..6a65d12b 100644 --- a/acspecific.m4 +++ b/acspecific.m4 @@ -64,7 +64,7 @@ # 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=' ' ;; @@ -144,7 +144,7 @@ fi]) # _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 @@ -337,7 +337,7 @@ fi # ----------------------------------------------------------------- # 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 @@ -354,7 +354,7 @@ AC_VAR_POPDEF([ac_Header])dnl # 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 @@ -548,7 +548,7 @@ fi # _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], @@ -565,7 +565,7 @@ define([_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H], # _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], @@ -971,7 +971,7 @@ with arguments. Remove this warning when you adjust your code.])]) # _AC_SYS_LARGEFILE_SOURCE(PROLOGUE, BODY) # ---------------------------------------- -define([_AC_SYS_LARGEFILE_SOURCE], +m4_define([_AC_SYS_LARGEFILE_SOURCE], [AC_LANG_PROGRAM( [$1 @%:@include @@ -984,7 +984,7 @@ int a[[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1]];], # 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 @@ -1247,7 +1247,7 @@ fi # ---------------- # 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 @@ -1288,7 +1288,7 @@ fi # ----------------- # 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=' @@ -1498,7 +1498,7 @@ AC_SUBST(X_EXTRA_LIBS)dnl # ---------- # 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__ @@ -1515,7 +1515,7 @@ test "$ac_cv_cygwin" = yes && CYGWIN=yes[]dnl # ---------- # 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], @@ -1528,7 +1528,7 @@ test "$ac_cv_emxos2" = yes && EMXOS2=yes[]dnl # ----------- # 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], @@ -1558,7 +1558,7 @@ AC_DEFUN([AC_OBJEXT], []) # 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 ;; @@ -1588,7 +1588,7 @@ AC_SUBST(EXEEXT)dnl # Check the object extension used by the compiler: typically .o or # .obj. If this is called, some other behaviour will change, # determined by ac_objext. -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 diff --git a/acversion.m4.in b/acversion.m4.in index 35487a3a..e517c80e 100644 --- a/acversion.m4.in +++ b/acversion.m4.in @@ -2,4 +2,4 @@ # Version of Autoconf. # Copyright 1999, 2000 Free Software Foundation, Inc. -define([AC_ACVERSION], [@VERSION@]) +m4_define([AC_ACVERSION], [@VERSION@]) diff --git a/autoconf.m4 b/autoconf.m4 index 9d12dc9f..54a73ae9 100644 --- a/autoconf.m4 +++ b/autoconf.m4 @@ -26,8 +26,6 @@ include(m4sugar.m4)# -*- Autoconf -*- m4_include([m4sh.m4]) -m4_copy_unm4([m4_define]) - m4_include([acversion.m4]) m4_include([acgeneral.m4]) m4_include([aclang.m4]) @@ -36,12 +34,14 @@ m4_include([acspecific.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]) diff --git a/lib/autoconf/autoconf.m4 b/lib/autoconf/autoconf.m4 index 9d12dc9f..54a73ae9 100644 --- a/lib/autoconf/autoconf.m4 +++ b/lib/autoconf/autoconf.m4 @@ -26,8 +26,6 @@ include(m4sugar.m4)# -*- Autoconf -*- m4_include([m4sh.m4]) -m4_copy_unm4([m4_define]) - m4_include([acversion.m4]) m4_include([acgeneral.m4]) m4_include([aclang.m4]) @@ -36,12 +34,14 @@ m4_include([acspecific.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]) diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index abada399..9a6ccc8f 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.m4 @@ -94,7 +94,7 @@ # ------------------------------------------------------------ # 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, $@)]) @@ -102,7 +102,7 @@ define([AC_LANG_CASE], # ------------------------------------ # 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])])]) @@ -117,14 +117,14 @@ define([_AC_LANG_DISPATCH], # 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])]) @@ -132,7 +132,7 @@ 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 @@ -159,7 +159,7 @@ AU_DEFUN([AC_LANG_RESTORE], [AC_LANG_POP($@)]) # --------------- # 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, $@)]) @@ -171,7 +171,7 @@ define([_AC_LANG_ABBREV], # 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' @@ -187,7 +187,7 @@ AU_DEFUN([AC_LANG_C], [AC_LANG(C)]) # _AC_LANG_ABBREV(C) # ------------------ -define([_AC_LANG_ABBREV(C)], [c]) +m4_define([_AC_LANG_ABBREV(C)], [c]) # ---------------------- # @@ -198,7 +198,7 @@ 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' @@ -214,7 +214,7 @@ AU_DEFUN([AC_LANG_CPLUSPLUS], [AC_LANG(C++)]) # _AC_LANG_ABBREV(C++) # -------------------- -define([_AC_LANG_ABBREV(C++)], [cxx]) +m4_define([_AC_LANG_ABBREV(C++)], [cxx]) # ----------------------------- # @@ -224,7 +224,7 @@ 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' @@ -239,7 +239,7 @@ AU_DEFUN([AC_LANG_FORTRAN77], [AC_LANG(Fortran 77)]) # _AC_LANG_ABBREV(Fortran 77) # --------------------------- -define([_AC_LANG_ABBREV(Fortran 77)], [f77]) +m4_define([_AC_LANG_ABBREV(Fortran 77)], [f77]) @@ -256,7 +256,7 @@ 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]) @@ -319,7 +319,7 @@ AC_DEFUN([AC_LANG_INT_SAVE], # ----------------------- # 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]) @@ -327,7 +327,7 @@ $1]) # AC_LANG_PROGRAM(C)([PROLOGUE], [BODY]) # -------------------------------------- -define([AC_LANG_PROGRAM(C)], +m4_define([AC_LANG_PROGRAM(C)], [$1 int main () @@ -343,7 +343,7 @@ $2 # 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. */ @@ -360,7 +360,7 @@ char $2 ();])], [$2 ();])]) # Don't include because on OSF/1 3.0 it includes # which includes 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. */ @@ -387,7 +387,7 @@ f = $1; # 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)@:>@])]) @@ -395,7 +395,7 @@ define([AC_LANG_BOOL_COMPILE_TRY(C)], # ----------------------------------------- # 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) @@ -409,7 +409,7 @@ fprintf (f, "%d\n", ($2));])]) # AC_LANG_SOURCE(C++)(BODY) # ------------------------- -define([AC_LANG_SOURCE(C++)], +m4_define([AC_LANG_SOURCE(C++)], [#line __oline__ "configure" #include "confdefs.h" #ifdef __cplusplus @@ -421,31 +421,31 @@ $1]) # 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)])) @@ -458,14 +458,14 @@ 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]) @@ -474,7 +474,7 @@ $2 # 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])]) @@ -494,7 +494,7 @@ define([AC_LANG_CALL(Fortran 77)], # 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, $@)]) @@ -518,7 +518,7 @@ AC_DEFUN([AC_REQUIRE_CPP], # _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 @@ -546,7 +546,7 @@ AC_MSG_RESULT($cross_compiling) # _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__ @@ -582,11 +582,11 @@ AC_DEFUN_ONCE([AC_NO_EXECUTABLES], 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 @@ -725,7 +725,7 @@ AC_LANG_POP # 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" @@ -914,7 +914,7 @@ AC_LANG_POP # 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" @@ -999,7 +999,7 @@ AC_LANG_POP # 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= diff --git a/lib/autoconf/fortran.m4 b/lib/autoconf/fortran.m4 index abada399..9a6ccc8f 100644 --- a/lib/autoconf/fortran.m4 +++ b/lib/autoconf/fortran.m4 @@ -94,7 +94,7 @@ # ------------------------------------------------------------ # 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, $@)]) @@ -102,7 +102,7 @@ define([AC_LANG_CASE], # ------------------------------------ # 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])])]) @@ -117,14 +117,14 @@ define([_AC_LANG_DISPATCH], # 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])]) @@ -132,7 +132,7 @@ 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 @@ -159,7 +159,7 @@ AU_DEFUN([AC_LANG_RESTORE], [AC_LANG_POP($@)]) # --------------- # 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, $@)]) @@ -171,7 +171,7 @@ define([_AC_LANG_ABBREV], # 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' @@ -187,7 +187,7 @@ AU_DEFUN([AC_LANG_C], [AC_LANG(C)]) # _AC_LANG_ABBREV(C) # ------------------ -define([_AC_LANG_ABBREV(C)], [c]) +m4_define([_AC_LANG_ABBREV(C)], [c]) # ---------------------- # @@ -198,7 +198,7 @@ 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' @@ -214,7 +214,7 @@ AU_DEFUN([AC_LANG_CPLUSPLUS], [AC_LANG(C++)]) # _AC_LANG_ABBREV(C++) # -------------------- -define([_AC_LANG_ABBREV(C++)], [cxx]) +m4_define([_AC_LANG_ABBREV(C++)], [cxx]) # ----------------------------- # @@ -224,7 +224,7 @@ 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' @@ -239,7 +239,7 @@ AU_DEFUN([AC_LANG_FORTRAN77], [AC_LANG(Fortran 77)]) # _AC_LANG_ABBREV(Fortran 77) # --------------------------- -define([_AC_LANG_ABBREV(Fortran 77)], [f77]) +m4_define([_AC_LANG_ABBREV(Fortran 77)], [f77]) @@ -256,7 +256,7 @@ 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]) @@ -319,7 +319,7 @@ AC_DEFUN([AC_LANG_INT_SAVE], # ----------------------- # 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]) @@ -327,7 +327,7 @@ $1]) # AC_LANG_PROGRAM(C)([PROLOGUE], [BODY]) # -------------------------------------- -define([AC_LANG_PROGRAM(C)], +m4_define([AC_LANG_PROGRAM(C)], [$1 int main () @@ -343,7 +343,7 @@ $2 # 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. */ @@ -360,7 +360,7 @@ char $2 ();])], [$2 ();])]) # Don't include because on OSF/1 3.0 it includes # which includes 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. */ @@ -387,7 +387,7 @@ f = $1; # 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)@:>@])]) @@ -395,7 +395,7 @@ define([AC_LANG_BOOL_COMPILE_TRY(C)], # ----------------------------------------- # 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) @@ -409,7 +409,7 @@ fprintf (f, "%d\n", ($2));])]) # AC_LANG_SOURCE(C++)(BODY) # ------------------------- -define([AC_LANG_SOURCE(C++)], +m4_define([AC_LANG_SOURCE(C++)], [#line __oline__ "configure" #include "confdefs.h" #ifdef __cplusplus @@ -421,31 +421,31 @@ $1]) # 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)])) @@ -458,14 +458,14 @@ 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]) @@ -474,7 +474,7 @@ $2 # 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])]) @@ -494,7 +494,7 @@ define([AC_LANG_CALL(Fortran 77)], # 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, $@)]) @@ -518,7 +518,7 @@ AC_DEFUN([AC_REQUIRE_CPP], # _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 @@ -546,7 +546,7 @@ AC_MSG_RESULT($cross_compiling) # _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__ @@ -582,11 +582,11 @@ AC_DEFUN_ONCE([AC_NO_EXECUTABLES], 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 @@ -725,7 +725,7 @@ AC_LANG_POP # 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" @@ -914,7 +914,7 @@ AC_LANG_POP # 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" @@ -999,7 +999,7 @@ AC_LANG_POP # 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= diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index 546675d0..41c5cb22 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -131,7 +131,7 @@ AU_ALIAS([AC_HAVE_FUNCS], [AC_CHECK_FUNCS]) # 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, @@ -420,7 +420,7 @@ LIBS=$ac_save_LIBS # _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. @@ -1183,7 +1183,7 @@ fi # 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], @@ -1217,7 +1217,7 @@ AC_DEFUN([AC_FUNC_LSTAT], [_AC_FUNC_STAT(lstat)]) # _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 diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index bf41696d..7ae5b45d 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -109,30 +109,30 @@ # 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) @@ -140,24 +140,24 @@ 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])) @@ -181,7 +181,7 @@ 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])])]) @@ -189,13 +189,13 @@ define([AC_DEFUN], # ------------------------------ # 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])]) @@ -209,7 +209,7 @@ define([AC_OBSOLETE], # 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])])]) @@ -242,21 +242,21 @@ define([AC_BEFORE], # 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])]) @@ -266,8 +266,8 @@ define([AC_EXPAND_ONCE], # ---------------------- # 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) @@ -276,7 +276,7 @@ define([AC_PROVIDE], # 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])]) @@ -294,7 +294,7 @@ define([AC_PROVIDE_IFELSE], # 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])]) @@ -309,7 +309,7 @@ define([AU_DEFINE], # 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 @@ -327,7 +327,7 @@ $2], # # 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($][@)])]) @@ -341,7 +341,7 @@ define([AU_ALIAS], # -------------------- # 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) @@ -350,7 +350,7 @@ define([AH_OUTPUT], []) # 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]]))]) ]) @@ -360,7 +360,7 @@ define([AH_VERBATIM], # ----------------------------- # 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])]) @@ -369,20 +369,20 @@ define([AH_TEMPLATE], # 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]) @@ -404,7 +404,7 @@ 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])]) @@ -414,7 +414,7 @@ define([AC_VAR_INDIR_IFELSE], # 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])]) @@ -425,7 +425,7 @@ define([AC_VAR_SET], # 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])]) @@ -435,7 +435,7 @@ define([AC_VAR_GET], # ------------------------- # 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])]) @@ -445,7 +445,7 @@ define([AC_VAR_TEST_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])]) @@ -480,7 +480,7 @@ define([AC_VAR_SET_IFELSE], # 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]])], @@ -490,7 +490,7 @@ 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])]) @@ -509,7 +509,7 @@ define([AC_VAR_POPDEF], # 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]], @@ -523,7 +523,7 @@ define([AC_TR_CPP], # 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]), @@ -549,7 +549,7 @@ define([AC_TR_SH], # 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])]) @@ -601,7 +601,7 @@ define([AC_FOREACH], # | 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 ] @@ -631,11 +631,11 @@ m4_popdef([AC_Prefix])dnl # _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 ]) @@ -649,7 +649,7 @@ 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 @@ -663,7 +663,7 @@ $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 ]) @@ -696,7 +696,7 @@ AU_DEFUN([AC_PREREQ], # 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])])]) @@ -717,7 +717,7 @@ define([AC_PREREQ], # _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 @@ -732,7 +732,7 @@ ifset([AC_PACKAGE_BUGREPORT], # _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. @@ -744,7 +744,7 @@ gives unlimited permission to copy, distribute and modify it.])dnl # _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 @@ -780,12 +780,12 @@ AS_UNSET([CDPATH], [:]) # --------------------- # 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 @@ -832,7 +832,7 @@ hostinfo = `(hostinfo) 2>/dev/null` # _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 @@ -925,7 +925,7 @@ AC_DEFUN([AC_CONFIG_SRCDIR], # _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. @@ -958,7 +958,7 @@ m4_divert_pop()dnl # _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. @@ -1336,7 +1336,7 @@ m4_divert_pop()dnl # _AC_INIT_HELP # ------------- # Handle the `configure --help' message. -define([_AC_INIT_HELP], +m4_define([_AC_INIT_HELP], [m4_divert_push([HELP_BEGIN])dnl # @@ -1483,7 +1483,7 @@ m4_divert_pop()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 @@ -1505,7 +1505,7 @@ fi])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. @@ -1590,7 +1590,7 @@ AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl # 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 @@ -1613,7 +1613,7 @@ ifval([$2], , [ifval([$1], [AC_CONFIG_SRCDIR([$1])])])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()]) @@ -1691,7 +1691,7 @@ AU_DEFUN([AC_WITH], # # 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 @@ -1702,7 +1702,7 @@ ac_cv_env_$1_value=$$1])dnl # _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 @@ -1869,7 +1869,7 @@ AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # _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], @@ -1965,7 +1965,7 @@ AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], []) # 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 @@ -1985,7 +1985,7 @@ done # 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. @@ -2006,7 +2006,7 @@ fi # _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. @@ -2036,7 +2036,7 @@ define([_AC_CACHE_DUMP], # ------------- # 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 @@ -2070,7 +2070,7 @@ rm -f confcache[]dnl # ------------------------------------------ # 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 @@ -2083,7 +2083,7 @@ AC_VAR_SET_IFELSE([$1], # 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]))]) @@ -2099,14 +2099,14 @@ 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])])]) @@ -2115,7 +2115,7 @@ define([AC_DEFINE_TRACE], # 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 @@ -2127,7 +2127,7 @@ 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 <&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 ]) @@ -2279,7 +2279,7 @@ _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 ]) @@ -2287,7 +2287,7 @@ _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 ]) @@ -2296,7 +2296,7 @@ _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 ]) @@ -2304,14 +2304,14 @@ _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]); }]) @@ -2409,7 +2409,7 @@ AC_DEFUN([AC_TRY_COMMAND], # 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 ])]) @@ -2483,7 +2483,7 @@ $2], # 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 @@ -2787,7 +2787,7 @@ AC_VAR_POPDEF([ac_Lib])dnl # 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[).])]) @@ -2903,7 +2903,7 @@ rm -f conftest* # --------------------------------------------------------------------- # 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 @@ -2944,7 +2944,7 @@ AC_DEFUN([AC_TRY_COMPILE], # ------------------------------------------------------------------ # 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 @@ -3002,7 +3002,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5]) # ------------------------------------------------------------ # 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) && @@ -3064,7 +3064,7 @@ AC_VAR_POPDEF([ac_Header])dnl ])# 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.])])]) @@ -3173,14 +3173,14 @@ $3], # 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 @@ -3192,7 +3192,7 @@ LIBOBJS="$LIBOBJS $1.$ac_objext"]) # ------------------------- # 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 @@ -3209,7 +3209,7 @@ define([AC_LIBOBJ], # --------------------------------------------------------- # 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 @@ -3237,14 +3237,14 @@ $2=$ac_lo[]dnl # _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 @@ -3360,7 +3360,7 @@ AC_DEFINE_UNQUOTED(AC_TR_CPP(sizeof_$1), $AC_TR_SH([ac_cv_sizeof_$1]), # (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, @@ -3399,7 +3399,7 @@ $2], # 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 does not define.])])dnl @@ -3414,7 +3414,7 @@ define([_AC_CHECK_TYPE_OLD], # 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 @@ -3424,7 +3424,7 @@ define([_AC_CHECK_TYPE_REPLACEMENT_TYPE_P], # _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 @@ -3541,7 +3541,7 @@ AC_DEFUN([AC_CHECK_TYPE], # 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])]) @@ -3551,14 +3551,14 @@ define([AC_CONFIG_IF_MEMBER], # ----------------------------------------------------- # 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])])]) @@ -3567,7 +3567,7 @@ define([_AC_CONFIG_DEPENDENCY], # _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, [:], [,]))]) @@ -3584,7 +3584,7 @@ m4_divert_pop()dnl # # 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, [:.*])) @@ -3610,13 +3610,13 @@ m4_divert_pop()dnl # `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]) @@ -3640,8 +3640,8 @@ ac_config_commands="$ac_config_commands $1" ])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) @@ -3659,7 +3659,7 @@ define([AC_LIST_COMMANDS_COMMANDS]) # 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 ]) @@ -3676,7 +3676,7 @@ AC_DEFUN([AC_CONFIG_COMMANDS_PRE], ])]) # Initialize. -define([AC_OUTPUT_COMMANDS_PRE]) +m4_define([AC_OUTPUT_COMMANDS_PRE]) # AC_CONFIG_COMMANDS_POST(CMDS) @@ -3687,7 +3687,7 @@ AC_DEFUN([AC_CONFIG_COMMANDS_POST], ])]) # Initialize. -define([AC_OUTPUT_COMMANDS_POST]) +m4_define([AC_OUTPUT_COMMANDS_POST]) # AC_CONFIG_HEADERS(HEADERS..., [COMMANDS], [INIT-CMDS]) @@ -3720,8 +3720,8 @@ ac_config_headers="$ac_config_headers $1" # 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 ...) @@ -3756,8 +3756,8 @@ ac_config_links="$ac_config_links $1" # 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...) @@ -3777,7 +3777,7 @@ define([AC_LIST_LINKS_COMMANDS]) 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 @@ -3826,8 +3826,8 @@ ac_config_files="$ac_config_files $1" ])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 ...) @@ -3854,7 +3854,7 @@ AC_SUBST(subdirs, "$subdirs $1")dnl ]) # Initialize the list. -define([_AC_LIST_SUBDIRS]) +m4_define([_AC_LIST_SUBDIRS]) # autoupdate::AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS]) @@ -3879,7 +3879,7 @@ m4_ifvanl([$2$3], # 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 @@ -3931,7 +3931,7 @@ AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [_AC_OUTPUT_SUBDIRS()])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 @@ -4153,7 +4153,7 @@ chmod +x $CONFIG_STATUS # 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. @@ -4192,7 +4192,7 @@ rm -f confdef2opt.sed # # 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 <>$CONFIG_STATUS <<\EOF # @@ -4622,7 +4622,7 @@ 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 # @@ -4684,7 +4684,7 @@ 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 # @@ -4710,7 +4710,7 @@ 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. diff --git a/lib/autoconf/lang.m4 b/lib/autoconf/lang.m4 index abada399..9a6ccc8f 100644 --- a/lib/autoconf/lang.m4 +++ b/lib/autoconf/lang.m4 @@ -94,7 +94,7 @@ # ------------------------------------------------------------ # 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, $@)]) @@ -102,7 +102,7 @@ define([AC_LANG_CASE], # ------------------------------------ # 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])])]) @@ -117,14 +117,14 @@ define([_AC_LANG_DISPATCH], # 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])]) @@ -132,7 +132,7 @@ 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 @@ -159,7 +159,7 @@ AU_DEFUN([AC_LANG_RESTORE], [AC_LANG_POP($@)]) # --------------- # 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, $@)]) @@ -171,7 +171,7 @@ define([_AC_LANG_ABBREV], # 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' @@ -187,7 +187,7 @@ AU_DEFUN([AC_LANG_C], [AC_LANG(C)]) # _AC_LANG_ABBREV(C) # ------------------ -define([_AC_LANG_ABBREV(C)], [c]) +m4_define([_AC_LANG_ABBREV(C)], [c]) # ---------------------- # @@ -198,7 +198,7 @@ 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' @@ -214,7 +214,7 @@ AU_DEFUN([AC_LANG_CPLUSPLUS], [AC_LANG(C++)]) # _AC_LANG_ABBREV(C++) # -------------------- -define([_AC_LANG_ABBREV(C++)], [cxx]) +m4_define([_AC_LANG_ABBREV(C++)], [cxx]) # ----------------------------- # @@ -224,7 +224,7 @@ 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' @@ -239,7 +239,7 @@ AU_DEFUN([AC_LANG_FORTRAN77], [AC_LANG(Fortran 77)]) # _AC_LANG_ABBREV(Fortran 77) # --------------------------- -define([_AC_LANG_ABBREV(Fortran 77)], [f77]) +m4_define([_AC_LANG_ABBREV(Fortran 77)], [f77]) @@ -256,7 +256,7 @@ 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]) @@ -319,7 +319,7 @@ AC_DEFUN([AC_LANG_INT_SAVE], # ----------------------- # 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]) @@ -327,7 +327,7 @@ $1]) # AC_LANG_PROGRAM(C)([PROLOGUE], [BODY]) # -------------------------------------- -define([AC_LANG_PROGRAM(C)], +m4_define([AC_LANG_PROGRAM(C)], [$1 int main () @@ -343,7 +343,7 @@ $2 # 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. */ @@ -360,7 +360,7 @@ char $2 ();])], [$2 ();])]) # Don't include because on OSF/1 3.0 it includes # which includes 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. */ @@ -387,7 +387,7 @@ f = $1; # 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)@:>@])]) @@ -395,7 +395,7 @@ define([AC_LANG_BOOL_COMPILE_TRY(C)], # ----------------------------------------- # 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) @@ -409,7 +409,7 @@ fprintf (f, "%d\n", ($2));])]) # AC_LANG_SOURCE(C++)(BODY) # ------------------------- -define([AC_LANG_SOURCE(C++)], +m4_define([AC_LANG_SOURCE(C++)], [#line __oline__ "configure" #include "confdefs.h" #ifdef __cplusplus @@ -421,31 +421,31 @@ $1]) # 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)])) @@ -458,14 +458,14 @@ 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]) @@ -474,7 +474,7 @@ $2 # 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])]) @@ -494,7 +494,7 @@ define([AC_LANG_CALL(Fortran 77)], # 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, $@)]) @@ -518,7 +518,7 @@ AC_DEFUN([AC_REQUIRE_CPP], # _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 @@ -546,7 +546,7 @@ AC_MSG_RESULT($cross_compiling) # _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__ @@ -582,11 +582,11 @@ AC_DEFUN_ONCE([AC_NO_EXECUTABLES], 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 @@ -725,7 +725,7 @@ AC_LANG_POP # 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" @@ -914,7 +914,7 @@ AC_LANG_POP # 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" @@ -999,7 +999,7 @@ AC_LANG_POP # 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= diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index b4d081f9..6a65d12b 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -64,7 +64,7 @@ # 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=' ' ;; @@ -144,7 +144,7 @@ fi]) # _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 @@ -337,7 +337,7 @@ fi # ----------------------------------------------------------------- # 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 @@ -354,7 +354,7 @@ AC_VAR_POPDEF([ac_Header])dnl # 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 @@ -548,7 +548,7 @@ fi # _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], @@ -565,7 +565,7 @@ define([_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H], # _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], @@ -971,7 +971,7 @@ with arguments. Remove this warning when you adjust your code.])]) # _AC_SYS_LARGEFILE_SOURCE(PROLOGUE, BODY) # ---------------------------------------- -define([_AC_SYS_LARGEFILE_SOURCE], +m4_define([_AC_SYS_LARGEFILE_SOURCE], [AC_LANG_PROGRAM( [$1 @%:@include @@ -984,7 +984,7 @@ int a[[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1]];], # 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 @@ -1247,7 +1247,7 @@ fi # ---------------- # 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 @@ -1288,7 +1288,7 @@ fi # ----------------- # 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=' @@ -1498,7 +1498,7 @@ AC_SUBST(X_EXTRA_LIBS)dnl # ---------- # 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__ @@ -1515,7 +1515,7 @@ test "$ac_cv_cygwin" = yes && CYGWIN=yes[]dnl # ---------- # 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], @@ -1528,7 +1528,7 @@ test "$ac_cv_emxos2" = yes && EMXOS2=yes[]dnl # ----------- # 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], @@ -1558,7 +1558,7 @@ AC_DEFUN([AC_OBJEXT], []) # 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 ;; @@ -1588,7 +1588,7 @@ AC_SUBST(EXEEXT)dnl # Check the object extension used by the compiler: typically .o or # .obj. If this is called, some other behaviour will change, # determined by ac_objext. -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