-mk="$srcdir/src/Makefile.am"
-# Extract all literal names from the definition of $(EXTRA_PROGRAMS)
-# in $mk but don't expand the variable references.
-# Append each literal name to $optional_bin_progs.
-v=EXTRA_PROGRAMS
-for gl_i in `sed -n '/^'$v' =/,/[[^\]]$/p' $mk \
- | sed 's/^ *//;/^\$.*/d;/^'$v' =/d' \
- | tr -s '\\015\\012\\\\' ' '`; do
- gl_ADD_PROG([optional_bin_progs], $gl_i)
-done
-
-# As above, extract literal names from the definition of $(no_install__progs)
-# in $mk but don't expand the variable references.
-v=no_install__progs
-t=`sed -n '/^'$v' =/,/[[^\]]$/p' $mk \
- | sed 's/^ *//;/^\$.*/d;/^'$v' =/d' \
- | tr -s '\\015\\012\\\\' ' '`
-# Remove any trailing space.
-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 hostname 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 literal 2nd argument below.
-c="$srcdir/configure.ac"
-re='^g''l_INCLUDE_EXCLUDE_PROG(.* [\[\(.*\)\]])'
-t=`sed -n '/'"$re"'/{s/'"$re"'/\1/;s/,/ /gp
-}' $c`
-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
- ($no_install_progs_default) also recorded in $mk]],
- 1) ;;
-esac