mpd/m4/pretty_print.m4
Avuton Olrich 615ccd1070 configure.ac: Add optional third variable to results.
Add optional third value to results() to allow for non "yes" answers which are
considered positive.
2010-04-21 12:23:38 -07:00

20 lines
374 B
Plaintext

AC_DEFUN([results], [
dnl This is a hack to allow "with" names, otherwise "enable".
num=`expr match $1 'with'`
if test "$num" != "0"; then
var="`echo '$'$1`"
else
var="`echo '$'enable_$1`"
fi
echo -n '('
if eval "test x$var = xyes"; then
echo -n '+'
elif test -n "$3" && eval "test x$var = x$3"; then
echo -n '+'
else
echo -n '-'
fi
echo -n "$2) "
])