if  !  grep  -q  "CONFIGURED"  ${SPELL_CONFIG}
then

  if      query  "Compile dummy driver?"  n
  then    echo   "DUMMY='y'"  >>  ${SPELL_CONFIG}
  else    echo   "DUMMY='n'"  >>  ${SPELL_CONFIG}
  fi      &&

  if    query  "Compile parport driver?"  n
  then  echo  "PARPORT='y'"  >>  ${SPELL_CONFIG}
    if    query  "Compile lpr2dmx driver?"  n
    then  echo   PARPORT="$PARPORT\ny"  >>  ${SPELL_CONFIG}
      if    query  "Compile support for lpr2dmx3 buffered-transfer mode?"  n
      then  echo  PARPORT="$PARPORT\ny"  >>  ${SPELL_CONFIG}
      else  echo  PARPORT="$PARPORT\nn"  >>  ${SPELL_CONFIG}
      fi
    else  echo   PARPORT="$PARPORT\nn"  >>  ${SPELL_CONFIG}
    fi    &&
    if    query  "Compile dmxpcp interface driver?"  n
    then  echo   PARPORT="$PARPORT\ny"  >>  ${SPELL_CONFIG}
    else  echo   PARPORT="$PARPORT\nn"  >>  ${SPELL_CONFIG}
    fi    &&
    if    query  "Compile dmx30 interface driver?"  n
    then  echo   PARPORT="$PARPORT\ny"  >>  ${SPELL_CONFIG}
    else  echo   PARPORT="$PARPORT\nn"  >>  ${SPELL_CONFIG}
    fi    &&
    if    query  "Compile dmx43 interface driver?"  n
    then  echo   PARPORT="$PARPORT\ny"  >>  ${SPELL_CONFIG}
    else  echo   PARPORT="$PARPORT\nn"  >>  ${SPELL_CONFIG}
    fi
  else  echo  "PARPORT='n'"  >>  ${SPELL_CONFIG}
  fi  &&

  if    query  "Compile ISA driver?"  n
  then  echo  "ISA='y'"  >>  ${SPELL_CONFIG}
    if    query  "Compile EnLight interface driver?"  n
    then  echo  ISA="$ISA\ny"  >>  ${SPELL_CONFIG}
    else  echo  ISA="$ISA\nn"  >>  ${SPELL_CONFIG}
    fi    &&
    if    query  "Compile SoundLight SLH1512 interface driver?"  n
    then  echo  ISA="$ISA\ny"  >>  ${SPELL_CONFIG}
    else  echo  ISA="$ISA\nn"  >>  ${SPELL_CONFIG}
    fi
  else  echo  "ISA='n'"  >>  ${SPELL_CONFIG}
  fi  &&

  if    query  "Compile USB driver?"  n
  then  echo  "USB='y'"  >>  ${SPELL_CONFIG}
    if    query  "Compile USB2DMX interface driver?"  n
    then  echo   USB="$USB\ny"  >>  ${SPELL_CONFIG}
    else  echo   USB="$USB\nn"  >>  ${SPELL_CONFIG}
    fi
  else  echo  "USB='n'"  >>  ${SPELL_CONFIG}
  fi  &&

  if    query  "Compile PCMCIA driver?"  n
  then  echo   "PCMCIA='y'"  >>  ${SPELL_CONFIG}                 &&
        depends  pcmcia-cs                                       &&
        echo  PCMCIACONFIG="/etc/pcmcia\n"  >>  ${SPELL_CONFIG}  &&
        echo  PCMCIABIN="/sbin/cardctl\n"   >>  ${SPELL_CONFIG}
    if    query  "Compile Digimedia interface driver?"  n
    then  echo   PCMCIA="$PCMCIA\ny"  >>  ${SPELL_CONFIG}
    else  echo   PCMCIA="$PCMCIA\nn"  >>  ${SPELL_CONFIG}
    fi
  else  echo  "PCMCIA='n'"  >>  ${SPELL_CONFIG}  &&
        unset  PCMCIACONFIG  &&
        unset  PCMCIABIN
  fi  &&

  if    query  "Compile I2c driver?"  n
  then  echo   "I2C='y'"  >>  ${SPELL_CONFIG}
    if    query  "Compile QLightControler interface driver?"  n
    then  echo   I2C="$I2C\ny"  >>  ${SPELL_CONFIG}
    else  echo   I2C="$I2C\nn"  >>  ${SPELL_CONFIG}
    fi
  else  echo  "I2C='n'"  >>  ${SPELL_CONFIG}
  fi  &&

  if    query  "Compile X-based applications"  n
  then  echo   "X='y'"  >>  ${SPELL_CONFIG}  &&
        depends  xorg-libs
  else  echo   "X='n'"  >>  ${SPELL_CONFIG}
  fi  &&

  if    query  "Compile curses-based applications"  y
  then  echo   "CURSES='y'"  >>  ${SPELL_CONFIG}  &&
        depends  ncurses
  else  echo   "CURSES='n'"  >>  ${SPELL_CONFIG}
  fi  &&

  if    query  "Compile XMMS plugin"  n
  then  echo   "XMMS='y'"  >>  ${SPELL_CONFIG}  &&
        depends  xmms
  else  echo   "XMMS='n'"  >>  ${SPELL_CONFIG}
  fi  &&

  echo  "CONFIGURED='y'"  >>  ${SPELL_CONFIG}
fi
