]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acgeneral.m4 (AC_EXPAND_ONCE): Remove, use m4_expand_once.
authorAkim Demaille <akim@epita.fr>
Tue, 23 Jan 2001 17:04:35 +0000 (17:04 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 23 Jan 2001 17:04:35 +0000 (17:04 +0000)
(AC_DIVERT_ONCE): Move to...
* m4sugar.m4 (m4_expand_once): here.

ChangeLog
acgeneral.m4
aclang.m4
acspecific.m4
lib/autoconf/c.m4
lib/autoconf/fortran.m4
lib/autoconf/general.m4
lib/autoconf/lang.m4
lib/autoconf/specific.m4
lib/m4sugar/m4sugar.m4
m4sugar.m4

index 748ccf4e10dd3b81345beb5dc23bc17ef393e6aa..f13ed7110121594d87cade28aec79d9f0c0c66be 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-01-23  Akim Demaille  <akim@epita.fr>
+
+       * acgeneral.m4 (AC_EXPAND_ONCE): Remove, use m4_expand_once.
+       (AC_DIVERT_ONCE): Move to...
+       * m4sugar.m4 (m4_expand_once): here.
+
 2001-01-23  Akim Demaille  <akim@epita.fr>
 
        * aclang.m4 (_AC_LANG_SET): Turn off optimizations.
index 4019089c28a4c31aa3213ffea6a909a84d63a64a..5bba8a2fc55fe6f6dfd60696bd3da911c8843b5d 100644 (file)
@@ -134,14 +134,6 @@ m4_define([_m4_divert(PREPARE)],       100)
 
 
 
-# AC_DIVERT_ONCE(DIVERSION-NAME, CONTENT)
-# ---------------------------------------
-# Output once CONTENT into DIVERSION-NAME (which may be a number
-# actually).  An end of line is appended for free to CONTENT.
-m4_define([AC_DIVERT_ONCE],
-[AC_EXPAND_ONCE([m4_divert_text([$1], [$2])])])
-
-
 # AC_DIVERT_PUSH(DIVERSION-NAME)
 # AC_DIVERT_POP
 # ------------------------------
@@ -201,15 +193,6 @@ m4_define([AC_BEFORE],
 m4_copy([m4_require], [AC_REQUIRE])
 
 
-# AC_EXPAND_ONCE(TEXT)
-# --------------------
-# If TEXT has never been expanded, expand it *here*.
-m4_define([AC_EXPAND_ONCE],
-[m4_expand_once([$1],
-                [],
-                [AC_PROVIDE([$1])[]$1])])
-
-
 # AC_PROVIDE(MACRO-NAME)
 # ----------------------
 # Ideally we should just use `m4_provide($1)', but unfortunately many
@@ -1572,11 +1555,11 @@ m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
 # AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
 # ------------------------------------------------------------------------
 AC_DEFUN([AC_ARG_ENABLE],
-[AC_DIVERT_ONCE([HELP_ENABLE], [[
+[m4_divert_once([HELP_ENABLE], [[
 Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]]])dnl
-AC_DIVERT_ONCE([HELP_ENABLE], [$2])dnl
+m4_divert_once([HELP_ENABLE], [$2])dnl
 # Check whether --enable-$1 or --disable-$1 was given.
 if test "[${enable_]m4_patsubst([$1], -, _)+set}" = set; then
   enableval="[$enable_]m4_patsubst([$1], -, _)"
@@ -1600,11 +1583,11 @@ AU_DEFUN([AC_ENABLE],
 # AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
 # --------------------------------------------------------------------
 AC_DEFUN([AC_ARG_WITH],
-[AC_DIVERT_ONCE([HELP_WITH], [[
+[m4_divert_once([HELP_WITH], [[
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)]])
-AC_DIVERT_ONCE([HELP_WITH], [$2])dnl
+m4_divert_once([HELP_WITH], [$2])dnl
 # Check whether --with-$1 or --without-$1 was given.
 if test "[${with_]m4_patsubst([$1], -, _)+set}" = set; then
   withval="[$with_]m4_patsubst([$1], -, _)"
@@ -1639,7 +1622,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.
 m4_define([_AC_ARG_VAR_PRECIOUS],
-[AC_DIVERT_ONCE([PARSE_ARGS],
+[m4_divert_once([PARSE_ARGS],
 [ac_env_$1_set=${$1+set}
 ac_env_$1_value=$$1
 ac_cv_env_$1_set=${$1+set}
@@ -1688,12 +1671,12 @@ fi
 # Register VARNAME as a precious variable, and document it in
 # `configure --help' (but only once).
 AC_DEFUN([AC_ARG_VAR],
-[AC_DIVERT_ONCE([HELP_VAR], [
-Some influential environment variables:])dnl
-AC_DIVERT_ONCE([HELP_VAR_END], [
+[m4_divert_once([HELP_VAR], [[
+Some influential environment variables:]])dnl
+m4_divert_once([HELP_VAR_END], [
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.])dnl
-AC_DIVERT_ONCE([HELP_VAR], [AC_HELP_STRING([$1], [$2], [              ])])dnl
+m4_divert_once([HELP_VAR], [AC_HELP_STRING([$1], [$2], [              ])])dnl
 _AC_ARG_VAR_PRECIOUS([$1])dnl
 ])# AC_ARG_VAR
 
@@ -2104,7 +2087,7 @@ EOF
 # If VARIABLE has not already been AC_SUBST'ed, append the sed PROGRAM
 # to `_AC_SUBST_SED_PROGRAM'.
 m4_define([_AC_SUBST],
-[AC_EXPAND_ONCE([m4_append([_AC_SUBST_SED_PROGRAM],
+[m4_expand_once([m4_append([_AC_SUBST_SED_PROGRAM],
 [$2
 ])])dnl
 ])
index 0a5075e6f517be8482041f8008517e7c78afceff..1fa961f72e5a6583af513f253d8a8f821bd3c590 100644 (file)
--- a/aclang.m4
+++ b/aclang.m4
@@ -885,8 +885,8 @@ fi
 
 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
 
-AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl
-AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl
+m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
+m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 _AC_LANG_COMPILER_WORKS
 _AC_LANG_COMPILER_GNU
 GCC=`test $ac_compiler_gnu = yes && echo yes`
@@ -1089,8 +1089,8 @@ AC_CHECK_TOOLS(CXX,
                           [g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC])],
                g++)
 
-AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl
-AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl
+m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
+m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 _AC_LANG_COMPILER_WORKS
 _AC_LANG_COMPILER_GNU
 GXX=`test $ac_compiler_gnu = yes && echo yes`
@@ -1211,8 +1211,8 @@ AC_CHECK_TOOLS(F77,
       [m4_default([$1],
                   [g77 f77 xlf cf77 pgf77 fl32 fort77 f90 xlf90 f95 lf95 pgf90 fc])])
 
-AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl
-AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl
+m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
+m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 _AC_LANG_COMPILER_WORKS
 # If we don't use `.F' as extension, the preprocessor is not run on the
 # input file.
index d4194f7b809b2fed4719b5f5f13ddc2900c7540d..6fc7d401f5d6220ec35fc777a0628a413cf9872b 100644 (file)
@@ -733,7 +733,7 @@ fi])dnl
 # --without-x overrides everything else, but does not touch the cache.
 AC_DEFUN([AC_PATH_X],
 [dnl Document the X abnormal options inherited from history.
-AC_DIVERT_ONCE([HELP_BEGIN], [
+m4_divert_once([HELP_BEGIN], [
 X features:
   --x-includes=DIR    X include files are in DIR
   --x-libraries=DIR   X library files are in DIR])dnl
index 0a5075e6f517be8482041f8008517e7c78afceff..1fa961f72e5a6583af513f253d8a8f821bd3c590 100644 (file)
@@ -885,8 +885,8 @@ fi
 
 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
 
-AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl
-AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl
+m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
+m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 _AC_LANG_COMPILER_WORKS
 _AC_LANG_COMPILER_GNU
 GCC=`test $ac_compiler_gnu = yes && echo yes`
@@ -1089,8 +1089,8 @@ AC_CHECK_TOOLS(CXX,
                           [g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC])],
                g++)
 
-AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl
-AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl
+m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
+m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 _AC_LANG_COMPILER_WORKS
 _AC_LANG_COMPILER_GNU
 GXX=`test $ac_compiler_gnu = yes && echo yes`
@@ -1211,8 +1211,8 @@ AC_CHECK_TOOLS(F77,
       [m4_default([$1],
                   [g77 f77 xlf cf77 pgf77 fl32 fort77 f90 xlf90 f95 lf95 pgf90 fc])])
 
-AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl
-AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl
+m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
+m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 _AC_LANG_COMPILER_WORKS
 # If we don't use `.F' as extension, the preprocessor is not run on the
 # input file.
index 0a5075e6f517be8482041f8008517e7c78afceff..1fa961f72e5a6583af513f253d8a8f821bd3c590 100644 (file)
@@ -885,8 +885,8 @@ fi
 
 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
 
-AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl
-AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl
+m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
+m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 _AC_LANG_COMPILER_WORKS
 _AC_LANG_COMPILER_GNU
 GCC=`test $ac_compiler_gnu = yes && echo yes`
@@ -1089,8 +1089,8 @@ AC_CHECK_TOOLS(CXX,
                           [g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC])],
                g++)
 
-AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl
-AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl
+m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
+m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 _AC_LANG_COMPILER_WORKS
 _AC_LANG_COMPILER_GNU
 GXX=`test $ac_compiler_gnu = yes && echo yes`
@@ -1211,8 +1211,8 @@ AC_CHECK_TOOLS(F77,
       [m4_default([$1],
                   [g77 f77 xlf cf77 pgf77 fl32 fort77 f90 xlf90 f95 lf95 pgf90 fc])])
 
-AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl
-AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl
+m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
+m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 _AC_LANG_COMPILER_WORKS
 # If we don't use `.F' as extension, the preprocessor is not run on the
 # input file.
index 4019089c28a4c31aa3213ffea6a909a84d63a64a..5bba8a2fc55fe6f6dfd60696bd3da911c8843b5d 100644 (file)
@@ -134,14 +134,6 @@ m4_define([_m4_divert(PREPARE)],       100)
 
 
 
-# AC_DIVERT_ONCE(DIVERSION-NAME, CONTENT)
-# ---------------------------------------
-# Output once CONTENT into DIVERSION-NAME (which may be a number
-# actually).  An end of line is appended for free to CONTENT.
-m4_define([AC_DIVERT_ONCE],
-[AC_EXPAND_ONCE([m4_divert_text([$1], [$2])])])
-
-
 # AC_DIVERT_PUSH(DIVERSION-NAME)
 # AC_DIVERT_POP
 # ------------------------------
@@ -201,15 +193,6 @@ m4_define([AC_BEFORE],
 m4_copy([m4_require], [AC_REQUIRE])
 
 
-# AC_EXPAND_ONCE(TEXT)
-# --------------------
-# If TEXT has never been expanded, expand it *here*.
-m4_define([AC_EXPAND_ONCE],
-[m4_expand_once([$1],
-                [],
-                [AC_PROVIDE([$1])[]$1])])
-
-
 # AC_PROVIDE(MACRO-NAME)
 # ----------------------
 # Ideally we should just use `m4_provide($1)', but unfortunately many
@@ -1572,11 +1555,11 @@ m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
 # AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
 # ------------------------------------------------------------------------
 AC_DEFUN([AC_ARG_ENABLE],
-[AC_DIVERT_ONCE([HELP_ENABLE], [[
+[m4_divert_once([HELP_ENABLE], [[
 Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]]])dnl
-AC_DIVERT_ONCE([HELP_ENABLE], [$2])dnl
+m4_divert_once([HELP_ENABLE], [$2])dnl
 # Check whether --enable-$1 or --disable-$1 was given.
 if test "[${enable_]m4_patsubst([$1], -, _)+set}" = set; then
   enableval="[$enable_]m4_patsubst([$1], -, _)"
@@ -1600,11 +1583,11 @@ AU_DEFUN([AC_ENABLE],
 # AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
 # --------------------------------------------------------------------
 AC_DEFUN([AC_ARG_WITH],
-[AC_DIVERT_ONCE([HELP_WITH], [[
+[m4_divert_once([HELP_WITH], [[
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)]])
-AC_DIVERT_ONCE([HELP_WITH], [$2])dnl
+m4_divert_once([HELP_WITH], [$2])dnl
 # Check whether --with-$1 or --without-$1 was given.
 if test "[${with_]m4_patsubst([$1], -, _)+set}" = set; then
   withval="[$with_]m4_patsubst([$1], -, _)"
@@ -1639,7 +1622,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.
 m4_define([_AC_ARG_VAR_PRECIOUS],
-[AC_DIVERT_ONCE([PARSE_ARGS],
+[m4_divert_once([PARSE_ARGS],
 [ac_env_$1_set=${$1+set}
 ac_env_$1_value=$$1
 ac_cv_env_$1_set=${$1+set}
@@ -1688,12 +1671,12 @@ fi
 # Register VARNAME as a precious variable, and document it in
 # `configure --help' (but only once).
 AC_DEFUN([AC_ARG_VAR],
-[AC_DIVERT_ONCE([HELP_VAR], [
-Some influential environment variables:])dnl
-AC_DIVERT_ONCE([HELP_VAR_END], [
+[m4_divert_once([HELP_VAR], [[
+Some influential environment variables:]])dnl
+m4_divert_once([HELP_VAR_END], [
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.])dnl
-AC_DIVERT_ONCE([HELP_VAR], [AC_HELP_STRING([$1], [$2], [              ])])dnl
+m4_divert_once([HELP_VAR], [AC_HELP_STRING([$1], [$2], [              ])])dnl
 _AC_ARG_VAR_PRECIOUS([$1])dnl
 ])# AC_ARG_VAR
 
@@ -2104,7 +2087,7 @@ EOF
 # If VARIABLE has not already been AC_SUBST'ed, append the sed PROGRAM
 # to `_AC_SUBST_SED_PROGRAM'.
 m4_define([_AC_SUBST],
-[AC_EXPAND_ONCE([m4_append([_AC_SUBST_SED_PROGRAM],
+[m4_expand_once([m4_append([_AC_SUBST_SED_PROGRAM],
 [$2
 ])])dnl
 ])
index 0a5075e6f517be8482041f8008517e7c78afceff..1fa961f72e5a6583af513f253d8a8f821bd3c590 100644 (file)
@@ -885,8 +885,8 @@ fi
 
 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
 
-AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl
-AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl
+m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
+m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 _AC_LANG_COMPILER_WORKS
 _AC_LANG_COMPILER_GNU
 GCC=`test $ac_compiler_gnu = yes && echo yes`
@@ -1089,8 +1089,8 @@ AC_CHECK_TOOLS(CXX,
                           [g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC])],
                g++)
 
-AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl
-AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl
+m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
+m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 _AC_LANG_COMPILER_WORKS
 _AC_LANG_COMPILER_GNU
 GXX=`test $ac_compiler_gnu = yes && echo yes`
@@ -1211,8 +1211,8 @@ AC_CHECK_TOOLS(F77,
       [m4_default([$1],
                   [g77 f77 xlf cf77 pgf77 fl32 fort77 f90 xlf90 f95 lf95 pgf90 fc])])
 
-AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl
-AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl
+m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
+m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 _AC_LANG_COMPILER_WORKS
 # If we don't use `.F' as extension, the preprocessor is not run on the
 # input file.
index d4194f7b809b2fed4719b5f5f13ddc2900c7540d..6fc7d401f5d6220ec35fc777a0628a413cf9872b 100644 (file)
@@ -733,7 +733,7 @@ fi])dnl
 # --without-x overrides everything else, but does not touch the cache.
 AC_DEFUN([AC_PATH_X],
 [dnl Document the X abnormal options inherited from history.
-AC_DIVERT_ONCE([HELP_BEGIN], [
+m4_divert_once([HELP_BEGIN], [
 X features:
   --x-includes=DIR    X include files are in DIR
   --x-libraries=DIR   X library files are in DIR])dnl
index b9a770c798674c25b5166ac879cd755440e7202b..57ce03645cadf15c000689e55f119e093396416c 100644 (file)
@@ -750,6 +750,14 @@ m4_divert_pop([$1])dnl
 ])
 
 
+# m4_divert_once(DIVERSION-NAME, CONTENT)
+# ---------------------------------------
+# Output once CONTENT into DIVERSION-NAME (which may be a number
+# actually).  An end of line is appended for free to CONTENT.
+m4_define([m4_divert_once],
+[m4_expand_once([m4_divert_text([$1], [$2])])])
+
+
 # m4_undivert(DIVERSION-NAME)
 # ---------------------------
 # Undivert DIVERSION-NAME.
index b9a770c798674c25b5166ac879cd755440e7202b..57ce03645cadf15c000689e55f119e093396416c 100644 (file)
@@ -750,6 +750,14 @@ m4_divert_pop([$1])dnl
 ])
 
 
+# m4_divert_once(DIVERSION-NAME, CONTENT)
+# ---------------------------------------
+# Output once CONTENT into DIVERSION-NAME (which may be a number
+# actually).  An end of line is appended for free to CONTENT.
+m4_define([m4_divert_once],
+[m4_expand_once([m4_divert_text([$1], [$2])])])
+
+
 # m4_undivert(DIVERSION-NAME)
 # ---------------------------
 # Undivert DIVERSION-NAME.