+2007-07-14 Jim Meyering <jim@meyering.net>
+
+ Change interface: make 2nd param _space_-separated, not comma-separated
+ * m4/include-exclude-prog.m4 (gl_INCLUDE_EXCLUDE_PROG): Remove now-
+ unnecessary use of tr.
+ Improve comments.
+ * configure.ac: Adjust caller, as well as the code that ensures the
+ 2nd parameter stays in sync with the list in src/Makefile.am.
+
2007-07-14 Karel Zak <kzak@redhat.com>
* m4/include-exclude-prog.m4 (gl_REMOVE_PROG): Fix typo: s/$2/$1/.
no_install_progs_default=`echo "$t"|sed 's/ $//'`
# Unfortunately, due to the way autoconf's AS_HELP_STRING works, the
-# list of default-not-installed programs, "arch,su", must appear in two
-# places: in this file below, and in $mk. Simply using comma-separated
-# variant of "$no_install_progs_default" cannot work. And we can't
-# substitute the names into $mk because automake needs the literals, too.
+# list of default-not-installed programs, "arch su", must appear in two
+# places: in this file below, and in $mk. Using "$no_install_progs_default"
+# below cannot work. And we can't substitute the names into $mk because
+# automake needs the literals, too.
# The compromise is to ensure that the space-separated list extracted
-# above matches the comma-separated list below.
+# above matches the literal 2nd argument below.
c="$srcdir/configure.ac"
t=`sed -n '/^g''l_INCLUDE_EXCLUDE_PROG(.* [\[\(.*\)\]])/s//\1/p' $c`
-u=`echo "$t"|sed 's/,/ /g'`
-case $u in
+case $t in
$no_install_progs_default) ;;
*) AC_MSG_ERROR([[internal error: g'l_INCLUDE_EXCLUDE_PROG's 2nd arg, $t,
does not match the list of default-not-installed programs
# "don't-install" requests.
# I.e., add any program name specified via --enable-install-program=..., and
# remove any program name specified via --enable-no-install-program=...
-gl_INCLUDE_EXCLUDE_PROG([optional_bin_progs], [arch,su])
+gl_INCLUDE_EXCLUDE_PROG([optional_bin_progs], [arch su])
# Set INSTALL_SU if su installation has been requested via
# --enable-install-program=su.
# Given the name of a variable containing a space-separated list of
# install-by-default programs and the list of do-not-install-by-default
-# programs, modify the former variable to reflect "don't-install" and
+# programs, modify the former variable to reflect "no-install" and
# "do-install" requests.
#
-# Usage: gl_INCLUDE_EXCLUDE_PROG([prog_list_var_name], [NI_prog1])
+# Usage: gl_INCLUDE_EXCLUDE_PROG([prog_list_var_name], [no_inst_prog_list])
AC_DEFUN([gl_INCLUDE_EXCLUDE_PROG],
[{
- gl_no_install_progs_default=`echo "$2"|tr -s , ' '`
+ gl_no_install_progs_default='$2'
AC_ARG_ENABLE([install-program],
[AS_HELP_STRING([--enable-install-program=PROG_LIST],
[install the programs in PROG_LIST (comma-separated,