default_pre_build       &&
cd ${SOURCE_DIRECTORY}  &&

if [ $SEDITCOLORS == "y" ]; then
        sedit "s:violet:darkgray:" tests/t_articleview.cpp &&
        sedit "s:violet:darkgray:" stardict-plugins/stardict-xdxf-parsedata-plugin/stardict_xdxf_parsedata.cpp &&
        sedit "s:green:brown:" tests/t_articleview.cpp &&
        sedit "s:green:brown:" stardict-plugins/stardict-xdxf-parsedata-plugin/stardict_xdxf_parsedata.cpp
fi

patch -p0 < ${SCRIPT_DIRECTORY}/configure.patch  &&
patch -p1 < ${SCRIPT_DIRECTORY}/stardict-g++-sigc++3-fixes.patch  &&
if  is_depends_enabled  ${SPELL}  espeak
then
  sedit "s:espeak_Initialize(AUDIO_OUTPUT_PLAYBACK, 0, NULL);:espeak_Initialize(AUDIO_OUTPUT_PLAYBACK, 0, NULL, 0);:"  \
        stardict-plugins/stardict-espeak-tts-plugin/stardict_espeak.cpp
fi                                   &&
intltoolize --force --copy           &&
echo n | libtoolize --copy --force   &&
aclocal -I m4                        &&
autoheader                           &&
automake --add-missing --copy        &&
autoconf || true                     &&
automake                             &&

OPTS="--disable-festival --disable-deprecations ${OPTS}"
