local QEMU_ARCH_LIST=`cat $SPELL_DIRECTORY/archs` &&

persistent_add QEMU_ARCHS &&

BACKTITLE="Qemu Archs Configuration"           &&
    TITLE="Arch Selection"                     &&
     HELP="Select Arch you want to build qemu" &&

# deliberately uses query, see locale CONFIGURE note
if query "Handpick architectures to emulate (y/n)?" n; then
  QEMU_ARCHS=`dialog --backtitle  "$BACKTITLE"  \
                     --title      "$TITLE"      \
                     --stdout                   \
                     --checklist  "$HELP"       \
                     0 0 0                      \
                     $QEMU_ARCH_LIST`
fi &&

if [[ -z $QEMU_ARCHS ]]; then
  QEMU_ARCHS=$(cut -f 1 $SPELL_DIRECTORY/archs | sed -e 's/^/"/' -e 's/\s*$/"/' | tr '\n' ' ')
fi
