mk_source_dir  $SOURCE_DIRECTORY  &&
cd             $SOURCE_DIRECTORY  &&
unpack_file    ''                 &&
cd             comm-release       &&

cp -v $SPELL_DIRECTORY/blfs-mozconfig .mozconfig &&

if [[ "$SEAMONKEY_OFFICIAL" == "y" ]]; then
   sed -i '78iac_add_options --enable-official-branding' .mozconfig
fi &&

#This option is broke will not build without mailnews component
#if [[ "$SEAMONKEY_MAILNEWS" == "n" ]]; then
#   sed -i '78iac_add_options --disable-mailnews' .mozconfig
#fi &&

if [[ "$SEAMONKEY_COMPOSER" == "n" ]]; then
   sed -i '78iac_add_options --disable-composer' .mozconfig
fi &&

if [[ "$SEAMONKEY_CAIRO" == "y" ]]; then
   sed -i '78iac_add_options --enable-system-cairo' .mozconfig
else
   sed -i '78iac_add_options --disable-system-cairo' .mozconfig
fi &&

if [[ "$SEAMONKEY_PANGO" == "y" ]]; then
   sed -i '78iac_add_options --enable-pango' .mozconfig
fi &&

if [[ "$SEAMONKEY_STRIP" == "y" ]]; then
   sed -i '78iac_add_options --enable-strip' .mozconfig
fi &&

if is_depends_enabled $SPELL wireless_tools; then
   sed -i '78iac_add_options --enable-necko-wifi' .mozconfig
else
   sed -i '78iac_add_options --disable-necko-wifi' .mozconfig
fi &&

if ! is_depends_enabled $SPELL alsa-lib; then
   sed -i '78iac_add_options --disable-ogg' .mozconfig &&
   sed -i '78iac_add_options --disable-wave' .mozconfig
fi &&

# GNOME support is broken (at least for download manager)
echo "ac_add_options --disable-gnomeui" >> .mozconfig &&
echo "ac_add_options --disable-gnomevfs" >> .mozconfig &&

echo "ac_add_options --disable-crashreporter" >> .mozconfig
