+2000-03-14 Akim Demaille <akim@epita.fr>
+
+ * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): When there were no
+ CONFIG_FILES, we had to expand _AC_OUTPUT_FILES into the KILL
+ diversion, because it is AC_OUTPUT_FILES which undiverted the
+ AC_SUBST sed script at its proper place, otherwise it would have
+ been undiverted at the end of `configure', leading to an sh syntax
+ error.
+ Now that we no longer use a diversion, we don't need to call
+ AC_OUTPUT_FILES if useless.
+ (AC_OUTPUT_FILES): Rename as _AC_OUTPUT_FILES.
+ (AC_OUTPUT_LINKS): Rename as _AC_OUTPUT_LINKS.
+
2000-03-14 Akim Demaille <akim@epita.fr>
AC_ARG_PROGRAM must not be expanded twice, which is likely since
# empty value, not an empty second argument.
#
# Beware that if you change this macro, you also have to change the
-# sed script at the top of AC_OUTPUT_FILES.
+# sed script at the top of _AC_OUTPUT_FILES.
define([AC_SUBST],
[ifval([$2], [$1=$2
])[]dnl
EOF])
-dnl The following three sections are in charge of their own here
+dnl The following four sections are in charge of their own here
dnl documenting into $CONFIG_STATUS.
-
-dnl Because AC_OUTPUT_FILES is in charge of undiverting the AC_SUBST
-dnl section, it is better to divert it to void and *call it*, rather
-dnl than not calling it at all
-ifset([AC_LIST_FILES],
- [AC_OUTPUT_FILES()],
- [AC_DIVERT_PUSH([KILL])dnl
- AC_OUTPUT_FILES()dnl
- AC_DIVERT_POP()])dnl
-ifset([AC_LIST_HEADERS],
- [_AC_OUTPUT_HEADERS()])dnl
-ifset([AC_LIST_LINKS],
- [AC_OUTPUT_LINKS()])dnl
-ifset([AC_LIST_COMMANDS],
- [_AC_OUTPUT_COMMANDS()])dnl
+ifset([AC_LIST_FILES], [_AC_OUTPUT_FILES()])dnl
+ifset([AC_LIST_HEADERS], [_AC_OUTPUT_HEADERS()])dnl
+ifset([AC_LIST_LINKS], [_AC_OUTPUT_LINKS()])dnl
+ifset([AC_LIST_COMMANDS], [_AC_OUTPUT_COMMANDS()])dnl
cat >>$CONFIG_STATUS <<\EOF
]])# AC_OUTPUT_MAKE_DEFS
-# AC_OUTPUT_FILES
-# ---------------
+# _AC_OUTPUT_FILES
+# ----------------
# Do the variable substitutions to create the Makefiles or whatever.
# This is a subroutine of AC_OUTPUT.
#
# It has to send itself into $CONFIG_STATUS (eg, via here documents).
# Upon exit, no here document shall be opened.
-define(AC_OUTPUT_FILES,
+define(_AC_OUTPUT_FILES,
[cat >>$CONFIG_STATUS <<EOF
#
fi; done
rm -f $ac_cs_root.s*
EOF
-])# AC_OUTPUT_FILES
+])# _AC_OUTPUT_FILES
# _AC_OUTPUT_HEADERS
# Optimization 4. Once a substitution performed, since there can be
# only one per line, immediately restart the script on the next input
# line (using the `t' sed instruction). Divides by about 2.
-# *Note:* In the case of the AC_SUBST sed script (AC_OUTPUT_FILES)
+# *Note:* In the case of the AC_SUBST sed script (_AC_OUTPUT_FILES)
# this optimization cannot be applied as is, because there can be
# several substitutions per line.
#
])# _AC_OUTPUT_HEADERS
-# AC_OUTPUT_LINKS
-# ---------------
+# _AC_OUTPUT_LINKS
+# ----------------
# This is a subroutine of AC_OUTPUT.
#
# It has to send itself into $CONFIG_STATUS (eg, via here documents).
# Upon exit, no here document shall be opened.
-define(AC_OUTPUT_LINKS,
+define(_AC_OUTPUT_LINKS,
[cat >>$CONFIG_STATUS <<\EOF
#
])dnl
fi; done
EOF
-])# AC_OUTPUT_LINKS
+])# _AC_OUTPUT_LINKS
# _AC_OUTPUT_COMMANDS
# empty value, not an empty second argument.
#
# Beware that if you change this macro, you also have to change the
-# sed script at the top of AC_OUTPUT_FILES.
+# sed script at the top of _AC_OUTPUT_FILES.
define([AC_SUBST],
[ifval([$2], [$1=$2
])[]dnl
EOF])
-dnl The following three sections are in charge of their own here
+dnl The following four sections are in charge of their own here
dnl documenting into $CONFIG_STATUS.
-
-dnl Because AC_OUTPUT_FILES is in charge of undiverting the AC_SUBST
-dnl section, it is better to divert it to void and *call it*, rather
-dnl than not calling it at all
-ifset([AC_LIST_FILES],
- [AC_OUTPUT_FILES()],
- [AC_DIVERT_PUSH([KILL])dnl
- AC_OUTPUT_FILES()dnl
- AC_DIVERT_POP()])dnl
-ifset([AC_LIST_HEADERS],
- [_AC_OUTPUT_HEADERS()])dnl
-ifset([AC_LIST_LINKS],
- [AC_OUTPUT_LINKS()])dnl
-ifset([AC_LIST_COMMANDS],
- [_AC_OUTPUT_COMMANDS()])dnl
+ifset([AC_LIST_FILES], [_AC_OUTPUT_FILES()])dnl
+ifset([AC_LIST_HEADERS], [_AC_OUTPUT_HEADERS()])dnl
+ifset([AC_LIST_LINKS], [_AC_OUTPUT_LINKS()])dnl
+ifset([AC_LIST_COMMANDS], [_AC_OUTPUT_COMMANDS()])dnl
cat >>$CONFIG_STATUS <<\EOF
]])# AC_OUTPUT_MAKE_DEFS
-# AC_OUTPUT_FILES
-# ---------------
+# _AC_OUTPUT_FILES
+# ----------------
# Do the variable substitutions to create the Makefiles or whatever.
# This is a subroutine of AC_OUTPUT.
#
# It has to send itself into $CONFIG_STATUS (eg, via here documents).
# Upon exit, no here document shall be opened.
-define(AC_OUTPUT_FILES,
+define(_AC_OUTPUT_FILES,
[cat >>$CONFIG_STATUS <<EOF
#
fi; done
rm -f $ac_cs_root.s*
EOF
-])# AC_OUTPUT_FILES
+])# _AC_OUTPUT_FILES
# _AC_OUTPUT_HEADERS
# Optimization 4. Once a substitution performed, since there can be
# only one per line, immediately restart the script on the next input
# line (using the `t' sed instruction). Divides by about 2.
-# *Note:* In the case of the AC_SUBST sed script (AC_OUTPUT_FILES)
+# *Note:* In the case of the AC_SUBST sed script (_AC_OUTPUT_FILES)
# this optimization cannot be applied as is, because there can be
# several substitutions per line.
#
])# _AC_OUTPUT_HEADERS
-# AC_OUTPUT_LINKS
-# ---------------
+# _AC_OUTPUT_LINKS
+# ----------------
# This is a subroutine of AC_OUTPUT.
#
# It has to send itself into $CONFIG_STATUS (eg, via here documents).
# Upon exit, no here document shall be opened.
-define(AC_OUTPUT_LINKS,
+define(_AC_OUTPUT_LINKS,
[cat >>$CONFIG_STATUS <<\EOF
#
])dnl
fi; done
EOF
-])# AC_OUTPUT_LINKS
+])# _AC_OUTPUT_LINKS
# _AC_OUTPUT_COMMANDS