if test -e "$topsrcdir/mozilla/build/macosx/universal/mozconfig.common"; then
  # We need some hackery to deal with the mozilla/ build system calling this
  # mozconfig.
  oldtopsrcdir=$topsrcdir
  export topsrcdir=$topsrcdir/mozilla
else
  # Big Hack that unsets CC / CXX so that mozconfig.common doesn't get
  # mixed up with host/target CPUs when trying to work out how to do the
  # universal build. When we redo the build system (bug 648979) this will
  # go away.
  unset CC
  unset CXX
fi

mk_add_options MOZ_BUILD_PROJECTS="ppc i386"
. $topsrcdir/build/macosx/universal/mozconfig.common
export MOZ_PKG_VERSION=mac

if test -n $oldtopsrcdir; then
  export topsrcdir=$oldtopsrcdir
fi

mk_add_options MOZ_POSTFLIGHT_ALL+=calendar/lightning/build/universal.mk
mk_add_options MOZ_POSTFLIGHT_ALL+=calendar/providers/gdata/universal.mk

ac_add_options --enable-application=mail
ac_add_options --enable-calendar
ac_add_options --enable-update-channel=nightly
ac_add_options --enable-update-packaging
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --disable-tests
ac_add_options --disable-codesighs

export CFLAGS="-gdwarf-2"
export CXXFLAGS="-gdwarf-2"

# Needed to enable breakpad in application.ini
export MOZILLA_OFFICIAL=1

# For NSS symbols
export MOZ_DEBUG_SYMBOLS=1

# Don't try and install lightning - we just need to have it built for it to
# be uploaded
DISABLE_LIGHTNING_INSTALL=1
