default_pre_build                            &&
cd  $SOURCE_DIRECTORY                        &&

cp  mail/config/mozconfig  .mozconfig        &&

if  [ "$BUILD_ENIGMAIL" = "y" ];  then
  cd  $SOURCE_DIRECTORY/mailnews/extensions  &&
  unpack_file  3
fi &&

# apply visibility fix patch for amd64.
# this is a copy/paste from firefox
if [[ "${SMGL_COMPAT_ARCHS[1]}" == "x86_64" ]] ||
   [[ "${SMGL_COMPAT_ARCHS[1]}" == "ppc" ]]; then
    cd $SOURCE_DIRECTORY &&
    patch -p1 < $SCRIPT_DIRECTORY/visibility.patch &&
    # regenerate the ./configure using the right version of autoconf
    autoconf-2.13
fi

