### vim:ft=zsh:foldmethod=marker
###
### Frank Terbeck <ft@bewatermyfriend.org>
### Last-Modified: Sat May  9 15:33:41 2009
###
### URI: <http://ft.bewatermyfriend.org/comp/zsh.html>
###
emulate zsh
setopt extended_glob
local features prefix debug fstring i
declare -A features

prefix='/usr/local'
debug=2

features=(
    # input
    aac         y
    ffmpeg      y
    flac        y
    mad         y
    mikmod      y
    modplug     y
    mp4         y
    mpc         y
    vorbis      y
    wav         y
    waveout     n
    wavpack     y
    # output
    alsa        y
    ao          y
    arts        n
    oss         y
    sun         n
    # other
    tremor      n
)

for i in ${(k)features} ; do
    if [[ -n $fstring ]] ; then
        fstring+=" CONFIG_${(U)i}=${features[${i}]}"
    else
        fstring="CONFIG_${(U)i}=${features[${i}]}"
    fi
done
print -l ${(z)fstring}
./configure DEBUG=${debug}      \
            prefix=${prefix}    \
            ${(z)fstring}