default_pre_build      &&
cd ${SOURCE_DIRECTORY} &&

#right install paths, fix freetype include path and add our *FLAGS
sed -e "s/\/usr\/local/${INSTALL_ROOT}\/usr/" \
    -e "s;FREETYPEINC.*X11INC;#&;" \
    -e "/FLAGS/s;=;+=;" \
    -i config.mk &&

if ( is_depends_enabled $SPELL libxinerama ); then
  message "Leaving Xinerama enabled"
else
  sed -i 's/^XINERAMA/#XINERAMA/g' config.mk &&
  message "Xinerama disabled"
fi &&

if [[ "$DWM_CONFIG" == 'y' ]]; then
  if [[ -e ${INSTALL_ROOT}/usr/share/doc/dwm/config.def.h ]]; then
    cp ${INSTALL_ROOT}/usr/share/doc/dwm/config.def.h ./
  fi &&
  if query 'Do you want to edit your config now?' n; then
    if [ -z"$EDITOR" ]; then
      . /etc/profile.d/editor.sh
    fi
    ${EDITOR:-nano} config.def.h
  fi
fi
