depends  -sub CXX gcc                                            &&
depends  perl                                                    &&
depends  python                                                  &&
depends  icu     '--with-system-icu'                             &&

depends  glib2                                                   &&
depends  gtk+2                                                   &&
depends  atk                                                     &&
depends  libx11                                                  &&
depends  libxext                                                 &&
depends  libxrender                                              &&
depends  libxt                                                   &&
depends  libxcomposite                                           &&

depends  pango  '--enable-pango'                                 &&
depends  libxft '--enable-xft --disable-freetype2'               &&

depends  -sub TEE cairo  '--enable-system-cairo --enable-default-toolkit=cairo-gtk2' &&
depends  gdk-pixbuf2                                             &&

depends  libjpeg-turbo '--with-system-jpeg'                      &&
depends -sub APNG libpng '--enable-system-png'                   &&
depends  librsvg2 '--enable-svg'                                 &&

depends  nspr               '--with-system-nspr'                 &&
depends  -sub "3.17.x" nss  '--with-system-nss'                  &&

depends  -sub "TSAFE SECURE_DELETE ENABLE_UNLOCK_NOTIFY" sqlite '--enable-system-sqlite'    &&

depends  libidl                                                  &&

depends  zip                                                     &&
depends  zlib               '--with-system-zlib'                 &&

optional_depends  startup-notification  \
                  --{en,dis}able-startup-notification \
                  'for startup notifications'      &&

optional_depends  gconf2  \
                  --{en,dis}able-gconf \
                  'for gconf support'      &&

optional_depends  wireless_tools \
                  --{en,dis}able-necko-wifi \
                  'for Necko WiFi scanning' &&

optional_depends  pulseaudio \
                  --{en,dis}able-pulseaudio \
                  'use pulseaudio for audio support' &&

# Firefox is currently borked and does not compile without alsa-lib headers,
# this should have been fixed when Firefox started using Mozilla core 23, but it
# wasn't see https://bugzilla.mozilla.org/show_bug.cgi?id=875268
depends alsa-lib &&
#optional_depends  alsa-lib \
#                  '--enable-wave' \
#                  '--disable-wave --disable-ogg --disable-webm --disable-dash' \
#                  'for audio/video support' &&

if is_depends_enabled $SPELL alsa-lib; then
  # Firefox tries to use ogg/ogg.h even with --disable-ogg given
  #optional_depends  libogg \
  #                  '--enable-ogg' \
  #                  '--disable-ogg' \
  #                  'for sound support' &&
  depends libogg &&

  # configure script checks for yasm even when --disable-webm and --disable-dash are given
  #optional_depends  yasm \
  #                  '--enable-webm --enable-dash' \
  #                  '--disable-webm --disable-dash' \
  #                  'for WebM video support'
  depends yasm
fi &&

optional_depends  dbus-glib \
                  --{en,dis}able-dbus \
                  'for dbus support' &&

# Firefox is currently borked and does not compile without OpenGL headers
#optional_depends  OPENGL \
#                  '--enable-webgl' \
#                  '--disable-webgl --without-gl-provider' \
#                  'for WebGL support' &&
depends OPENGL &&

optional_depends  gstreamer \
                  --{en,dis}able-gstreamer \
                  'for gstreamer based AV support' &&
if is_depends_enabled $SPELL gstreamer; then
  depends gst-plugins-base
else
  optional_depends  gstreamer-1.0 \
                    '--enable-gstreamer=1.0' \
                    '' \
                    'for gstreamer 1.0 based AV support' &&
  if is_depends_enabled $SPELL gstreamer-1.0; then
    depends gst-plugins-base-1.0
  fi
fi &&



suggest_depends_2 firefox-smglwiki '' '' \
  'to enable searching the SMGL Wiki from the Search Bar'
