aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvuton Olrich <avuton@gmail.com>2010-04-17 15:52:28 -0700
committerAvuton Olrich <avuton@gmail.com>2010-04-21 12:23:38 -0700
commit615ccd1070def08b2e1245cc3487d0e1bb73696b (patch)
treed5ce11ef761d0c48ecf0645c4b15a22bcbb98084
parent6ed69e639579e8406dd6af9f9c9969e7c34fd329 (diff)
downloadmpd-615ccd1070def08b2e1245cc3487d0e1bb73696b.tar.gz
mpd-615ccd1070def08b2e1245cc3487d0e1bb73696b.tar.xz
mpd-615ccd1070def08b2e1245cc3487d0e1bb73696b.zip
configure.ac: Add optional third variable to results.
Add optional third value to results() to allow for non "yes" answers which are considered positive.
-rw-r--r--configure.ac2
-rw-r--r--m4/pretty_print.m410
2 files changed, 7 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 3e5561d42..b8c151156 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1478,7 +1478,7 @@ results(mad, [MAD])
results(mpg123, [MPG123])
results(mp4, [MP4])
results(mpc, [Musepack])
-results(oggflac, [OggFLAC])
+results(oggflac, [OggFLAC], flac)
echo -ne '\n\t'
results(with_tremor, [OggTremor])
results(vorbis, [OggVorbis])
diff --git a/m4/pretty_print.m4 b/m4/pretty_print.m4
index 37efe5de1..a22357a8d 100644
--- a/m4/pretty_print.m4
+++ b/m4/pretty_print.m4
@@ -1,17 +1,19 @@
AC_DEFUN([results], [
dnl This is a hack to allow "with" names, otherwise "enable".
- num=`expr match $1 "with"`
+ num=`expr match $1 'with'`
if test "$num" != "0"; then
var="`echo '$'$1`"
else
var="`echo '$'enable_$1`"
fi
- echo -n "("
+ echo -n '('
if eval "test x$var = xyes"; then
- echo -n "+"
+ echo -n '+'
+ elif test -n "$3" && eval "test x$var = x$3"; then
+ echo -n '+'
else
- echo -n "-"
+ echo -n '-'
fi
echo -n "$2) "
])