+1999-09-27 Akim Demaille <akim@epita.fr>
+
+ * acgeneral.m4 (AC_OUTPUT): Divert AC_OUTPUT_FILE to
+ AC_DIVERSION_KILL if there are no CONFIG_FILES.
+ (AC_OUTPUT, ac_cs_usage): Output the list of files to instanciate
+ only if there are.
+
1999-09-27 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (AC_CHECK_DECL): Renamed as...
])
dnl AC_OUTPUT([CONFIG_FILES...] [, EXTRA-CMDS] [, INIT-CMDS])
-dnl -------------------------------------------------
+dnl ---------------------------------------------------------
dnl The big finish.
dnl Produce config.status, config.h, and links; and configure subdirs.
dnl The CONFIG_HEADERS are defined in the m4 variable AC_LIST_HEADER.
# configure, is in ./config.log if it exists.
ac_cs_usage="\\
-\\\`$CONFIG_STATUS' configures files from templates according to the current
-configuration.
+\\\`$CONFIG_STATUS' instanciates files from templates according to the
+current configuration.
Usage: $CONFIG_STATUS @BKL@OPTIONS@BKR@ FILE...
--version Print the version of Autoconf and exit
--help Display this help and exit
-By default the following files will updated.
+dnl Output this only if there are files to instanciate.
+ifset(ifdef([AC_LIST_HEADER], 1)$1,
+[Files to instanciate:
ifset($1, [ Configuration files:
AC_WRAP($1, [ ])
])dnl
ifdef([AC_LIST_HEADER], [ Configuration headers:
-AC_WRAP(AC_LIST_HEADER, [ ])]
-)dnl
+AC_WRAP(AC_LIST_HEADER, [ ])
+])dnl
+])dnl
Report bugs to <bug-autoconf@gnu.org>."
ac_cs_version="\
dnl files of config.status.
# Root of the tmp file names. Use pid to allow concurrent executions.
ac_cs_root=cs\$\$
-
ac_given_srcdir=$srcdir
ifdef([AC_PROVIDE_AC_PROG_INSTALL], [ac_given_INSTALL="$INSTALL"
])dnl
# Files that config.status was made for.
-AC_WRAP([config_files="]$1["]
-)
-ifdef([AC_LIST_HEADER], [AC_WRAP([config_headers="]AC_LIST_HEADER["])]
-)dnl
+ifset([$1], [AC_WRAP([config_files="]$1["])
+])dnl
+ifdef([AC_LIST_HEADER], [AC_WRAP([config_headers="]AC_LIST_HEADER["])
+])dnl
for ac_option
do
EOF
-cat >> $CONFIG_STATUS <<EOF
+dnl Issue this section only if there were actually config files.
+ifset(ifdef([AC_LIST_HEADER], 1)[$1],
+[cat >> $CONFIG_STATUS <<EOF
# If there were arguments, don't assign a default value.
if test \$[#] = 0; then
- : \${CONFIG_FILES="\$config_files"}
+ifset([$1], [ : \${CONFIG_FILES="\$config_files"}
+])dnl
ifdef([AC_LIST_HEADER], [ : \${CONFIG_HEADERS="\$config_headers"}
])dnl
fi
trap 'rm -fr \$ac_cs_root*; exit 1' 1 2 15
EOF
+])[]dnl
dnl The following three sections are in charge of their own here
dnl documenting into $CONFIG_STATUS.
-AC_OUTPUT_FILES($1)
+
+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([$1],
+ [AC_OUTPUT_FILES([$1])],
+ [AC_DIVERT_PUSH(AC_DIVERSION_KILL)dnl
+AC_OUTPUT_FILES([$1])dnl
+AC_DIVERT_POP()])dnl
ifdef([AC_LIST_HEADER], [AC_OUTPUT_HEADER(AC_LIST_HEADER)])dnl
ifdef([AC_LIST_LINKS], [AC_OUTPUT_LINKS(AC_LIST_FILES, AC_LIST_LINKS)])dnl
# configure, is in ./config.log if it exists.
ac_cs_usage="\\
-\\\`$CONFIG_STATUS' configures files from templates according to the current
-configuration.
+\\\`$CONFIG_STATUS' instanciates files from templates according to the
+current configuration.
Usage: $CONFIG_STATUS [OPTIONS] FILE...
--version Print the version of Autoconf and exit
--help Display this help and exit
-By default the following files will updated.
+Files to instanciate:
Configuration files:
Makefile testsuite/Makefile
-
Report bugs to <bug-autoconf@gnu.org>."
ac_cs_version="\
# Root of the tmp file names. Use pid to allow concurrent executions.
ac_cs_root=cs\$\$
-
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
EOF
+
cat >>$CONFIG_STATUS <<EOF
# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
rm -f $ac_cs_root.s*
EOF
-
cat >> $CONFIG_STATUS <<EOF
EOF
])
dnl AC_OUTPUT([CONFIG_FILES...] [, EXTRA-CMDS] [, INIT-CMDS])
-dnl -------------------------------------------------
+dnl ---------------------------------------------------------
dnl The big finish.
dnl Produce config.status, config.h, and links; and configure subdirs.
dnl The CONFIG_HEADERS are defined in the m4 variable AC_LIST_HEADER.
# configure, is in ./config.log if it exists.
ac_cs_usage="\\
-\\\`$CONFIG_STATUS' configures files from templates according to the current
-configuration.
+\\\`$CONFIG_STATUS' instanciates files from templates according to the
+current configuration.
Usage: $CONFIG_STATUS @BKL@OPTIONS@BKR@ FILE...
--version Print the version of Autoconf and exit
--help Display this help and exit
-By default the following files will updated.
+dnl Output this only if there are files to instanciate.
+ifset(ifdef([AC_LIST_HEADER], 1)$1,
+[Files to instanciate:
ifset($1, [ Configuration files:
AC_WRAP($1, [ ])
])dnl
ifdef([AC_LIST_HEADER], [ Configuration headers:
-AC_WRAP(AC_LIST_HEADER, [ ])]
-)dnl
+AC_WRAP(AC_LIST_HEADER, [ ])
+])dnl
+])dnl
Report bugs to <bug-autoconf@gnu.org>."
ac_cs_version="\
dnl files of config.status.
# Root of the tmp file names. Use pid to allow concurrent executions.
ac_cs_root=cs\$\$
-
ac_given_srcdir=$srcdir
ifdef([AC_PROVIDE_AC_PROG_INSTALL], [ac_given_INSTALL="$INSTALL"
])dnl
# Files that config.status was made for.
-AC_WRAP([config_files="]$1["]
-)
-ifdef([AC_LIST_HEADER], [AC_WRAP([config_headers="]AC_LIST_HEADER["])]
-)dnl
+ifset([$1], [AC_WRAP([config_files="]$1["])
+])dnl
+ifdef([AC_LIST_HEADER], [AC_WRAP([config_headers="]AC_LIST_HEADER["])
+])dnl
for ac_option
do
EOF
-cat >> $CONFIG_STATUS <<EOF
+dnl Issue this section only if there were actually config files.
+ifset(ifdef([AC_LIST_HEADER], 1)[$1],
+[cat >> $CONFIG_STATUS <<EOF
# If there were arguments, don't assign a default value.
if test \$[#] = 0; then
- : \${CONFIG_FILES="\$config_files"}
+ifset([$1], [ : \${CONFIG_FILES="\$config_files"}
+])dnl
ifdef([AC_LIST_HEADER], [ : \${CONFIG_HEADERS="\$config_headers"}
])dnl
fi
trap 'rm -fr \$ac_cs_root*; exit 1' 1 2 15
EOF
+])[]dnl
dnl The following three sections are in charge of their own here
dnl documenting into $CONFIG_STATUS.
-AC_OUTPUT_FILES($1)
+
+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([$1],
+ [AC_OUTPUT_FILES([$1])],
+ [AC_DIVERT_PUSH(AC_DIVERSION_KILL)dnl
+AC_OUTPUT_FILES([$1])dnl
+AC_DIVERT_POP()])dnl
ifdef([AC_LIST_HEADER], [AC_OUTPUT_HEADER(AC_LIST_HEADER)])dnl
ifdef([AC_LIST_LINKS], [AC_OUTPUT_LINKS(AC_LIST_FILES, AC_LIST_LINKS)])dnl