mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-x86_64-linux-android
mk_add_options MOZ_APP_DISPLAYNAME="Tor Browser"
export MOZILLA_OFFICIAL=1
CC="clang"
CXX="clang++"

ac_add_options --with-android-min-sdk=21

ac_add_options --enable-optimize
ac_add_options --enable-official-branding

ac_add_options --enable-application=mobile/android
ac_add_options --target=x86_64-linux-android
ac_add_options --with-android-ndk=/var/tmp/dist/android-toolchain/android-ndk
ac_add_options --with-android-sdk=/var/tmp/dist/android-toolchain/android-sdk-linux
ac_add_options --with-gradle=/var/tmp/dist/android-toolchain/gradle/gradle-4.10.2/bin/gradle

ac_add_options --with-android-distribution-directory=@TOPSRCDIR@/mobile/android/torbrowser
ac_add_options --with-l10n-base=/var/tmp/dist/locales

# We do not use Tor Launcher on Android:
ac_add_options --disable-tor-launcher

if [ -z "${TB_BUILD_WITH_UPDATER}" ]; then
# Because Google Play will likely be the primary distribution medium,
# we disable updating and rely on Google Play by default. The
# Developer Policy explicitly prohibits in-app updating:
#    An app distributed via Google Play may not modify, replace, or
#    update itself using any method other than Google Plays update
#    mechanism.
# https://play.google.com/about/privacy-security-deception/malicious-behavior/

    ac_add_options --disable-tor-browser-update
    ac_add_options --disable-signmar
    ac_add_options --disable-verify-mar
fi

ac_add_options --enable-strip
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-rust-debug
ac_add_options --disable-crashreporter
ac_add_options --disable-webrtc

ac_add_options --without-google-play-services

ac_add_options --enable-proxy-bypass-protection

# Disable telemetry
ac_add_options MOZ_TELEMETRY_REPORTING=