#! /bin/sh














































































if test `uname -s | grep -c MINGW 2>/dev/null` != "0"; then
  msyshost=1
fi


# Read the user's .mozconfig script.  We can't do this in
# configure.in: autoconf puts the argument parsing code above anything
# expanded from configure.in, and we need to get the configure options
# from .mozconfig in place before that argument parsing code.
. ./old-configure.vars

# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13 
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.

# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
  --enable-release        Build with more conservative, release engineering-oriented options.
                          This may slow down builds."
ac_help="$ac_help
  --with-android-cxx-stl=VALUE
                          use the specified C++ STL (stlport, libstdc++, libc++)"
ac_help="$ac_help
  --with-android-version=VER
                          android platform version, default 9"
ac_help="$ac_help
  --with-ios-sdk=TYPE
                          Type of iOS SDK to use (iphonesimulator, iphoneos)
                          and optionally version (like iphoneos8.2)"
ac_help="$ac_help
  --enable-ios-target=VER (default=8.0)
                          Set the minimum iOS version needed at runtime"
ac_help="$ac_help
  --enable-rust           Include Rust language sources"
ac_help="$ac_help
  --with-windows-version=WINSDK_TARGETVER
                          Windows SDK version to target. Win8.1 (603) is
                          currently the minimum supported version."
ac_help="$ac_help
  --with-unify-dist=dir   Location of the dist directory to unify with at packaging time (Mac OS X universal build only)"
ac_help="$ac_help
  --with-macos-sdk=dir    Location of platform SDK to use (Mac OS X only)"
ac_help="$ac_help
  --with-macos-private-frameworks=dir    Location of private frameworks to use (Mac OS X only)"
ac_help="$ac_help
  --with-x                use the X Window System"
ac_help="$ac_help
  --with-arch=[[type|toolchain-default]]
                           Use specific CPU features (-march=type). Resets
                           thumb, fpu, float-abi, etc. defaults when set"
ac_help="$ac_help
  --with-thumb[[=yes|no|toolchain-default]]
                          Use Thumb instruction set (-mthumb)"
ac_help="$ac_help
  --with-thumb-interwork[[=yes|no|toolchain-default]]
                           Use Thumb/ARM instuctions interwork (-mthumb-interwork)"
ac_help="$ac_help
  --with-fpu=[[type|toolchain-default]]
                           Use specific FPU type (-mfpu=type)"
ac_help="$ac_help
  --with-float-abi=[[type|toolchain-default]]
                           Use specific arm float ABI (-mfloat-abi=type)"
ac_help="$ac_help
  --with-soft-float[[=yes|no|toolchain-default]]
                           Use soft float library (-msoft-float)"
ac_help="$ac_help
  --enable-address-sanitizer       Enable Address Sanitizer (default=no)"
ac_help="$ac_help
  --enable-memory-sanitizer       Enable Memory Sanitizer (default=no)"
ac_help="$ac_help
  --enable-thread-sanitizer       Enable Thread Sanitizer (default=no)"
ac_help="$ac_help
  --enable-llvm-hacks       Enable workarounds required for several LLVM instrumentations (default=no)"
ac_help="$ac_help
  --enable-warnings-as-errors
                          Enable treating warnings as errors"
ac_help="$ac_help
  --enable-valgrind       Enable Valgrind integration hooks (default=no)"
ac_help="$ac_help
  --enable-debug[=DBG]    Enable building with developer debug info
                           (using compiler flags DBG)"
ac_help="$ac_help
  --with-debug-label=LABELS
                          Define DEBUG_<value> for each comma-separated
                          value given."
ac_help="$ac_help
  --enable-debug-symbols[=DBG]
                          Enable debugging symbols (using compiler flags DBG)"
ac_help="$ac_help
  --enable-cpp-rtti       Enable C++ RTTI "
ac_help="$ac_help
  --enable-gold           Enable GNU Gold Linker when it is not already the default"
ac_help="$ac_help
  --disable-icf          Disable Identical Code Folding"
ac_help="$ac_help
  --enable-pie           Enable Position Independent Executables"
ac_help="$ac_help
  --enable-dtrace         build with dtrace support if available (default=no)"
ac_help="$ac_help
  --with-linux-headers=DIR
                          location where the Linux kernel headers can be found"
ac_help="$ac_help
  --with-pthreads         Force use of system pthread library with NSPR "
ac_help="$ac_help
  --with-nspr-cflags=FLAGS
                          Pass FLAGS to CC when building code that uses NSPR.
                          Use this when there's no accurate nspr-config
                          script available.  This is the case when building
                          SpiderMonkey as part of the Mozilla tree: the
                          top-level configure script computes NSPR flags
                          that accomodate the quirks of that environment."
ac_help="$ac_help
  --with-nspr-libs=LIBS   Pass LIBS to LD when linking code that uses NSPR.
                          See --with-nspr-cflags for more details."
ac_help="$ac_help
  --enable-nspr-build     Build NSPR from source tree"
ac_help="$ac_help
  --with-system-nspr      Use an NSPR that is already built and installed.
                          Use the 'nspr-config' script in the current path,
                          or look for the script in the directories given with
                          --with-nspr-exec-prefix or --with-nspr-prefix.
                          (Those flags are only checked if you specify
                          --with-system-nspr.)"
ac_help="$ac_help
  --enable-posix-nspr-emulation
                          Enable emulation of NSPR for POSIX systems"
ac_help="$ac_help
  --with-nspr-prefix=PFX  Prefix where NSPR is installed"
ac_help="$ac_help
  --with-nspr-exec-prefix=PFX
                          Exec prefix where NSPR is installed"
ac_help="$ac_help
  --with-system-libevent[=PFX]
                          Use system libevent [installed at prefix PFX]"
ac_help="$ac_help
  --with-system-nss       Use system installed NSS"
ac_help="$ac_help
  --with-nss-prefix=PFX   Prefix where NSS is installed"
ac_help="$ac_help
  --with-nss-exec-prefix=PFX
                          Exec prefix where NSS is installed"
ac_help="$ac_help
  --with-system-jpeg[=PFX]
                          Use system libjpeg [installed at prefix PFX]"
ac_help="$ac_help
  --with-system-zlib[=PFX]
                          Use system libz [installed at prefix PFX]"
ac_help="$ac_help
  --with-system-bz2[=PFX]
                          Use system libbz2 [installed at prefix PFX]"
ac_help="$ac_help
  --with-system-png[=PFX]
                          Use system libpng [installed at prefix PFX]"
ac_help="$ac_help
  --enable-png-arm-neon-support=TYPE
             Options include:
                 no
                 check (default)
                 nocheck (faster but unsafe)"
ac_help="$ac_help
  --enable-system-ffi       Use system libffi (located with pkgconfig)"
ac_help="$ac_help
  --with-mozilla-api-keyfile=file   Use the secret key contained in the given keyfile for Mozilla API requests"
ac_help="$ac_help
  --with-google-api-keyfile=file   Use the secret key contained in the given keyfile for Google API requests"
ac_help="$ac_help
 --with-google-oauth-api-keyfile=file  Use the client id and secret key contained in the given keyfile for Google OAuth API requests"
ac_help="$ac_help
  --with-bing-api-keyfile=file   Use the client id and secret key contained in the given keyfile for Bing API requests"
ac_help="$ac_help
  --with-adjust-sdk-keyfile=file   Use the app token contained in the given keyfile for Adjust SDK requests"
ac_help="$ac_help
  --with-android-distribution-directory=dir
                          Optional Firefox for Android partner distribution directory."
ac_help="$ac_help
  --enable-official-branding
                          Enable Official mozilla.org Branding
                          Do not distribute builds with
                          --enable-official-branding unless you have
                          permission to use trademarks per
                          http://www.mozilla.org/foundation/trademarks/ ."
ac_help="$ac_help
--with-app-name=APPNAME sets MOZ_APP_NAME to APPNAME"
ac_help="$ac_help
--with-app-basename=BASENAME sets MOZ_APP_BASENAME to BASENAME"
ac_help="$ac_help
  --with-android-sdk=DIR
                          location where the Android SDK can be found (like ~/.mozbuild/android-sdk-linux)"
ac_help="$ac_help
  --with-android-min-sdk=[VER]     Impose a minimum Firefox for Android SDK version"
ac_help="$ac_help
  --with-android-max-sdk=[VER]     Impose a maximum Firefox for Android SDK version"
ac_help="$ac_help
  --enable-startup-notification
                          Enable startup-notification support (default: disabled) "
ac_help="$ac_help
  --disable-printing      Disable printing support"
ac_help="$ac_help
  --with-qtdir=\$dir       Specify Qt directory "
ac_help="$ac_help
  --enable-ui-locale=ab-CD
                          Select the user interface locale (default: en-US)"
ac_help="$ac_help
  --with-branding=dir     Use branding from the specified directory."
ac_help="$ac_help
  --with-distribution-id=ID
                          Set distribution-specific id (default=org.mozilla)"
ac_help="$ac_help
  --disable-gio           Disable GIO support"
ac_help="$ac_help
  --disable-gconf      Disable Gconf support "
ac_help="$ac_help
  --enable-libproxy         Enable libproxy support "
ac_help="$ac_help
  --enable-gnomeui        Enable libgnomeui instead of GIO & GTK for icon theme support "
ac_help="$ac_help
  --disable-dbus          Disable dbus support "
ac_help="$ac_help
  --disable-synth-speechd Disable speech-dispatcher support "
ac_help="$ac_help
  --disable-websms-backend
                           Disable WebSMS backend"
ac_help="$ac_help
  --enable-ipdl-tests     Enable expensive IPDL tests"
ac_help="$ac_help
  --disable-dbm           Disable building dbm"
ac_help="$ac_help
  --disable-accessibility Disable accessibility support"
ac_help="$ac_help
  --disable-webrtc        Disable support for WebRTC"
ac_help="$ac_help
  --enable-hardware-aec-ns   Enable support for hardware AEC and noise suppression"
ac_help="$ac_help
  --disable-webspeech        Disable support for HTML Speech API"
ac_help="$ac_help
  --disable-webspeechtestbackend        Disable support for HTML Speech API Test Backend"
ac_help="$ac_help
  --enable-raw           Enable support for RAW media"
ac_help="$ac_help
  --disable-directshow  Disable support for DirectShow"
ac_help="$ac_help
  --enable-android-omx  Enable support for Android OMX media backend"
ac_help="$ac_help
  --enable-omx-plugin      Enable building OMX plugin (B2G)"
ac_help="$ac_help
  --with-system-libvpx    Use system libvpx (located with pkgconfig)"
ac_help="$ac_help
  --enable-alsa          Enable Alsa support (default on Linux)"
ac_help="$ac_help
  --disable-pulseaudio          Disable PulseAudio support"
ac_help="$ac_help
  --disable-permissions   Disable permissions (popup and cookie blocking)"
ac_help="$ac_help
  --disable-negotiateauth Disable GSS-API negotiation "
ac_help="$ac_help
  --disable-pref-extensions
                          Disable pref extensions such as autoconfig"
ac_help="$ac_help
  --disable-system-extension-dirs
                          Disable searching system- and account-global
                          directories for extensions of any kind; use
                          only profile-specific extension directories"
ac_help="$ac_help
  --disable-universalchardet
                          Disable universal encoding detection"
ac_help="$ac_help
  --enable-require-all-d3dc-versions Require all versions of the D3D compiler needed for supported Windows systems."
ac_help="$ac_help
  --disable-gamepad   Disable gamepad support"
ac_help="$ac_help
  --disable-crashreporter Disable breakpad crash reporting"
ac_help="$ac_help
  --with-crashreporter-enable-percent=NN
                          Enable sending crash reports by default on NN% of users. (default=100)"
ac_help="$ac_help
 --disable-libjpeg-turbo  Disable optimized jpeg decoding routines"
ac_help="$ac_help
  --enable-extensions     Enable extensions"
ac_help="$ac_help
  --enable-tree-freetype  Enable Tree FreeType"
ac_help="$ac_help
  --enable-maintenance-service       Enable building of maintenanceservice"
ac_help="$ac_help
  --enable-bundled-fonts  Enable support for bundled fonts on desktop platforms"
ac_help="$ac_help
  --enable-verify-mar     Enable verifying MAR signatures"
ac_help="$ac_help
  --enable-signmar     Enable building the signmar program"
ac_help="$ac_help
  --disable-updater       Disable building of updater"
ac_help="$ac_help
  --disable-parental-controls
                          Do not build parental controls"
ac_help="$ac_help
  --disable-sandbox        Disable sandboxing support"
ac_help="$ac_help
  --enable-content-sandbox Enable sandboxing support for content-processes
  --disable-content-sandbox Disable sandboxing support for content-processes"
ac_help="$ac_help
  --disable-feeds         Disable feed handling and processing components"
ac_help="$ac_help
  --enable-system-sqlite  Use system sqlite (located with pkgconfig)"
ac_help="$ac_help
  --enable-safe-browsing  Enable safe browsing (anti-phishing) implementation"
ac_help="$ac_help
  --enable-url-classifier Enable url classifier module"
ac_help="$ac_help
  --disable-zipwriter     Disable zipwriter component"
ac_help="$ac_help
  --enable-faststripe     Use faststripe theme"
ac_help="$ac_help
  --enable-mobile-optimize
                          Enable mobile optimizations"
ac_help="$ac_help
  --disable-optimize      Disable compiler optimization
  --enable-optimize=[OPT] Specify compiler optimization flags [OPT=-O]"
ac_help="$ac_help
  --enable-logrefcnt      Enable logging of refcounts (default=debug) "
ac_help="$ac_help
 --enable-approximate-location    Enable approximate location "
ac_help="$ac_help
 --enable-gps-debug    Enable gps specific debug messages "
ac_help="$ac_help
  --enable-dump-painting          Enable paint debugging."
ac_help="$ac_help
  --enable-clang-plugin   Enable building with the mozilla clang plugin "
ac_help="$ac_help
  --enable-strip          Enable stripping of libs & executables "
ac_help="$ac_help
  --enable-install-strip  Enable stripping of libs & executables when packaging "
ac_help="$ac_help
  --disable-elf-hack      Disable elf hacks"
ac_help="$ac_help
  --enable-stdcxx-compat  Enable compatibility with older libstdc++"
ac_help="$ac_help
  --enable-debug-js-modules  Enable debug mode for frontend JS libraries"
ac_help="$ac_help
  --enable-tasktracer       Set compile flags necessary for using TaskTracer"
ac_help="$ac_help
  --enable-reflow-perf    Enable reflow performance tracing"
ac_help="$ac_help
  --disable-startupcache          Disable startup cache "
ac_help="$ac_help
  --enable-b2g-ril      Set compile flags necessary for testing B2G Radio Interface Layer via network sockets "
ac_help="$ac_help
  --enable-b2g-bt      Set compile flags necessary for compiling Bluetooth API for B2G "
ac_help="$ac_help
  --enable-nfc         Set compile flags necessary for compiling NFC API "
ac_help="$ac_help
  --enable-synth-pico  Set compile flags necessary for compiling Pico Web Speech API "
ac_help="$ac_help
  --enable-b2g-camera      Set compile flags necessary for compiling camera API for B2G "
ac_help="$ac_help
  --jitreport-granularity=N
                           Default granularity at which to report JIT code
                           to external tools
                             0 - no info
                             1 - code ranges for whole functions only
                             2 - per-line information
                             3 - per-op information"
ac_help="$ac_help
  --disable-mozril-geoloc         Disable Mozilla's RIL and geolocation"
ac_help="$ac_help
  --with-servo=SERVO_TARGET_DIR
                Absolute path of the target directory where libgeckoservo can
                be found. This is generally servo_src_dir/target/release.
                Passing this flag enables experimental integration with the
                servo style system"
ac_help="$ac_help
  --with-default-mozilla-five-home
                          Set the default value for MOZILLA_FIVE_HOME"
ac_help="$ac_help
  --with-user-appdir=DIR  Set user-specific appdir (default=.mozilla)"
ac_help="$ac_help
  --with-doc-input-dirs=DIRS
                          Header/idl dirs to create docs from"
ac_help="$ac_help
  --with-doc-include-dirs=DIRS
                          Include dirs to preprocess doc headers"
ac_help="$ac_help
  --with-doc-output-dir=DIR
                          Dir to generate docs into"
ac_help="$ac_help
  --enable-skia   Enable use of Skia"
ac_help="$ac_help
  --disable-skia-gpu  Disable use of Skia-GPU"
ac_help="$ac_help
  --enable-system-cairo   Use system cairo (located with pkgconfig)"
ac_help="$ac_help
 --enable-system-pixman Use system pixman (located with pkgconfig)"
ac_help="$ac_help
  --disable-xul           Disable XUL"
ac_help="$ac_help
  --enable-necko-protocols[={http,ftp,default,all,none}]
                          Enable/disable specific protocol handlers"
ac_help="$ac_help
  --disable-necko-wifi    Disable necko wifi scanner"
ac_help="$ac_help
  --disable-cookies       Disable cookie support"
ac_help="$ac_help
  --disable-ctypes        Disable js-ctypes"
ac_help="$ac_help
  --with-macbundlename-prefix=prefix
                          Prefix for MOZ_MACBUNDLE_NAME"
ac_help="$ac_help
  --with-system-icu
                          Use system ICU (located with pkgconfig)"
ac_help="$ac_help
  --with-intl-api, --with-intl-api=build, --without-intl-api
    Determine the status of the ECMAScript Internationalization API.  The first
    (or lack of any of these) builds and exposes the API.  The second builds it
    but doesn't use ICU or expose the API to script.  The third doesn't build
    ICU at all."

# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
host=NONE
no_create=
nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'

# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12

ac_prev=
for ac_option
do

  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    ac_prev=
    continue
  fi

  case "$ac_option" in
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) ac_optarg= ;;
  esac

  # Accept the important Cygnus configure options, so we can diagnose typos.

  case "$ac_option" in

  -bindir | --bindir | --bindi | --bind | --bin | --bi)
    ac_prev=bindir ;;
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
    bindir="$ac_optarg" ;;

  -build | --build | --buil | --bui | --bu)
    ac_prev=build ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    build="$ac_optarg" ;;

  -cache-file | --cache-file | --cache-fil | --cache-fi \
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
    ac_prev=cache_file ;;
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
    cache_file="$ac_optarg" ;;

  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  | --da=*)
    datadir="$ac_optarg" ;;

  -disable-* | --disable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; echo "configure: error: $ac_feature: invalid feature name" 1>&5; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    eval "enable_${ac_feature}=no" ;;

  -enable-* | --enable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; echo "configure: error: $ac_feature: invalid feature name" 1>&5; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "enable_${ac_feature}='$ac_optarg'" ;;

  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  | --exec | --exe | --ex)
    ac_prev=exec_prefix ;;
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  | --exec=* | --exe=* | --ex=*)
    exec_prefix="$ac_optarg" ;;

  -gas | --gas | --ga | --g)
    # Obsolete; use --with-gas.
    with_gas=yes ;;

  -help | --help | --hel | --he)
    # Omit some internal or obsolete options to make the list less imposing.
    # This message is too long to be a string in the A/UX 3.1 sh.
    cat << EOF
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
  --cache-file=FILE       cache test results in FILE
  --help                  print this message
  --no-create             do not create output files
  --quiet, --silent       do not print \`checking...' messages
  --version               print the version of autoconf that created configure
Directory and file names:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [$ac_default_prefix]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [same as prefix]
  --bindir=DIR            user executables in DIR [EPREFIX/bin]
  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  --datadir=DIR           read-only architecture-independent data in DIR
                          [PREFIX/share]
  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
                          [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  --includedir=DIR        C header files in DIR [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  --infodir=DIR           info documentation in DIR [PREFIX/info]
  --mandir=DIR            man documentation in DIR [PREFIX/man]
  --srcdir=DIR            find the sources in DIR [configure dir or ..]
  --program-prefix=PREFIX prepend PREFIX to installed program names
  --program-suffix=SUFFIX append SUFFIX to installed program names
  --program-transform-name=PROGRAM
                          run sed PROGRAM on installed program names
EOF
    cat << EOF
Host type:
  --build=BUILD           configure for building on BUILD [BUILD=HOST]
  --host=HOST             configure for HOST [guessed]
  --target=TARGET         configure for TARGET [TARGET=HOST]
Features and packages:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --x-includes=DIR        X include files are in DIR
  --x-libraries=DIR       X library files are in DIR
EOF
    if test -n "$ac_help"; then
      echo "--enable and --with options recognized:$ac_help"
    fi
    exit 0 ;;

  -host | --host | --hos | --ho)
    ac_prev=host ;;
  -host=* | --host=* | --hos=* | --ho=*)
    host="$ac_optarg" ;;

  -includedir | --includedir | --includedi | --included | --include \
  | --includ | --inclu | --incl | --inc)
    ac_prev=includedir ;;
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  | --includ=* | --inclu=* | --incl=* | --inc=*)
    includedir="$ac_optarg" ;;

  -infodir | --infodir | --infodi | --infod | --info | --inf)
    ac_prev=infodir ;;
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
    infodir="$ac_optarg" ;;

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
    libdir="$ac_optarg" ;;

  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  | --libexe | --libex | --libe)
    ac_prev=libexecdir ;;
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  | --libexe=* | --libex=* | --libe=*)
    libexecdir="$ac_optarg" ;;

  -localstatedir | --localstatedir | --localstatedi | --localstated \
  | --localstate | --localstat | --localsta | --localst \
  | --locals | --local | --loca | --loc | --lo)
    ac_prev=localstatedir ;;
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
    localstatedir="$ac_optarg" ;;

  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
    ac_prev=mandir ;;
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
    mandir="$ac_optarg" ;;

  -nfp | --nfp | --nf)
    # Obsolete; use --without-fp.
    with_fp=no ;;

  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c)
    no_create=yes ;;

  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
    no_recursion=yes ;;

  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  | --oldin | --oldi | --old | --ol | --o)
    ac_prev=oldincludedir ;;
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
    oldincludedir="$ac_optarg" ;;

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
    prefix="$ac_optarg" ;;

  -program-prefix | --program-prefix | --program-prefi | --program-pref \
  | --program-pre | --program-pr | --program-p)
    ac_prev=program_prefix ;;
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
    program_prefix="$ac_optarg" ;;

  -program-suffix | --program-suffix | --program-suffi | --program-suff \
  | --program-suf | --program-su | --program-s)
    ac_prev=program_suffix ;;
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
    program_suffix="$ac_optarg" ;;

  -program-transform-name | --program-transform-name \
  | --program-transform-nam | --program-transform-na \
  | --program-transform-n | --program-transform- \
  | --program-transform | --program-transfor \
  | --program-transfo | --program-transf \
  | --program-trans | --program-tran \
  | --progr-tra | --program-tr | --program-t)
    ac_prev=program_transform_name ;;
  -program-transform-name=* | --program-transform-name=* \
  | --program-transform-nam=* | --program-transform-na=* \
  | --program-transform-n=* | --program-transform-=* \
  | --program-transform=* | --program-transfor=* \
  | --program-transfo=* | --program-transf=* \
  | --program-trans=* | --program-tran=* \
  | --progr-tra=* | --program-tr=* | --program-t=*)
    program_transform_name="$ac_optarg" ;;

  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil)
    silent=yes ;;

  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
    ac_prev=sbindir ;;
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  | --sbi=* | --sb=*)
    sbindir="$ac_optarg" ;;

  -sharedstatedir | --sharedstatedir | --sharedstatedi \
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  | --sharedst | --shareds | --shared | --share | --shar \
  | --sha | --sh)
    ac_prev=sharedstatedir ;;
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  | --sha=* | --sh=*)
    sharedstatedir="$ac_optarg" ;;

  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
    site="$ac_optarg" ;;

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
    srcdir="$ac_optarg" ;;

  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  | --syscon | --sysco | --sysc | --sys | --sy)
    ac_prev=sysconfdir ;;
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
    sysconfdir="$ac_optarg" ;;

  -target | --target | --targe | --targ | --tar | --ta | --t)
    ac_prev=target ;;
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
    target="$ac_optarg" ;;

  -v | -verbose | --verbose | --verbos | --verbo | --verb)
    verbose=yes ;;

  -version | --version | --versio | --versi | --vers)
    echo "configure generated by autoconf version 2.13"
    exit 0 ;;

  -with-* | --with-*)
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "configure: error: $ac_package: invalid package name" 1>&2; echo "configure: error: $ac_package: invalid package name" 1>&5; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "with_${ac_package}='$ac_optarg'" ;;

  -without-* | --without-*)
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "configure: error: $ac_package: invalid package name" 1>&2; echo "configure: error: $ac_package: invalid package name" 1>&5; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    eval "with_${ac_package}=no" ;;

  --x)
    # Obsolete; use --with-x.
    with_x=yes ;;

  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  | --x-incl | --x-inc | --x-in | --x-i)
    ac_prev=x_includes ;;
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
    x_includes="$ac_optarg" ;;

  -x-libraries | --x-libraries | --x-librarie | --x-librari \
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
    ac_prev=x_libraries ;;
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
    x_libraries="$ac_optarg" ;;

  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&5; exit 1; }
    ;;

  *)
    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
      echo "configure: warning: $ac_option: invalid host type" 1>&2
    fi
    if test "x$nonopt" != xNONE; then
      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; echo "configure: error: can only configure for one host and one target at a time" 1>&5; exit 1; }
    fi
    nonopt="$ac_option"
    ;;

  esac
done

if test -n "$ac_prev"; then
  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&5; exit 1; }
fi

trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15

# File descriptor usage:
# 0 standard input
# 1 file creation
# 2 errors and warnings
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
  exec 6>/dev/null
else
  exec 6>&1
fi
exec 5>>./config.log

echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&5

# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell metacharacters.
ac_configure_args=
for ac_arg
do
  case "$ac_arg" in
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c) ;;
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  esac
done

# NLS nuisances.
# Only set these to C if already set.  These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi

# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h

# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
ac_unique_file=config/config.mk

# Find the source files, if location was not specified.
if test -z "$srcdir"; then
  ac_srcdir_defaulted=yes
  # Try the directory containing this script, then its parent.
  ac_prog=$0
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  srcdir=$ac_confdir
  if test ! -r $srcdir/$ac_unique_file; then
    srcdir=..
  fi
else
  ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
  if test "$ac_srcdir_defaulted" = yes; then
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; echo "configure: error: can not find sources in $ac_confdir or .." 1>&5; exit 1; }
  else
    { echo "configure: error: can not find sources in $srcdir" 1>&2; echo "configure: error: can not find sources in $srcdir" 1>&5; exit 1; }
  fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`

# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
  if test "x$prefix" != xNONE; then
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  else
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  fi
fi
for ac_site_file in $CONFIG_SITE; do
  if test -r "$ac_site_file"; then
    echo "loading site script $ac_site_file"
    . "$ac_site_file"
  fi
done

if test -r "$cache_file"; then
  echo "loading cache $cache_file"
  . $cache_file
else
  echo "creating cache $cache_file"
  > $cache_file
fi

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

ac_exeext=
ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi



test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'

> subconfigures
> skip_subconfigures

ac_aux_dir=
for ac_dir in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf; do
  if test -f $ac_dir/install-sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f $ac_dir/install.sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&2; echo "configure: error: can not find install-sh or install.sh in ${srcdir}/build/autoconf $srcdir/${srcdir}/build/autoconf" 1>&5; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.


# Do some error checking and defaulting for the host and target type.
# The inputs are:
#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
#
# The rules are:
# 1. You are not allowed to specify --host, --target, and nonopt at the
#    same time.
# 2. Host defaults to nonopt.
# 3. If nonopt is not specified, then host defaults to the current host,
#    as determined by config.guess.
# 4. Target and build default to nonopt.
# 5. If nonopt is not specified, then target and build default to host.

# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
case $host---$target---$nonopt in
NONE---*---* | *---NONE---* | *---*---NONE) ;;
*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; echo "configure: error: can only configure for one host and one target at a time" 1>&5; exit 1; } ;;
esac


# Make sure we can run config.sub.
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; echo "configure: error: can not run $ac_config_sub" 1>&5; exit 1; }
fi

echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:1065: checking host system type" >&5

host_alias=$host
case "$host_alias" in
NONE)
  case $nonopt in
  NONE)
    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; echo "configure: error: can not guess host type; you must specify one" 1>&5; exit 1; }
    fi ;;
  *) host_alias=$nonopt ;;
  esac ;;
esac

host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6

echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:1086: checking target system type" >&5

target_alias=$target
case "$target_alias" in
NONE)
  case $nonopt in
  NONE) target_alias=$host_alias ;;
  *) target_alias=$nonopt ;;
  esac ;;
esac

target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6

echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:1104: checking build system type" >&5

build_alias=$build
case "$build_alias" in
NONE)
  case $nonopt in
  NONE) build_alias=$host_alias ;;
  *) build_alias=$nonopt ;;
  esac ;;
esac

build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$build" 1>&6

test "$host_alias" != "$target_alias" &&
  test "$program_prefix$program_suffix$program_transform_name" = \
    NONENONEs,x,x, &&
  program_prefix=${target_alias}-


CFLAGS="${CFLAGS=}"
CPPFLAGS="${CPPFLAGS=}"
CXXFLAGS="${CXXFLAGS=}"
LDFLAGS="${LDFLAGS=}"
HOST_CFLAGS="${HOST_CFLAGS=}"
HOST_CXXFLAGS="${HOST_CXXFLAGS=}"
HOST_LDFLAGS="${HOST_LDFLAGS=}"
RUSTFLAGS="${RUSTFLAGS=}"

_SUBDIR_CC="$CC"
_SUBDIR_CXX="$CXX"
_SUBDIR_CFLAGS="$CFLAGS"
_SUBDIR_CPPFLAGS="$CPPFLAGS"
_SUBDIR_CXXFLAGS="$CXXFLAGS"
_SUBDIR_LDFLAGS="$LDFLAGS"
_SUBDIR_HOST_CC="$HOST_CC"
_SUBDIR_HOST_CFLAGS="$HOST_CFLAGS"
_SUBDIR_HOST_CXXFLAGS="$HOST_CXXFLAGS"
_SUBDIR_HOST_LDFLAGS="$HOST_LDFLAGS"
_SUBDIR_CONFIG_ARGS="$ac_configure_args"

MOZJPEG=62
MOZPNG=10621
NSPR_VERSION=4
NSPR_MINVER=4.12
NSS_VERSION=3

GLIB_VERSION=2.22
# 2_26 is the earliest version we can set GLIB_VERSION_MIN_REQUIRED.
# The macro won't be used when compiling with earlier versions anyway.
GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26
GIO_VERSION=2.22
CAIRO_VERSION=1.10
PANGO_VERSION=1.22.0
GTK2_VERSION=2.18.0
GTK3_VERSION=3.4.0
GDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_4
WINDRES_VERSION=2.14.90
W32API_VERSION=3.14
GNOMEUI_VERSION=2.2.0
GCONF_VERSION=1.2.1
STARTUP_NOTIFICATION_VERSION=0.8
DBUS_VERSION=0.60
SQLITE_VERSION=3.13.0
FONTCONFIG_VERSION=2.7.0

MSMANIFEST_TOOL=

MISSING_X=

MOZ_USE_PTHREADS=
_PTHREAD_LDFLAGS=""

_topsrcdir=`cd \`dirname $0\`; pwd -W 2>/dev/null || pwd -P`
_objdir=`pwd -P`

MOZ_BUILD_ROOT=`pwd -W 2>/dev/null || pwd -P`
DIST="$MOZ_BUILD_ROOT/dist"


  if test -z "$MOZILLA_OFFICIAL"; then
    DEVELOPER_OPTIONS=1
  fi
  # Check whether --enable-release or --disable-release was given.
if test "${enable_release+set}" = set; then
  enableval="$enable_release"
  if test "$enableval" = "yes"; then
    DEVELOPER_OPTIONS=
  elif test "$enableval" = "no"; then
    DEVELOPER_OPTIONS=1
  else
    { echo "configure: error: Option, release, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, release, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -z "$CROSS_COMPILE"; then
case "$target" in
*-mingw*)
    if test -z "$CC"; then CC=cl; fi
    if test -z "$CXX"; then CXX=cl; fi
    if test -z "$CPP"; then CPP="$CC -E -nologo"; fi
    if test -z "$CXXCPP"; then CXXCPP="$CXX -TP -E -nologo"; ac_cv_prog_CXXCPP="$CXXCPP"; fi
    if test -z "$LD"; then LD=link; fi
    if test -z "$AS"; then
        case "${target_cpu}" in
        i*86)
            AS=ml;
            ;;
        x86_64)
            AS=ml64;
            ;;
        esac
    fi
    if test -z "$MIDL"; then MIDL=midl; fi

    # need override this flag since we don't use $(LDFLAGS) for this.
    if test -z "$HOST_LDFLAGS" ; then
        HOST_LDFLAGS=" "
    fi
    ;;
*-darwin*)
    # GCC on darwin is based on gcc 4.2 and we don't support it anymore.
    if test -z "$CC"; then
          for ac_prog in clang
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1236: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$CC" in
  /*)
  ac_cv_path_CC="$CC" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_CC="$CC" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_CC="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
CC="$ac_cv_path_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$CC" && break
done

  if test "$msyshost"; then
    case "$CC" in
    /*)
      tmp_DIRNAME=`dirname "$CC"`
      tmp_BASENAME=`basename "$CC"`
      tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
      CC="$tmp_PWD/$tmp_BASENAME"
      if test -e "$CC.exe"; then
        CC="$CC.exe"
      fi
    esac
  fi

    fi
    if test -z "$CXX"; then
          for ac_prog in clang++
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1291: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_CXX'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$CXX" in
  /*)
  ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_CXX="$CXX" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_CXX="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
CXX="$ac_cv_path_CXX"
if test -n "$CXX"; then
  echo "$ac_t""$CXX" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$CXX" && break
done

  if test "$msyshost"; then
    case "$CXX" in
    /*)
      tmp_DIRNAME=`dirname "$CXX"`
      tmp_BASENAME=`basename "$CXX"`
      tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
      CXX="$tmp_PWD/$tmp_BASENAME"
      if test -e "$CXX.exe"; then
        CXX="$CXX.exe"
      fi
    esac
  fi

    fi
    IS_GCC=$($CC -v 2>&1 | grep gcc)
    if test -n "$IS_GCC"
    then
      echo gcc is known to be broken on OS X, please use clang.
      echo see http://developer.mozilla.org/en-US/docs/Developer_Guide/Build_Instructions/Mac_OS_X_Prerequisites
      echo for more information.
      exit 1
    fi
    ;;
esac
fi


if test -n "$gonkdir" ; then
            export gonkdir
    kernel_name=`uname -s | tr "[:upper:]" "[:lower:]"`
    android_source="$gonkdir"
    ANDROID_SOURCE="$android_source"
        ANDROID_VERSION=15
    if test -n "${PLATFORM_SDK_VERSION}"; then
        ANDROID_VERSION="${PLATFORM_SDK_VERSION}"
    fi

    if ! test -e "$gonkdir/ndk/sources/cxx-stl/stlport/src/iostream.cpp"; then
        { echo "configure: error: Couldn't find path to stlport sources in the gonk tree" 1>&2; echo "configure: error: Couldn't find path to stlport sources in the gonk tree" 1>&5; exit 1; }
    fi
    STLPORT_CPPFLAGS="-I$_topsrcdir/build/stlport/stlport -I$gonkdir/ndk/sources/cxx-stl/system/include"

    case "$ANDROID_VERSION" in
    15)
        GONK_INCLUDES="-I$gonkdir/frameworks/base/opengl/include -I$gonkdir/frameworks/base/native/include -I$gonkdir/frameworks/base/include -I$gonkdir/frameworks/base/services/camera -I$gonkdir/frameworks/base/include/media/ -I$gonkdir/frameworks/base/include/media/stagefright -I$gonkdir/frameworks/base/include/media/stagefright/openmax -I$gonkdir/frameworks/base/media/libstagefright/rtsp -I$gonkdir/frameworks/base/media/libstagefright/include -I$gonkdir/external/dbus -I$gonkdir/external/bluetooth/bluez/lib -I$gonkdir/dalvik/libnativehelper/include/nativehelper"
        MOZ_B2G_BT=1
        MOZ_B2G_BT_BLUEZ=1
        MOZ_NFC=1
        MOZ_B2G_CAMERA=1
        MOZ_OMX_DECODER=1
        
        MOZ_RTSP=1
        MOZ_SECUREELEMENT=1
        ;;
    17|18)
        GONK_INCLUDES="-I$gonkdir/frameworks/native/include -I$gonkdir/frameworks/av/include -I$gonkdir/frameworks/av/include/media -I$gonkdir/frameworks/av/include/camera -I$gonkdir/frameworks/native/include/media/openmax -I$gonkdir/frameworks/av/media/libstagefright/include -I$gonkdir/external/mdnsresponder/mDNSShared"
        if test -d "$gonkdir/external/bluetooth/bluez"; then
            GONK_INCLUDES="$GONK_INCLUDES -I$gonkdir/external/dbus -I$gonkdir/external/bluetooth/bluez/lib"
            MOZ_B2G_BT=1
            MOZ_B2G_BT_BLUEZ=1
        elif test -d "$gonkdir/system/bluetoothd"; then
            MOZ_B2G_BT=1
            MOZ_B2G_BT_DAEMON=1
        fi

        MOZ_RTSP=1
        MOZ_NFC=1
        MOZ_B2G_CAMERA=1
        MOZ_OMX_DECODER=1
        
        MOZ_OMX_ENCODER=1
        
        cat >> confdefs.pytmp <<\EOF
    (''' MOZ_OMX_ENCODER ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_OMX_ENCODER 1
EOF

        MOZ_SECUREELEMENT=1
        ;;
    19)
        GONK_INCLUDES="-I$gonkdir/frameworks/native/include -I$gonkdir/frameworks/av/include -I$gonkdir/frameworks/av/include/media -I$gonkdir/frameworks/av/include/camera -I$gonkdir/frameworks/native/include/media/openmax -I$gonkdir/frameworks/av/media/libstagefright/include -I$gonkdir/external/mdnsresponder/mDNSShared"
        MOZ_B2G_CAMERA=1
        if test -d "$gonkdir/system/bluetoothd"; then
            MOZ_B2G_BT=1
            MOZ_B2G_BT_DAEMON=1
        fi
        MOZ_NFC=1
        MOZ_RTSP=1
        MOZ_OMX_DECODER=1
        MOZ_OMX_ENCODER=1
        cat >> confdefs.pytmp <<\EOF
    (''' MOZ_OMX_ENCODER ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_OMX_ENCODER 1
EOF

        MOZ_AUDIO_OFFLOAD=1
        MOZ_SECUREELEMENT=1
        
        cat >> confdefs.pytmp <<\EOF
    (''' MOZ_AUDIO_OFFLOAD ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_AUDIO_OFFLOAD 1
EOF

        ;;
    21|22)
        GONK_INCLUDES="-I$gonkdir/frameworks/native/include -I$gonkdir/frameworks/av/include -I$gonkdir/frameworks/av/include/media -I$gonkdir/frameworks/av/include/camera -I$gonkdir/frameworks/native/include/media/openmax -I$gonkdir/frameworks/av/media/libstagefright/include -I$gonkdir/external/mdnsresponder/mDNSShared"
        MOZ_AUDIO_OFFLOAD=1
        MOZ_OMX_DECODER=1
        MOZ_OMX_ENCODER=1
        cat >> confdefs.pytmp <<\EOF
    (''' MOZ_OMX_ENCODER ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_OMX_ENCODER 1
EOF

        
        cat >> confdefs.pytmp <<\EOF
    (''' MOZ_AUDIO_OFFLOAD ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_AUDIO_OFFLOAD 1
EOF

        MOZ_B2G_CAMERA=1
        if test -d "$gonkdir/system/bluetoothd"; then
            MOZ_B2G_BT=1
            MOZ_B2G_BT_DAEMON=1
        fi
        MOZ_NFC=1
        MOZ_RTSP=1
        ;;
    *)
        { echo "configure: error: Unsupported platform version: $ANDROID_VERSION" 1>&2; echo "configure: error: Unsupported platform version: $ANDROID_VERSION" 1>&5; exit 1; }
        ;;
    esac
    CPPFLAGS="-DANDROID $TARGET_C_INCLUDES -I$gonkdir/system -I$gonkdir/system/core/include -isystem $gonkdir/bionic -I$gonkdir/hardware/libhardware/include -I$gonkdir/external/valgrind/fxos-include $GONK_INCLUDES $CPPFLAGS"
    CFLAGS="-mandroid -fno-short-enums -fno-exceptions $CFLAGS"
    CXXFLAGS="-mandroid -fno-short-enums -fno-exceptions $CXXFLAGS $STLPORT_CPPFLAGS"
        LIBS="$LIBS -llog"

    LDFLAGS="-mandroid -L$gonkdir/out/target/product/$GONK_PRODUCT/obj/lib -Wl,-rpath-link=$gonkdir/out/target/product/$GONK_PRODUCT/obj/lib --sysroot=$gonkdir/out/target/product/$GONK_PRODUCT/obj/ $LDFLAGS"

    cat >> confdefs.pytmp <<\EOF
    (''' ANDROID ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define ANDROID 1
EOF

    cat >> confdefs.pytmp <<EOF
    (''' ANDROID_VERSION ''', r''' $ANDROID_VERSION ''')
EOF
cat >> confdefs.h <<EOF
#define ANDROID_VERSION $ANDROID_VERSION
EOF

    
    cat >> confdefs.pytmp <<\EOF
    (''' HAVE_SYS_UIO_H ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_SYS_UIO_H 1
EOF

    cat >> confdefs.pytmp <<\EOF
    (''' HAVE_PTHREADS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_PTHREADS 1
EOF

    direct_nspr_config=1
    android_cxx_stl=mozstlport
else
    if test "$COMPILE_ENVIRONMENT"; then
        

# Check whether --with-android-cxx-stl or --without-android-cxx-stl was given.
if test "${with_android_cxx_stl+set}" = set; then
  withval="$with_android_cxx_stl"
  android_cxx_stl=$withval
else
  android_cxx_stl=libc++
fi



android_version=9

# Check whether --with-android-version or --without-android-version was given.
if test "${with_android_version+set}" = set; then
  withval="$with_android_version"
  android_version=$withval
fi


if test $android_version -lt 9 ; then
    { echo "configure: error: --with-android-version must be at least 9." 1>&2; echo "configure: error: --with-android-version must be at least 9." 1>&5; exit 1; }
fi

case "$target" in
*-android*|*-linuxandroid*)
    echo $ac_n "checking for android platform directory""... $ac_c" 1>&6
echo "configure:1536: checking for android platform directory" >&5

    case "$target_cpu" in
    arm)
        target_name=arm
        ;;
    i?86)
        target_name=x86
        ;;
    mipsel)
        target_name=mips
        ;;
    esac

    android_platform="$android_ndk"/platforms/android-"$android_version"/arch-"$target_name"

    if test -d "$android_platform" ; then
        echo "$ac_t""$android_platform" 1>&6
    else
        { echo "configure: error: not found. Please check your NDK. With the current configuration, it should be in $android_platform" 1>&2; echo "configure: error: not found. Please check your NDK. With the current configuration, it should be in $android_platform" 1>&5; exit 1; }
    fi

    CPPFLAGS="-idirafter $android_platform/usr/include $CPPFLAGS"
    CFLAGS="-mandroid -fno-short-enums -fno-exceptions $CFLAGS"
    CXXFLAGS="-mandroid -fno-short-enums -fno-exceptions $CXXFLAGS"
    ASFLAGS="-idirafter $android_platform/usr/include -DANDROID $ASFLAGS"

                    LDFLAGS="-mandroid -L$android_platform/usr/lib -Wl,-rpath-link=$android_platform/usr/lib --sysroot=$android_platform -llog -Wl,--allow-shlib-undefined $LDFLAGS"
    ANDROID_PLATFORM="${android_platform}"

    cat >> confdefs.pytmp <<\EOF
    (''' ANDROID ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define ANDROID 1
EOF

    

    ;;
esac


    fi # COMPILE_ENVIRONMENT

    case "$target" in
    *-android*|*-linuxandroid*)
        ZLIB_DIR=yes
        cat >> confdefs.pytmp <<\EOF
    (''' ANDROID ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define ANDROID 1
EOF

        ;;
    *-linux*)
        # Extract the first word of "objcopy", so it can be a program name with args.
set dummy objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1596: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$OBJCOPY" in
  /*)
  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_OBJCOPY="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
OBJCOPY="$ac_cv_path_OBJCOPY"
if test -n "$OBJCOPY"; then
  echo "$ac_t""$OBJCOPY" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

        ;;
    esac
fi

case "$target" in
*-apple-darwin*)
    

# Check whether --with-ios-sdk or --without-ios-sdk was given.
if test "${with_ios_sdk+set}" = set; then
  withval="$with_ios_sdk"
  ios_sdk=$withval
fi


# Check whether --enable-ios-target or --disable-ios-target was given.
if test "${enable_ios_target+set}" = set; then
  enableval="$enable_ios_target"
  _IOS_TARGET=$enableval
fi

_IOS_TARGET_DEFAULT=8.0

case "$target" in
arm*-apple-darwin*)
    if test -z "$ios_sdk" -o "$ios_sdk" = "yes"; then
       ios_sdk=iphoneos
    fi
    case "$ios_sdk" in
         iphoneos*)
                ios_target_arg="-miphoneos-version-min"
                ;;
         *)
                { echo "configure: error: Only 'iphoneos' SDKs are valid when targeting iOS device, don't know what to do with '$ios_sdk'." 1>&2; echo "configure: error: Only 'iphoneos' SDKs are valid when targeting iOS device, don't know what to do with '$ios_sdk'." 1>&5; exit 1; }
                ;;
    esac
    ;;
*-apple-darwin*)
    ios_target_arg="-mios-simulator-version-min"
    case "$ios_sdk" in
         # Empty SDK is okay, this might be an OS X desktop build.
         ""|iphonesimulator*)
                ;;
         # Default to iphonesimulator
         yes)
                ios_sdk=iphonesimulator
                ;;
         *)
                { echo "configure: error: Only 'iphonesimulator' SDKs are valid when targeting iOS simulator." 1>&2; echo "configure: error: Only 'iphonesimulator' SDKs are valid when targeting iOS simulator." 1>&5; exit 1; }
                ;;
    esac
    ;;
esac


if test -n "$ios_sdk"; then
   if test -z "$_IOS_TARGET"; then
      _IOS_TARGET=$_IOS_TARGET_DEFAULT
      ios_target_arg="${ios_target_arg}=${_IOS_TARGET}"
   fi
   # Ensure that xcrun knows where this SDK is.
   ios_sdk_path=`xcrun --sdk $ios_sdk --show-sdk-path 2>/dev/null`
   _ret=$?
   if test $_ret -ne 0; then
      { echo "configure: error: iOS SDK '$ios_sdk' could not be found." 1>&2; echo "configure: error: iOS SDK '$ios_sdk' could not be found." 1>&5; exit 1; }
   fi
   MOZ_IOS=1
   export HOST_CC=clang
   export HOST_CXX=clang++
   # Add isysroot, arch, and ios target arguments
   case "$target_cpu" in
        arm*)
                ARGS="-arch armv7"
                ;;
        *)
                # Unfortunately simulator builds need this.
                export CROSS_COMPILE=1
                ;;
   esac
   ARGS=" $ARGS -isysroot $ios_sdk_path $ios_target_arg"
   # Now find our tools
   

_prog_name=clang

echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6
echo "configure:1714: checking for $_prog_name in iOS SDK" >&5
if eval "test \"`echo '$''{'ac_cv_ios_path_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null`
_res=$?
if test $_res -ne 0; then
   { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; }
fi
ac_cv_ios_path_CC=$_path

fi

echo "$ac_t""$ac_cv_ios_path_CC" 1>&6
CC="${ac_cv_ios_path_CC}$ARGS"

   

_prog_name=clang++

echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6
echo "configure:1736: checking for $_prog_name in iOS SDK" >&5
if eval "test \"`echo '$''{'ac_cv_ios_path_CXX'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null`
_res=$?
if test $_res -ne 0; then
   { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; }
fi
ac_cv_ios_path_CXX=$_path

fi

echo "$ac_t""$ac_cv_ios_path_CXX" 1>&6
CXX="${ac_cv_ios_path_CXX}$ARGS"

   export CPP="$CC -E"
   export LD="$CXX"
   

_prog_name=`echo AR | tr "[:upper:]" "[:lower:]"`

echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6
echo "configure:1760: checking for $_prog_name in iOS SDK" >&5
if eval "test \"`echo '$''{'ac_cv_ios_path_AR'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null`
_res=$?
if test $_res -ne 0; then
   { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; }
fi
ac_cv_ios_path_AR=$_path

fi

echo "$ac_t""$ac_cv_ios_path_AR" 1>&6
AR="${ac_cv_ios_path_AR}"

   

_prog_name=as

echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6
echo "configure:1782: checking for $_prog_name in iOS SDK" >&5
if eval "test \"`echo '$''{'ac_cv_ios_path_AS'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null`
_res=$?
if test $_res -ne 0; then
   { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; }
fi
ac_cv_ios_path_AS=$_path

fi

echo "$ac_t""$ac_cv_ios_path_AS" 1>&6
AS="${ac_cv_ios_path_AS}$ARGS"

   

_prog_name=`echo OTOOL | tr "[:upper:]" "[:lower:]"`

echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6
echo "configure:1804: checking for $_prog_name in iOS SDK" >&5
if eval "test \"`echo '$''{'ac_cv_ios_path_OTOOL'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null`
_res=$?
if test $_res -ne 0; then
   { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; }
fi
ac_cv_ios_path_OTOOL=$_path

fi

echo "$ac_t""$ac_cv_ios_path_OTOOL" 1>&6
OTOOL="${ac_cv_ios_path_OTOOL}"

   

_prog_name=`echo STRIP | tr "[:upper:]" "[:lower:]"`

echo $ac_n "checking for $_prog_name in iOS SDK""... $ac_c" 1>&6
echo "configure:1826: checking for $_prog_name in iOS SDK" >&5
if eval "test \"`echo '$''{'ac_cv_ios_path_STRIP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
_path=`xcrun --sdk $ios_sdk --find $_prog_name 2>/dev/null`
_res=$?
if test $_res -ne 0; then
   { echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&2; echo "configure: error: Could not find '$_prog_name' in the iOS SDK" 1>&5; exit 1; }
fi
ac_cv_ios_path_STRIP=$_path

fi

echo "$ac_t""$ac_cv_ios_path_STRIP" 1>&6
STRIP="${ac_cv_ios_path_STRIP}"

   export PKG_CONFIG_PATH=${ios_sdk_path}/usr/lib/pkgconfig/
fi



    ;;
esac






AR_FLAGS='crs $@'

if test "$COMPILE_ENVIRONMENT"; then

if test "$target" != "$host"; then
    
echo "cross compiling from $host to $target"

_SAVE_CC="$CC"
_SAVE_CFLAGS="$CFLAGS"
_SAVE_LDFLAGS="$LDFLAGS"

if test -z "$HOST_AR_FLAGS"; then
    HOST_AR_FLAGS="$AR_FLAGS"
fi
for ac_prog in $HOST_RANLIB ranlib
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1876: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_HOST_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$HOST_RANLIB"; then
  ac_cv_prog_HOST_RANLIB="$HOST_RANLIB" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy=":"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_HOST_RANLIB="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
HOST_RANLIB="$ac_cv_prog_HOST_RANLIB"
if test -n "$HOST_RANLIB"; then
  echo "$ac_t""$HOST_RANLIB" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$HOST_RANLIB" && break
done
test -n "$HOST_RANLIB" || HOST_RANLIB="ranlib"

for ac_prog in $HOST_AR ar
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1911: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_HOST_AR'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$HOST_AR"; then
  ac_cv_prog_HOST_AR="$HOST_AR" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy=":"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_HOST_AR="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
HOST_AR="$ac_cv_prog_HOST_AR"
if test -n "$HOST_AR"; then
  echo "$ac_t""$HOST_AR" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$HOST_AR" && break
done
test -n "$HOST_AR" || HOST_AR="ar"

CC="$HOST_CC"
CFLAGS="$HOST_CFLAGS"
LDFLAGS="$HOST_LDFLAGS"

echo $ac_n "checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1946: checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
cat > conftest.$ac_ext <<EOF
#line 1948 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:1955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_prog_hostcc_works=1 echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  { echo "configure: error: installation or configuration problem: host compiler $HOST_CC cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: host compiler $HOST_CC cannot create executables." 1>&5; exit 1; } 
fi
rm -f conftest*

CC="$HOST_CXX"
CFLAGS="$HOST_CXXFLAGS"
echo $ac_n "checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1969: checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works" >&5
cat > conftest.$ac_ext <<EOF
#line 1971 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:1978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_prog_hostcxx_works=1 echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  { echo "configure: error: installation or configuration problem: host compiler $HOST_CXX cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: host compiler $HOST_CXX cannot create executables." 1>&5; exit 1; } 
fi
rm -f conftest*

CC=$_SAVE_CC
CFLAGS=$_SAVE_CFLAGS
LDFLAGS=$_SAVE_LDFLAGS

_SAVE_PATH=$PATH
case "${TOOLCHAIN_PREFIX}" in
/*)
    PATH="/:$PATH"
    ;;
esac
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2002: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="gcc"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test -z "$CC"; then
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2032: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_prog_rejected=no
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
	continue
      fi
      ac_cv_prog_CC="cc"
      break
    fi
  done
  IFS="$ac_save_ifs"
if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
  if test $# -gt 0; then
    # We chose a different compiler from the bogus one.
    # However, it has the same basename, so the bogon will be chosen
    # first if we set CC to just the basename; use the full file name.
    shift
    set dummy "$ac_dir/$ac_word" "$@"
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test -z "$CC"; then
    case "`uname -s`" in
    *win32* | *WIN32*)
      # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2083: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="cl"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
 ;;
    esac
  fi
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; echo "configure: error: no acceptable cc found in \$PATH" 1>&5; exit 1; }
fi

echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:2115: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

cat > conftest.$ac_ext << EOF

#line 2126 "configure"
#include "confdefs.h"

main(){return(0);}
EOF
if { (eval echo configure:2131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_prog_cc_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cc_cross=no
  else
    ac_cv_prog_cc_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cc_works=no
fi
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&5; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:2157: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross

echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:2162: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_gcc=yes
else
  ac_cv_prog_gcc=no
fi
fi

echo "$ac_t""$ac_cv_prog_gcc" 1>&6

if test $ac_cv_prog_gcc = yes; then
  GCC=yes
else
  GCC=
fi

ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:2190: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_g=yes
else
  ac_cv_prog_cc_g=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
if test "$ac_test_CFLAGS" = set; then
  CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
  if test "$GCC" = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-g"
  fi
else
  if test "$GCC" = yes; then
    CFLAGS="-O2"
  else
    CFLAGS=
  fi
fi

for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2226: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CXX="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CXX="$ac_cv_prog_CXX"
if test -n "$CXX"; then
  echo "$ac_t""$CXX" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$CXX" && break
done
test -n "$CXX" || CXX="gcc"


echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:2258: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5

ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

cat > conftest.$ac_ext << EOF

#line 2269 "configure"
#include "confdefs.h"

int main(){return(0);}
EOF
if { (eval echo configure:2274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_prog_cxx_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cxx_cross=no
  else
    ac_cv_prog_cxx_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cxx_works=no
fi
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
if test $ac_cv_prog_cxx_works = no; then
  { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&5; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:2300: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross

echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
echo "configure:2305: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.C <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_gxx=yes
else
  ac_cv_prog_gxx=no
fi
fi

echo "$ac_t""$ac_cv_prog_gxx" 1>&6

if test $ac_cv_prog_gxx = yes; then
  GXX=yes
else
  GXX=
fi

ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
echo "configure:2333: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'void f(){}' > conftest.cc
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  ac_cv_prog_cxx_g=yes
else
  ac_cv_prog_cxx_g=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
if test "$ac_test_CXXFLAGS" = set; then
  CXXFLAGS="$ac_save_CXXFLAGS"
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
else
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi

for ac_declaration in \
   ''\
   '#include <stdlib.h>' \
   'extern "C" void std::exit (int) throw (); using std::exit;' \
   'extern "C" void std::exit (int); using std::exit;' \
   'extern "C" void exit (int) throw ();' \
   'extern "C" void exit (int);' \
   'void exit (int);'
do
  cat > conftest.$ac_ext <<EOF
#line 2374 "configure"
#include "confdefs.h"
#include <stdlib.h>
$ac_declaration
int main() {
exit (42);
; return 0; }
EOF
if { (eval echo configure:2382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  continue
fi
rm -f conftest*
  cat > conftest.$ac_ext <<EOF
#line 2392 "configure"
#include "confdefs.h"
$ac_declaration
int main() {
exit (42);
; return 0; }
EOF
if { (eval echo configure:2399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
if test -n "$ac_declaration"; then
  echo '#ifdef __cplusplus' >>confdefs.h
  echo $ac_declaration      >>confdefs.h
  echo '#endif'             >>confdefs.h
fi



for ac_prog in "${TOOLCHAIN_PREFIX}ranlib"
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2421: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_RANLIB="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
  echo "$ac_t""$RANLIB" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$RANLIB" && break
done
test -n "$RANLIB" || RANLIB=":"

for ac_prog in "${TOOLCHAIN_PREFIX}ar"
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2456: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$AR"; then
  ac_cv_prog_AR="$AR" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_AR="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
AR="$ac_cv_prog_AR"
if test -n "$AR"; then
  echo "$ac_t""$AR" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$AR" && break
done
test -n "$AR" || AR=":"

for ac_prog in "${TOOLCHAIN_PREFIX}as"
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2491: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$AS"; then
  ac_cv_prog_AS="$AS" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_AS="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
AS="$ac_cv_prog_AS"
if test -n "$AS"; then
  echo "$ac_t""$AS" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$AS" && break
done
test -n "$AS" || AS=":"

for ac_prog in "${TOOLCHAIN_PREFIX}ld"
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2526: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$LD"; then
  ac_cv_prog_LD="$LD" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_LD="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
LD="$ac_cv_prog_LD"
if test -n "$LD"; then
  echo "$ac_t""$LD" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$LD" && break
done
test -n "$LD" || LD=":"

for ac_prog in "${TOOLCHAIN_PREFIX}strip"
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2561: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$STRIP"; then
  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_STRIP="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
STRIP="$ac_cv_prog_STRIP"
if test -n "$STRIP"; then
  echo "$ac_t""$STRIP" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$STRIP" && break
done
test -n "$STRIP" || STRIP=":"

for ac_prog in "${TOOLCHAIN_PREFIX}windres"
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2596: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$WINDRES"; then
  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_WINDRES="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
WINDRES="$ac_cv_prog_WINDRES"
if test -n "$WINDRES"; then
  echo "$ac_t""$WINDRES" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$WINDRES" && break
done
test -n "$WINDRES" || WINDRES=":"

for ac_prog in "${TOOLCHAIN_PREFIX}otool"
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2631: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OTOOL'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$OTOOL"; then
  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_OTOOL="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
OTOOL="$ac_cv_prog_OTOOL"
if test -n "$OTOOL"; then
  echo "$ac_t""$OTOOL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$OTOOL" && break
done
test -n "$OTOOL" || OTOOL=":"

for ac_prog in "${TOOLCHAIN_PREFIX}objcopy"
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2666: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$OBJCOPY"; then
  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_OBJCOPY="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
OBJCOPY="$ac_cv_prog_OBJCOPY"
if test -n "$OBJCOPY"; then
  echo "$ac_t""$OBJCOPY" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$OBJCOPY" && break
done
test -n "$OBJCOPY" || OBJCOPY=":"

PATH=$_SAVE_PATH

else
    # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2702: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="gcc"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test -z "$CC"; then
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2732: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_prog_rejected=no
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
	continue
      fi
      ac_cv_prog_CC="cc"
      break
    fi
  done
  IFS="$ac_save_ifs"
if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
  if test $# -gt 0; then
    # We chose a different compiler from the bogus one.
    # However, it has the same basename, so the bogon will be chosen
    # first if we set CC to just the basename; use the full file name.
    shift
    set dummy "$ac_dir/$ac_word" "$@"
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test -z "$CC"; then
    case "`uname -s`" in
    *win32* | *WIN32*)
      # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2783: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="cl"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
 ;;
    esac
  fi
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; echo "configure: error: no acceptable cc found in \$PATH" 1>&5; exit 1; }
fi

echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:2815: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

cat > conftest.$ac_ext << EOF

#line 2826 "configure"
#include "confdefs.h"

main(){return(0);}
EOF
if { (eval echo configure:2831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_prog_cc_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cc_cross=no
  else
    ac_cv_prog_cc_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cc_works=no
fi
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&5; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:2857: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross

echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:2862: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_gcc=yes
else
  ac_cv_prog_gcc=no
fi
fi

echo "$ac_t""$ac_cv_prog_gcc" 1>&6

if test $ac_cv_prog_gcc = yes; then
  GCC=yes
else
  GCC=
fi

ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:2890: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_g=yes
else
  ac_cv_prog_cc_g=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
if test "$ac_test_CFLAGS" = set; then
  CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
  if test "$GCC" = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-g"
  fi
else
  if test "$GCC" = yes; then
    CFLAGS="-O2"
  else
    CFLAGS=
  fi
fi

    case "$target" in
    *-mingw*)
      # Work around the conftest.exe access problem on Windows
      sleep 2
    esac
    for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2931: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CXX="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CXX="$ac_cv_prog_CXX"
if test -n "$CXX"; then
  echo "$ac_t""$CXX" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$CXX" && break
done
test -n "$CXX" || CXX="gcc"


echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:2963: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5

ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

cat > conftest.$ac_ext << EOF

#line 2974 "configure"
#include "confdefs.h"

int main(){return(0);}
EOF
if { (eval echo configure:2979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_prog_cxx_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cxx_cross=no
  else
    ac_cv_prog_cxx_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cxx_works=no
fi
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
if test $ac_cv_prog_cxx_works = no; then
  { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&5; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:3005: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross

echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
echo "configure:3010: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.C <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:3019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_gxx=yes
else
  ac_cv_prog_gxx=no
fi
fi

echo "$ac_t""$ac_cv_prog_gxx" 1>&6

if test $ac_cv_prog_gxx = yes; then
  GXX=yes
else
  GXX=
fi

ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
echo "configure:3038: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'void f(){}' > conftest.cc
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  ac_cv_prog_cxx_g=yes
else
  ac_cv_prog_cxx_g=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
if test "$ac_test_CXXFLAGS" = set; then
  CXXFLAGS="$ac_save_CXXFLAGS"
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
else
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi

for ac_declaration in \
   ''\
   '#include <stdlib.h>' \
   'extern "C" void std::exit (int) throw (); using std::exit;' \
   'extern "C" void std::exit (int); using std::exit;' \
   'extern "C" void exit (int) throw ();' \
   'extern "C" void exit (int);' \
   'void exit (int);'
do
  cat > conftest.$ac_ext <<EOF
#line 3079 "configure"
#include "confdefs.h"
#include <stdlib.h>
$ac_declaration
int main() {
exit (42);
; return 0; }
EOF
if { (eval echo configure:3087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  continue
fi
rm -f conftest*
  cat > conftest.$ac_ext <<EOF
#line 3097 "configure"
#include "confdefs.h"
$ac_declaration
int main() {
exit (42);
; return 0; }
EOF
if { (eval echo configure:3104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
if test -n "$ac_declaration"; then
  echo '#ifdef __cplusplus' >>confdefs.h
  echo $ac_declaration      >>confdefs.h
  echo '#endif'             >>confdefs.h
fi


    # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3123: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_RANLIB="ranlib"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
  echo "$ac_t""$RANLIB" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

      for ac_prog in $AS as
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3155: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$AS" in
  /*)
  ac_cv_path_AS="$AS" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_AS="$AS" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_AS="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
AS="$ac_cv_path_AS"
if test -n "$AS"; then
  echo "$ac_t""$AS" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$AS" && break
done
test -n "$AS" || AS="$CC"

  if test "$msyshost"; then
    case "$AS" in
    /*)
      tmp_DIRNAME=`dirname "$AS"`
      tmp_BASENAME=`basename "$AS"`
      tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
      AS="$tmp_PWD/$tmp_BASENAME"
      if test -e "$AS.exe"; then
        AS="$AS.exe"
      fi
    esac
  fi

    for ac_prog in ar
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3209: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$AR"; then
  ac_cv_prog_AR="$AR" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_AR="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
AR="$ac_cv_prog_AR"
if test -n "$AR"; then
  echo "$ac_t""$AR" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$AR" && break
done
test -n "$AR" || AR=":"

    for ac_prog in ld
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3244: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$LD"; then
  ac_cv_prog_LD="$LD" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_LD="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
LD="$ac_cv_prog_LD"
if test -n "$LD"; then
  echo "$ac_t""$LD" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$LD" && break
done
test -n "$LD" || LD=":"

    for ac_prog in strip
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3279: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$STRIP"; then
  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_STRIP="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
STRIP="$ac_cv_prog_STRIP"
if test -n "$STRIP"; then
  echo "$ac_t""$STRIP" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$STRIP" && break
done
test -n "$STRIP" || STRIP=":"

    for ac_prog in windres
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3314: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$WINDRES"; then
  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_WINDRES="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
WINDRES="$ac_cv_prog_WINDRES"
if test -n "$WINDRES"; then
  echo "$ac_t""$WINDRES" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$WINDRES" && break
done
test -n "$WINDRES" || WINDRES=":"

    for ac_prog in otool
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3349: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OTOOL'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$OTOOL"; then
  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_OTOOL="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
OTOOL="$ac_cv_prog_OTOOL"
if test -n "$OTOOL"; then
  echo "$ac_t""$OTOOL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$OTOOL" && break
done
test -n "$OTOOL" || OTOOL=":"

    if test -z "$HOST_RANLIB"; then
        HOST_RANLIB="$RANLIB"
    fi
    if test -z "$HOST_AR"; then
        HOST_AR="$AR"
    fi
    if test -z "$HOST_AR_FLAGS"; then
        HOST_AR_FLAGS="$AR_FLAGS"
    fi
fi

if test -n "$MOZ_WINCONSOLE"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_WINCONSOLE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_WINCONSOLE 1
EOF

fi


GNU_AS=
GNU_LD=

GNU_CC=
GNU_CXX=
if test "$CC_TYPE" = "gcc"; then
    GNU_CC=1
    GNU_CXX=1
fi

if test "`echo | $AS -o conftest.out -v 2>&1 | grep -c GNU`" != "0"; then
    GNU_AS=1
fi
rm -f conftest.out
if test "`echo | $LD -v 2>&1 | grep -c GNU`" != "0"; then
    GNU_LD=1
fi

CLANG_CC=
CLANG_CXX=
CLANG_CL=
if test "$CC_TYPE" = "clang"; then
    GNU_CC=1
    GNU_CXX=1
    CLANG_CC=1
    CLANG_CXX=1
fi
if test "$CC_TYPE" = "clang-cl"; then
    CLANG_CL=1
fi

if test "$GNU_CC"; then
    if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
        GCC_USE_GNU_LD=1
    fi
fi






   # Extract the first word of "rustc", so it can be a program name with args.
set dummy rustc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3446: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_RUSTC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$RUSTC" in
  /*)
  ac_cv_path_RUSTC="$RUSTC" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_RUSTC="$RUSTC" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_RUSTC="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
RUSTC="$ac_cv_path_RUSTC"
if test -n "$RUSTC"; then
  echo "$ac_t""$RUSTC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test "$msyshost"; then
    case "$RUSTC" in
    /*)
      tmp_DIRNAME=`dirname "$RUSTC"`
      tmp_BASENAME=`basename "$RUSTC"`
      tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
      RUSTC="$tmp_PWD/$tmp_BASENAME"
      if test -e "$RUSTC.exe"; then
        RUSTC="$RUSTC.exe"
      fi
    esac
  fi

  if test -n "$RUSTC"; then
    echo $ac_n "checking rustc version""... $ac_c" 1>&6
echo "configure:3493: checking rustc version" >&5
    RUSTC_VERSION=`$RUSTC --version | cut -d ' ' -f 2`
    # Parse out semversion elements.
    _RUSTC_MAJOR_VERSION=`echo ${RUSTC_VERSION} | cut -d . -f 1`
    _RUSTC_MINOR_VERSION=`echo ${RUSTC_VERSION} | cut -d . -f 2`
    _RUSTC_EXTRA_VERSION=`echo ${RUSTC_VERSION} | cut -d . -f 3 | cut -d + -f 1`
    _RUSTC_PATCH_VERSION=`echo ${_RUSTC_EXTRA_VERSION} | cut -d '-' -f 1`
    echo "$ac_t""${_RUSTC_MAJOR_VERSION}.${_RUSTC_MINOR_VERSION}.${_RUSTC_PATCH_VERSION} ($RUSTC_VERSION)" 1>&6
  fi
  # Check whether --enable-rust or --disable-rust was given.
if test "${enable_rust+set}" = set; then
  enableval="$enable_rust"
  if test "$enableval" = "yes"; then
    MOZ_RUST=1
  elif test "$enableval" = "no"; then
    MOZ_RUST= 
  else
    { echo "configure: error: Option, rust, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, rust, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

  if test -z "$RUSTC" -a -n "$MOZ_RUST"; then
    { echo "configure: error: Rust compiler not found.
      To compile rust language sources, you must have 'rustc' in your path.
      See http://www.rust-lang.org/ for more information." 1>&2; echo "configure: error: Rust compiler not found.
      To compile rust language sources, you must have 'rustc' in your path.
      See http://www.rust-lang.org/ for more information." 1>&5; exit 1; }
  fi
  if test -n "$MOZ_RUST" && test -z "$_RUSTC_MAJOR_VERSION" -o \
    "$_RUSTC_MAJOR_VERSION" -lt 1 -o \
    \( "$_RUSTC_MAJOR_VERSION" -eq 1 -a "$_RUSTC_MINOR_VERSION" -lt 5 \); then
    { echo "configure: error: Rust compiler ${RUSTC_VERSION} is too old.
      To compile Rust language sources please install at least
      version 1.5 of the 'rustc' toolchain and make sure it is
      first in your path.
      You can verify this by typing 'rustc --version'." 1>&2; echo "configure: error: Rust compiler ${RUSTC_VERSION} is too old.
      To compile Rust language sources please install at least
      version 1.5 of the 'rustc' toolchain and make sure it is
      first in your path.
      You can verify this by typing 'rustc --version'." 1>&5; exit 1; }
  fi

  if test -n "$RUSTC" -a -n "$MOZ_RUST"; then
    # Rust's --target options are similar to, but not exactly the same
    # as, the autoconf-derived targets we use.  An example would be that
    # Rust uses distinct target triples for targetting the GNU C++ ABI
    # and the MSVC C++ ABI on Win32, whereas autoconf has a single
    # triple and relies on the user to ensure that everything is
    # compiled for the appropriate ABI.  We need to perform appropriate
    # munging to get the correct option to rustc.
    #
    # The canonical list of targets supported can be derived from:
    #
    # https://github.com/rust-lang/rust/tree/master/mk/cfg
    rust_target=
    case "$target" in
      # Bitrig
      x86_64-*-bitrig*)
          rust_target=x86_64-unknown-bitrig
          ;;

      # DragonFly
      x86_64-*-dragonfly*)
          rust_target=x86_64-unknown-dragonfly
          ;;

      # FreeBSD, GNU/kFreeBSD
      i*86-*-*freebsd*)
          rust_target=i686-unknown-freebsd
          ;;
      x86_64-*-*freebsd*)
          rust_target=x86_64-unknown-freebsd
          ;;

      # NetBSD
      x86_64-*-netbsd*)
          rust_target=x86_64-unknown-netbsd
          ;;

      # OpenBSD
      x86_64-*-openbsd*)
          rust_target=x86_64-unknown-openbsd
          ;;

      # Linux
      i*86*linux-gnu)
          rust_target=i686-unknown-linux-gnu
          ;;
      x86_64*linux-gnu)
          rust_target=x86_64-unknown-linux-gnu
          ;;

      # OS X and iOS
      i*86-apple-darwin*)
          rust_target=i686-apple-darwin
          ;;
      i*86-apple-ios*)
          rust_target=i386-apple-ios
          ;;
      x86_64-apple-darwin*)
          rust_target=x86_64-apple-darwin
          ;;

      # Android
      i*86*linux-android)
          rust_target=i686-linux-android
          ;;
      arm*linux-android*)
          rust_target=arm-linux-androideabi
          ;;

      # Windows
      i*86-pc-mingw32)
          # XXX better detection of CXX needed here, to figure out whether
          # we need i686-pc-windows-gnu instead, since mingw32 builds work.
          rust_target=i686-pc-windows-msvc
          ;;
      x86_64-pc-mingw32)
          # XXX and here as well
          rust_target=x86_64-pc-windows-msvc
          ;;
      *)
          # Fall back to implicit (native) target when not cross-compiling
          if test -n "$CROSS_COMPILE"; then
            { echo "configure: error: don't know how to translate $target for rustc" 1>&2; echo "configure: error: don't know how to translate $target for rustc" 1>&5; exit 1; }
          fi
          ;;
    esac

    if test -n "$rust_target"; then
      # Check to see whether we need to pass --target to RUSTC.  This can
      # happen when building Firefox on Windows: js's configure will receive
      # a RUSTC from the toplevel configure that already has --target added to
      # it.
      rustc_target_arg=
      case "$RUSTC" in
        *--target=${rust_target}*)
          ;;
        *)
          rustc_target_arg=--target=${rust_target}
          ;;
      esac
    fi

    # Check to see whether our rustc has a reasonably functional stdlib
    # for our chosen target.
    echo 'pub extern fn hello() { println!("Hello world"); }' > conftest.rs
    if { ac_try='${RUSTC} --crate-type staticlib ${rustc_target_arg} -o conftest.rlib conftest.rs > /dev/null'; { (eval echo configure:3640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.rlib; then
      RUSTC="${RUSTC} ${rustc_target_arg}"
    else
      { echo "configure: error: cannot compile for ${rust_target} with ${RUSTC}" 1>&2; echo "configure: error: cannot compile for ${rust_target} with ${RUSTC}" 1>&5; exit 1; }
    fi
    rm -f conftest.rs conftest.rlib
  fi

  # TODO: separate HOST_RUSTC and RUSTC variables

  


echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:3654: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    # This must be in double quotes, not single quotes, because CPP may get
  # substituted into the Makefile and "${CC-cc}" will confuse make.
  CPP="${CC-cc} -E"
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp.
  cat > conftest.$ac_ext <<EOF
#line 3669 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
#line 3686 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -nologo -E"
  cat > conftest.$ac_ext <<EOF
#line 3703 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
  ac_cv_prog_CPP="$CPP"
fi
  CPP="$ac_cv_prog_CPP"
else
  ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6

echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
echo "configure:3734: checking how to run the C++ preprocessor" >&5
if test -z "$CXXCPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
  CXXCPP="${CXX-g++} -E"
  cat > conftest.$ac_ext <<EOF
#line 3747 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CXXCPP=/lib/cpp
fi
rm -f conftest*
  ac_cv_prog_CXXCPP="$CXXCPP"
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
fi
fi
CXXCPP="$ac_cv_prog_CXXCPP"
echo "$ac_t""$CXXCPP" 1>&6



# Target the Windows 8.1 SDK by default
WINSDK_TARGETVER=603
WINVER=502

# Check whether --with-windows-version or --without-windows-version was given.
if test "${with_windows_version+set}" = set; then
  withval="$with_windows_version"
  WINSDK_TARGETVER=$withval
fi


# Currently only version 603 is allowed
case "$WINSDK_TARGETVER" in
603)
    MOZ_WINSDK_TARGETVER=0${WINSDK_TARGETVER}0000
    ;;

*)
    { echo "configure: error: Invalid value for --with-windows-version ($WINSDK_TARGETVER)" 1>&2; echo "configure: error: Invalid value for --with-windows-version ($WINSDK_TARGETVER)" 1>&5; exit 1; };
    ;;
esac

case "$target" in
*-mingw*)
    if test "$GCC" != "yes"; then
        # Check to see if we are really running in a msvc environemnt
        _WIN32_MSVC=1
        for ac_prog in midl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3810: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MIDL'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$MIDL"; then
  ac_cv_prog_MIDL="$MIDL" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_MIDL="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
MIDL="$ac_cv_prog_MIDL"
if test -n "$MIDL"; then
  echo "$ac_t""$MIDL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$MIDL" && break
done


        # Make sure compilers are valid
        CFLAGS="$CFLAGS -TC -nologo"
        CXXFLAGS="$CXXFLAGS -TP -nologo"
        
        ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        cat > conftest.$ac_ext <<EOF
#line 3852 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
 printf("Hello World\n"); 
; return 0; }
EOF
if { (eval echo configure:3859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  { echo "configure: error: \$(CC) test failed.  You must have MS VC++ in your path to build." 1>&2; echo "configure: error: \$(CC) test failed.  You must have MS VC++ in your path to build." 1>&5; exit 1; } 
fi
rm -f conftest*

        ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

        cat > conftest.$ac_ext <<EOF
#line 3877 "configure"
#include "confdefs.h"
#include <new.h>
int main() {
 unsigned *test = new unsigned(42); 
; return 0; }
EOF
if { (eval echo configure:3884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  { echo "configure: error: \$(CXX) test failed.  You must have MS VC++ in your path to build." 1>&2; echo "configure: error: \$(CXX) test failed.  You must have MS VC++ in your path to build." 1>&5; exit 1; } 
fi
rm -f conftest*
        ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross


        
        _MSVC_VER_FILTER='s|.*[^!-~]([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?).*|\1|p'
        

        _MSC_VER=`echo ${CC_VERSION} | cut -c 1-2,4-5`

        cat >> confdefs.pytmp <<\EOF
    (''' _CRT_SECURE_NO_WARNINGS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _CRT_SECURE_NO_WARNINGS 1
EOF

        cat >> confdefs.pytmp <<\EOF
    (''' _CRT_NONSTDC_NO_WARNINGS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _CRT_NONSTDC_NO_WARNINGS 1
EOF

        cat >> confdefs.pytmp <<\EOF
    (''' _USE_MATH_DEFINES ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _USE_MATH_DEFINES 1
EOF
 # Otherwise MSVC's math.h doesn't #define M_PI.

        case "$CC_VERSION" in
        18*)
            _CC_SUITE=12
            MSVS_VERSION=2013
            MSVC_C_RUNTIME_DLL=msvcr120.dll
            MSVC_CXX_RUNTIME_DLL=msvcp120.dll
            ;;
        19*)
            _CC_SUITE=14
            MSVS_VERSION=2015
            MSVC_C_RUNTIME_DLL=vcruntime140.dll
            MSVC_CXX_RUNTIME_DLL=msvcp140.dll

               ac_safe=`echo "dia2.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for dia2.h""... $ac_c" 1>&6
echo "configure:3944: checking for dia2.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 3949 "configure"
#include "confdefs.h"

#include <dia2.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:3957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    MSVC_HAS_DIA_SDK=1
  else
    echo "$ac_t""no" 1>&6
    
  fi

            if test -n "$MSVC_HAS_DIA_SDK"; then
                cat >> confdefs.pytmp <<\EOF
    (''' MSVC_HAS_DIA_SDK ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MSVC_HAS_DIA_SDK 1
EOF

            fi

            # C5026: move constructor was implicitly defined as deleted
            CXXFLAGS="$CXXFLAGS -wd5026"

            # C5027: move assignment operator was implicitly defined as deleted
            CXXFLAGS="$CXXFLAGS -wd5027"

            # -Zc:sizedDealloc- disables C++14 global sized deallocation (see bug 1160146)
            CXXFLAGS="$CXXFLAGS -Zc:sizedDealloc-"

            # Disable C++11 thread-safe statics due to crashes on XP (bug 1204752)
            # See https://connect.microsoft.com/VisualStudio/feedback/details/1789709/visual-c-2015-runtime-broken-on-windows-server-2003-c-11-magic-statics
            CXXFLAGS="$CXXFLAGS -Zc:threadSafeInit-"

            # https://connect.microsoft.com/VisualStudio/feedback/details/888527/warnings-on-dbghelp-h
            # for dbghelp.h, imagehlp.h, and shobj.h
            # C4091: 'typedef ': ignored on left of '' when no variable is declared
            CFLAGS="$CFLAGS -wd4091"
            CXXFLAGS="$CXXFLAGS -wd4091"

            if test -n "$WIN_UCRT_REDIST_DIR"; then
              if test ! -d "$WIN_UCRT_REDIST_DIR"; then
                { echo "configure: error: Invalid Windows UCRT Redist directory: ${WIN_UCRT_REDIST_DIR}" 1>&2; echo "configure: error: Invalid Windows UCRT Redist directory: ${WIN_UCRT_REDIST_DIR}" 1>&5; exit 1; }
              fi
              WIN_UCRT_REDIST_DIR=`cd "$WIN_UCRT_REDIST_DIR" && pwd -W`
            fi
            ;;
        esac
        
        
        
        

        cat >> confdefs.pytmp <<\EOF
    (''' HAVE_SEH_EXCEPTIONS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_SEH_EXCEPTIONS 1
EOF


        if test -n "$WIN32_REDIST_DIR"; then
          if test ! -d "$WIN32_REDIST_DIR"; then
            { echo "configure: error: Invalid Win32 Redist directory: ${WIN32_REDIST_DIR}" 1>&2; echo "configure: error: Invalid Win32 Redist directory: ${WIN32_REDIST_DIR}" 1>&5; exit 1; }
          fi
          WIN32_REDIST_DIR=`cd "$WIN32_REDIST_DIR" && pwd -W`
        fi

                        MSMT_TOOL=`${MT-mt} 2>&1|grep 'Microsoft (R) Manifest Tool'`
        if test -z "$MSMT_TOOL"; then
          { echo "configure: error: Microsoft (R) Manifest Tool must be in your \$PATH." 1>&2; echo "configure: error: Microsoft (R) Manifest Tool must be in your \$PATH." 1>&5; exit 1; }
        fi

        
        _MSMT_VER_FILTER='s|.*[^!-~]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*|\1|p'
        
        MSMANIFEST_TOOL_VERSION=`echo ${MSMT_TOOL}|sed -ne "$_MSMT_VER_FILTER"`
        if test -z "$MSMANIFEST_TOOL_VERSION"; then
          echo "configure: warning: Unknown version of the Microsoft (R) Manifest Tool." 1>&2
        fi

        MSMANIFEST_TOOL=1
        unset MSMT_TOOL

        # Check linker version
        _LD_FULL_VERSION=`"${LD}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
        _LD_MAJOR_VERSION=`echo ${_LD_FULL_VERSION} | $AWK -F\. '{ print $1 }'`
        if test "$_LD_MAJOR_VERSION" != "$_CC_SUITE"; then
            { echo "configure: error: The linker major version, $_LD_FULL_VERSION,  does not match the compiler suite version, $_CC_SUITE." 1>&2; echo "configure: error: The linker major version, $_LD_FULL_VERSION,  does not match the compiler suite version, $_CC_SUITE." 1>&5; exit 1; }
        fi

        INCREMENTAL_LINKER=1

        # Set midl environment
        case "$target" in
        i*86-*)
            MIDL_FLAGS="${MIDL_FLAGS} -env win32"
            ;;
        x86_64-*)
            MIDL_FLAGS="${MIDL_FLAGS} -env x64"
            ;;
        esac

        unset _MSVC_VER_FILTER

        echo $ac_n "checking for overridable _RAISE""... $ac_c" 1>&6
echo "configure:4072: checking for overridable _RAISE" >&5
if eval "test \"`echo '$''{'ac_cv_have__RAISE'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
                
                ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

                _SAVE_CXXFLAGS="$CXXFLAGS"
                CXXFLAGS="${CXXFLAGS} -D_HAS_EXCEPTIONS=0"
                cat > conftest.$ac_ext <<EOF
#line 4088 "configure"
#include "confdefs.h"
#include <xstddef>
                                #undef _RAISE
                                #define _RAISE(x) externallyDefinedFunction((x).what())
                                #include <vector>
                               
int main() {
std::vector<int> v; return v.at(1);
; return 0; }
EOF
if { (eval echo configure:4099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_have__RAISE="no"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_have__RAISE="yes"
fi
rm -f conftest*
                CXXFLAGS="$_SAVE_CXXFLAGS"
                ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

            
fi

echo "$ac_t""$ac_cv_have__RAISE" 1>&6
        if test "$ac_cv_have__RAISE" = "yes"; then
            WRAP_STL_INCLUDES=1
            MOZ_MSVC_STL_WRAP_RAISE=1
            cat >> confdefs.pytmp <<\EOF
    (''' MOZ_MSVC_STL_WRAP_RAISE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_MSVC_STL_WRAP_RAISE 1
EOF

        else
            { echo "configure: error: Gecko exception wrapping doesn't understand your your MSVC/SDK.  Please file a bug describing this error and your build configuration." 1>&2; echo "configure: error: Gecko exception wrapping doesn't understand your your MSVC/SDK.  Please file a bug describing this error and your build configuration." 1>&5; exit 1; }
        fi

        if test "$WRAP_STL_INCLUDES" = "1"; then
            STL_FLAGS="-I${DIST}/stl_wrappers"
        fi
        CFLAGS="$CFLAGS -D_HAS_EXCEPTIONS=0"
        CXXFLAGS="$CXXFLAGS -D_HAS_EXCEPTIONS=0"
    else
        # Check w32api version
        _W32API_MAJOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $1 }'`
        _W32API_MINOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $2 }'`
        echo $ac_n "checking for w32api version >= $W32API_VERSION""... $ac_c" 1>&6
echo "configure:4145: checking for w32api version >= $W32API_VERSION" >&5
        cat > conftest.$ac_ext <<EOF
#line 4147 "configure"
#include "confdefs.h"
#include <w32api.h>
int main() {
#if (__W32API_MAJOR_VERSION < $_W32API_MAJOR_VERSION) || \
                (__W32API_MAJOR_VERSION == $_W32API_MAJOR_VERSION && \
                 __W32API_MINOR_VERSION < $_W32API_MINOR_VERSION)
                #error "test failed."
            #endif
            
; return 0; }
EOF
if { (eval echo configure:4159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
   res=yes 
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
   res=no 
fi
rm -f conftest*
        echo "$ac_t""$res" 1>&6
        if test "$res" != "yes"; then
            { echo "configure: error: w32api version $W32API_VERSION or higher required." 1>&2; echo "configure: error: w32api version $W32API_VERSION or higher required." 1>&5; exit 1; }
        fi
        # Check windres version
        echo $ac_n "checking for windres version >= $WINDRES_VERSION""... $ac_c" 1>&6
echo "configure:4175: checking for windres version >= $WINDRES_VERSION" >&5
        _WINDRES_VERSION=`${WINDRES} --version 2>&1 | grep -i windres 2>/dev/null | $AWK '{ print $3 }'`
        echo "$ac_t""$_WINDRES_VERSION" 1>&6
        _WINDRES_MAJOR_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $1 }'`
        _WINDRES_MINOR_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $2 }'`
        _WINDRES_RELEASE_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $3 }'`
        WINDRES_MAJOR_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $1 }'`
        WINDRES_MINOR_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $2 }'`
        WINDRES_RELEASE_VERSION=`echo $WINDRES_VERSION | $AWK -F\. '{ print $3 }'`
        if test "$_WINDRES_MAJOR_VERSION" -lt "$WINDRES_MAJOR_VERSION" -o \
                "$_WINDRES_MAJOR_VERSION" -eq "$WINDRES_MAJOR_VERSION" -a \
                "$_WINDRES_MINOR_VERSION" -lt "$WINDRES_MINOR_VERSION" -o \
                "$_WINDRES_MAJOR_VERSION" -eq "$WINDRES_MAJOR_VERSION" -a \
                "$_WINDRES_MINOR_VERSION" -eq "$WINDRES_MINOR_VERSION" -a \
                "$_WINDRES_RELEASE_VERSION" -lt "$WINDRES_RELEASE_VERSION"
        then
            { echo "configure: error: windres version $WINDRES_VERSION or higher is required to build." 1>&2; echo "configure: error: windres version $WINDRES_VERSION or higher is required to build." 1>&5; exit 1; }
        fi

        for ac_prog in $target-widl widl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4199: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MIDL'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$MIDL"; then
  ac_cv_prog_MIDL="$MIDL" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_MIDL="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
MIDL="$ac_cv_prog_MIDL"
if test -n "$MIDL"; then
  echo "$ac_t""$MIDL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$MIDL" && break
done

        if test -n "$MIDL"; then
            case "$target" in
            i*86-*)
                MIDL_FLAGS="$MIDL_FLAGS --win32 -m32"
                ;;
            x86_64-*)
                MIDL_FLAGS="$MIDL_FLAGS --win64 -m64"
                ;;
            esac
        fi

        # strsafe.h on mingw uses macros for function deprecation that pollutes namespace
        # causing problems with local implementations with the same name.
        cat >> confdefs.pytmp <<\EOF
    (''' STRSAFE_NO_DEPRECATE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define STRSAFE_NO_DEPRECATE 1
EOF

    fi # !GNU_CC

    
  echo $ac_n "checking for highest Windows version supported by this SDK""... $ac_c" 1>&6
echo "configure:4252: checking for highest Windows version supported by this SDK" >&5
if eval "test \"`echo '$''{'ac_cv_winsdk_maxver'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.h <<EOF
#include <winsdkver.h>

WINVER_MAXVER
EOF
                      ac_cv_winsdk_maxver=`$CPP conftest.h 2>/dev/null | tail -n1`
                      rm -f conftest.h
                     
fi

echo "$ac_t""$ac_cv_winsdk_maxver" 1>&6
                  MOZ_WINSDK_MAXVER=${ac_cv_winsdk_maxver}0000

    cat >> confdefs.pytmp <<EOF
    (''' WINVER ''', r''' 0x$WINVER ''')
EOF
cat >> confdefs.h <<EOF
#define WINVER 0x$WINVER
EOF

    cat >> confdefs.pytmp <<EOF
    (''' _WIN32_WINNT ''', r''' 0x$WINVER ''')
EOF
cat >> confdefs.h <<EOF
#define _WIN32_WINNT 0x$WINVER
EOF

    # Require OS features provided by IE 6.0 SP2 (XP SP2)
    cat >> confdefs.pytmp <<EOF
    (''' _WIN32_IE ''', r''' 0x0603 ''')
EOF
cat >> confdefs.h <<EOF
#define _WIN32_IE 0x0603
EOF


    # If the maximum version supported by this SDK is lower than the target
    # version, error out
    echo $ac_n "checking for Windows SDK being recent enough""... $ac_c" 1>&6
echo "configure:4295: checking for Windows SDK being recent enough" >&5
    if $PERL -e "exit(0x$MOZ_WINSDK_TARGETVER > $MOZ_WINSDK_MAXVER)"; then
        echo "$ac_t"""yes"" 1>&6
    else
        echo "$ac_t"""no"" 1>&6
        { echo "configure: error: You are targeting Windows version 0x$MOZ_WINSDK_TARGETVER, but your SDK only supports up to version $MOZ_WINSDK_MAXVER. Install and use an updated SDK, or target a lower version using --with-windows-version. Alternatively, try running the Windows SDK Configuration Tool and selecting a newer SDK. See https://developer.mozilla.org/En/Windows_SDK_versions for more details on fixing this." 1>&2; echo "configure: error: You are targeting Windows version 0x$MOZ_WINSDK_TARGETVER, but your SDK only supports up to version $MOZ_WINSDK_MAXVER. Install and use an updated SDK, or target a lower version using --with-windows-version. Alternatively, try running the Windows SDK Configuration Tool and selecting a newer SDK. See https://developer.mozilla.org/En/Windows_SDK_versions for more details on fixing this." 1>&5; exit 1; }
    fi

    cat >> confdefs.pytmp <<EOF
    (''' MOZ_WINSDK_TARGETVER ''', r''' 0x$MOZ_WINSDK_TARGETVER ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_WINSDK_TARGETVER 0x$MOZ_WINSDK_TARGETVER
EOF

    cat >> confdefs.pytmp <<EOF
    (''' MOZ_WINSDK_MAXVER ''', r''' $MOZ_WINSDK_MAXVER ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_WINSDK_MAXVER $MOZ_WINSDK_MAXVER
EOF

    
    ;;
esac

if test -n "$_WIN32_MSVC"; then
    SKIP_PATH_CHECKS=1
    SKIP_COMPILER_CHECKS=1
    SKIP_LIBRARY_CHECKS=1

    # Since we're skipping compiler and library checks, hard-code
    # some facts here.
    cat >> confdefs.pytmp <<\EOF
    (''' HAVE_IO_H ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_IO_H 1
EOF

    cat >> confdefs.pytmp <<\EOF
    (''' HAVE_ISATTY ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_ISATTY 1
EOF

fi

fi # COMPILE_ENVIRONMENT













if test -z "$COMPILE_ENVIRONMENT"; then
    NSINSTALL_BIN='$(PYTHON) $(MOZILLA_DIR)/config/nsinstall.py'
fi


if test "$COMPILE_ENVIRONMENT"; then




# Check whether --with-unify-dist or --without-unify-dist was given.
if test "${with_unify_dist+set}" = set; then
  withval="$with_unify_dist"
  UNIFY_DIST=$withval
fi

if test -n "$UNIVERSAL_BINARY"; then
    if test -z "$UNIFY_DIST"; then
        { echo "configure: error: You need to provide the --with-unify-dist=dir argument when performing a universal build" 1>&2; echo "configure: error: You need to provide the --with-unify-dist=dir argument when performing a universal build" 1>&5; exit 1; }
    fi
    case "$UNIFY_DIST" in
    /*)
        ;;
    *)
        UNIFY_DIST="${MOZ_BUILD_ROOT}/${UNIFY_DIST}"
        ;;
    esac
fi


MACOS_SDK_DIR=
# Check whether --with-macos-sdk or --without-macos-sdk was given.
if test "${with_macos_sdk+set}" = set; then
  withval="$with_macos_sdk"
  MACOS_SDK_DIR=$withval
fi


MACOS_PRIVATE_FRAMEWORKS_DIR_DEFAULTED=
# Check whether --with-macos-private-frameworks or --without-macos-private-frameworks was given.
if test "${with_macos_private_frameworks+set}" = set; then
  withval="$with_macos_private_frameworks"
  MACOS_PRIVATE_FRAMEWORKS_DIR=$withval
else
  MACOS_PRIVATE_FRAMEWORKS_DIR=/System/Library/PrivateFrameworks
    MACOS_PRIVATE_FRAMEWORKS_DEFAULTED=1
fi


if test -z "${MACOS_PRIVATE_FRAMEWORKS_DEFAULTED}"; then
  if test -z "$CROSS_COMPILE"; then
    echo "configure: warning: You should only be using --with-macos-private-frameworks when cross-compiling." 1>&2
  fi
  if test ! -d "$MACOS_PRIVATE_FRAMEWORKS_DIR"; then
    { echo "configure: error: PrivateFrameworks directory not found." 1>&2; echo "configure: error: PrivateFrameworks directory not found." 1>&5; exit 1; }
  fi
fi




if test "$MACOS_SDK_DIR"; then
      
  if test ! -d "$MACOS_SDK_DIR"; then
    { echo "configure: error: SDK not found.  When using --with-macos-sdk, you must
specify a valid SDK.  SDKs are installed when the optional cross-development
tools are selected during the Xcode/Developer Tools installation." 1>&2; echo "configure: error: SDK not found.  When using --with-macos-sdk, you must
specify a valid SDK.  SDKs are installed when the optional cross-development
tools are selected during the Xcode/Developer Tools installation." 1>&5; exit 1; }
  fi

  CFLAGS="$CFLAGS -isysroot ${MACOS_SDK_DIR}"
  CXXFLAGS="$CXXFLAGS -isysroot ${MACOS_SDK_DIR}"

    CPP="$CPP -isysroot ${MACOS_SDK_DIR}"
  CXXCPP="$CXXCPP -isysroot ${MACOS_SDK_DIR}"

  
  echo $ac_n "checking for valid compiler/Mac OS X SDK combination""... $ac_c" 1>&6
echo "configure:4437: checking for valid compiler/Mac OS X SDK combination" >&5
  ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

  cat > conftest.$ac_ext <<EOF
#line 4446 "configure"
#include "confdefs.h"
#include <new>
int main() {

; return 0; }
EOF
if { (eval echo configure:4453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  result=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  result=no
fi
rm -f conftest*
  ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

  echo "$ac_t""$result" 1>&6

  if test "$result" = "no" ; then
    { echo "configure: error: The selected compiler and Mac OS X SDK are incompatible." 1>&2; echo "configure: error: The selected compiler and Mac OS X SDK are incompatible." 1>&5; exit 1; }
  fi
fi

fi # COMPILE_ENVIRONMENT

if test -n "$MAKE"; then
  if test `echo $MAKE | grep -c make.py` != 1; then
     NOT_PYMAKE=$MAKE
  fi
fi

case "$host_os" in
mingw*)
      for ac_prog in $GMAKE $NOT_PYMAKE make gmake
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4492: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMAKE'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GMAKE" in
  /*)
  ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_GMAKE="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
GMAKE="$ac_cv_path_GMAKE"
if test -n "$GMAKE"; then
  echo "$ac_t""$GMAKE" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$GMAKE" && break
done
test -n "$GMAKE" || GMAKE=":"

  if test "$msyshost"; then
    case "$GMAKE" in
    /*)
      tmp_DIRNAME=`dirname "$GMAKE"`
      tmp_BASENAME=`basename "$GMAKE"`
      tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
      GMAKE="$tmp_PWD/$tmp_BASENAME"
      if test -e "$GMAKE.exe"; then
        GMAKE="$GMAKE.exe"
      fi
    esac
  fi

    ;;
*)
      for ac_prog in $GMAKE $NOT_PYMAKE gmake make
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4548: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMAKE'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GMAKE" in
  /*)
  ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_GMAKE="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
GMAKE="$ac_cv_path_GMAKE"
if test -n "$GMAKE"; then
  echo "$ac_t""$GMAKE" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$GMAKE" && break
done
test -n "$GMAKE" || GMAKE=":"

  if test "$msyshost"; then
    case "$GMAKE" in
    /*)
      tmp_DIRNAME=`dirname "$GMAKE"`
      tmp_BASENAME=`basename "$GMAKE"`
      tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
      GMAKE="$tmp_PWD/$tmp_BASENAME"
      if test -e "$GMAKE.exe"; then
        GMAKE="$GMAKE.exe"
      fi
    esac
  fi

    ;;
esac
if test "$GMAKE" = ":"; then
   { echo "configure: error: GNU make not found" 1>&2; echo "configure: error: GNU make not found" 1>&5; exit 1; }
fi


if test -z "$MAKE"; then
  MAKE=$GMAKE
fi

if test "$COMPILE_ENVIRONMENT"; then

# If we find X, set shell vars x_includes and x_libraries to the
# paths, otherwise set no_x=yes.
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
echo "configure:4615: checking for X" >&5

# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
  withval="$with_x"
  :
fi

# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
if test "x$with_x" = xno; then
  # The user explicitly disabled X.
  have_x=disabled
else
  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
    # Both variables are already set.
    have_x=yes
  else
if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # One or both of the vars are not set, and there is no cached value.
ac_x_includes=NO ac_x_libraries=NO
rm -fr conftestdir
if mkdir conftestdir; then
  cd conftestdir
  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  cat > Imakefile <<'EOF'
acfindx:
	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
EOF
  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
    for ac_extension in a so sl; do
      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
        test -f $ac_im_libdir/libX11.$ac_extension; then
        ac_im_usrlibdir=$ac_im_libdir; break
      fi
    done
    # Screen out bogus values from the imake configuration.  They are
    # bogus both because they are the default anyway, and because
    # using them would break gcc on systems where it needs fixed includes.
    case "$ac_im_incroot" in
	/usr/include) ;;
	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
    esac
    case "$ac_im_usrlibdir" in
	/usr/lib | /lib) ;;
	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
    esac
  fi
  cd ..
  rm -fr conftestdir
fi

if test "$ac_x_includes" = NO; then
  # Guess where to find include files, by looking for this one X11 .h file.
  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h

  # First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
#line 4677 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  # We can compile using X headers with no special include directory.
ac_x_includes=
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  # Look for the header file in a standard set of common directories.
# Check X11 before X11Rn because it is often a symlink to the current release.
  for ac_dir in               \
    /usr/X11/include          \
    /usr/X11R6/include        \
    /usr/X11R5/include        \
    /usr/X11R4/include        \
                              \
    /usr/include/X11          \
    /usr/include/X11R6        \
    /usr/include/X11R5        \
    /usr/include/X11R4        \
                              \
    /usr/local/X11/include    \
    /usr/local/X11R6/include  \
    /usr/local/X11R5/include  \
    /usr/local/X11R4/include  \
                              \
    /usr/local/include/X11    \
    /usr/local/include/X11R6  \
    /usr/local/include/X11R5  \
    /usr/local/include/X11R4  \
                              \
    /usr/X386/include         \
    /usr/x386/include         \
    /usr/XFree86/include/X11  \
                              \
    /usr/include              \
    /usr/local/include        \
    /usr/unsupported/include  \
    /usr/athena/include       \
    /usr/local/x11r5/include  \
    /usr/lpp/Xamples/include  \
                              \
    /usr/openwin/include      \
    /usr/openwin/share/include \
    ; \
  do
    if test -r "$ac_dir/$x_direct_test_include"; then
      ac_x_includes=$ac_dir
      break
    fi
  done
fi
rm -f conftest*
fi # $ac_x_includes = NO

if test "$ac_x_libraries" = NO; then
  # Check for the libraries.

  test -z "$x_direct_test_library" && x_direct_test_library=Xt
  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc

  # See if we find them without any special options.
  # Don't add to $LIBS permanently.
  ac_save_LIBS="$LIBS"
  LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4751 "configure"
#include "confdefs.h"

int main() {
${x_direct_test_function}()
; return 0; }
EOF
if { (eval echo configure:4758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
ac_x_libraries=
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  LIBS="$ac_save_LIBS"
# First see if replacing the include by lib works.
# Check X11 before X11Rn because it is often a symlink to the current release.
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
    /usr/X11/lib          \
    /usr/X11R6/lib        \
    /usr/X11R5/lib        \
    /usr/X11R4/lib        \
                          \
    /usr/lib/X11          \
    /usr/lib/X11R6        \
    /usr/lib/X11R5        \
    /usr/lib/X11R4        \
                          \
    /usr/local/X11/lib    \
    /usr/local/X11R6/lib  \
    /usr/local/X11R5/lib  \
    /usr/local/X11R4/lib  \
                          \
    /usr/local/lib/X11    \
    /usr/local/lib/X11R6  \
    /usr/local/lib/X11R5  \
    /usr/local/lib/X11R4  \
                          \
    /usr/X386/lib         \
    /usr/x386/lib         \
    /usr/XFree86/lib/X11  \
                          \
    /usr/lib              \
    /usr/local/lib        \
    /usr/unsupported/lib  \
    /usr/athena/lib       \
    /usr/local/x11r5/lib  \
    /usr/lpp/Xamples/lib  \
    /lib/usr/lib/X11	  \
                          \
    /usr/openwin/lib      \
    /usr/openwin/share/lib \
    ; \
do
  for ac_extension in a so sl; do
    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
      ac_x_libraries=$ac_dir
      break 2
    fi
  done
done
fi
rm -f conftest*
fi # $ac_x_libraries = NO

if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  # Didn't find X anywhere.  Cache the known absence of X.
  ac_cv_have_x="have_x=no"
else
  # Record where we found X for the cache.
  ac_cv_have_x="have_x=yes \
	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
fi
fi
  fi
  eval "$ac_cv_have_x"
fi # $with_x != no

if test "$have_x" != yes; then
  echo "$ac_t""$have_x" 1>&6
  no_x=yes
else
  # If each of the values was on the command line, it overrides each guess.
  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  # Update the cache value to reflect the command line values.
  ac_cv_have_x="have_x=yes \
		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
fi

if test "$no_x" = yes; then
  # Not all programs may use this symbol, but it does not hurt to define it.
  cat >> confdefs.pytmp <<\EOF
    (''' X_DISPLAY_MISSING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define X_DISPLAY_MISSING 1
EOF

  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
else
  if test -n "$x_includes"; then
    X_CFLAGS="$X_CFLAGS -I$x_includes"
  fi

  # It would also be nice to do this for all -L options, not just this one.
  if test -n "$x_libraries"; then
    X_LIBS="$X_LIBS -L$x_libraries"
    # For Solaris; some versions of Sun CC require a space after -R and
    # others require no space.  Words are not sufficient . . . .
    case "`(uname -sr) 2>/dev/null`" in
    "SunOS 5"*)
      echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
echo "configure:4867: checking whether -R must be followed by a space" >&5
      ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
      cat > conftest.$ac_ext <<EOF
#line 4870 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:4877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_R_nospace=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_R_nospace=no
fi
rm -f conftest*
      if test $ac_R_nospace = yes; then
	echo "$ac_t""no" 1>&6
	X_LIBS="$X_LIBS -R$x_libraries"
      else
	LIBS="$ac_xsave_LIBS -R $x_libraries"
	cat > conftest.$ac_ext <<EOF
#line 4893 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:4900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_R_space=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_R_space=no
fi
rm -f conftest*
	if test $ac_R_space = yes; then
	  echo "$ac_t""yes" 1>&6
	  X_LIBS="$X_LIBS -R $x_libraries"
	else
	  echo "$ac_t""neither works" 1>&6
	fi
      fi
      LIBS="$ac_xsave_LIBS"
    esac
  fi

  # Check for system-dependent libraries X programs must link with.
  # Do this before checking for the system-independent R6 libraries
  # (-lICE), since we may need -lsocket or whatever for X linking.

  if test "$ISC" = yes; then
    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  else
    # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
    # libraries were built with DECnet support.  And karl@cs.umb.edu says
    # the Alpha needs dnet_stub (dnet does not exist).
    echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
echo "configure:4932: checking for dnet_ntoa in -ldnet" >&5
ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ldnet  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4940 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dnet_ntoa();

int main() {
dnet_ntoa()
; return 0; }
EOF
if { (eval echo configure:4951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
else
  echo "$ac_t""no" 1>&6
fi

    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
      echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
echo "configure:4973: checking for dnet_ntoa in -ldnet_stub" >&5
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4981 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dnet_ntoa();

int main() {
dnet_ntoa()
; return 0; }
EOF
if { (eval echo configure:4992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
else
  echo "$ac_t""no" 1>&6
fi

    fi

    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
    # to get the SysV transport functions.
    # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
    # needs -lnsl.
    # The nsl library prevents programs from opening the X display
    # on Irix 5.2, according to dickey@clark.net.
    echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
echo "configure:5021: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5026 "configure"
#define gethostbyname innocuous_gethostbyname
#include "confdefs.h"
#undef gethostbyname
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gethostbyname(); below.  */
#define gethostbyname innocuous_gethostbyname
#include <assert.h>
#undef gethostbyname
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
choke me
#else
gethostbyname();
#endif

; return 0; }
EOF
if { (eval echo configure:5053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_gethostbyname=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_gethostbyname=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

    if test $ac_cv_func_gethostbyname = no; then
      echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
echo "configure:5074: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lnsl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5082 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
gethostbyname()
; return 0; }
EOF
if { (eval echo configure:5093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
else
  echo "$ac_t""no" 1>&6
fi

    fi

    # lieder@skyler.mavd.honeywell.com says without -lsocket,
    # socket/setsockopt and other routines are undefined under SCO ODT
    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
    # on later versions), says simon@lia.di.epfl.ch: it contains
    # gethostby* variants that don't use the nameserver (or something).
    # -lsocket must be given before -lnsl if both are needed.
    # We assume that if connect needs -lnsl, so does gethostbyname.
    echo $ac_n "checking for connect""... $ac_c" 1>&6
echo "configure:5123: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5128 "configure"
#define connect innocuous_connect
#include "confdefs.h"
#undef connect
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char connect(); below.  */
#define connect innocuous_connect
#include <assert.h>
#undef connect
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_connect) || defined (__stub___connect)
choke me
#else
connect();
#endif

; return 0; }
EOF
if { (eval echo configure:5155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_connect=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_connect=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

    if test $ac_cv_func_connect = no; then
      echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
echo "configure:5176: checking for connect in -lsocket" >&5
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5184 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {
connect()
; return 0; }
EOF
if { (eval echo configure:5195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
else
  echo "$ac_t""no" 1>&6
fi

    fi

    # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
    echo $ac_n "checking for remove""... $ac_c" 1>&6
echo "configure:5219: checking for remove" >&5
if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5224 "configure"
#define remove innocuous_remove
#include "confdefs.h"
#undef remove
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char remove(); below.  */
#define remove innocuous_remove
#include <assert.h>
#undef remove
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char remove();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_remove) || defined (__stub___remove)
choke me
#else
remove();
#endif

; return 0; }
EOF
if { (eval echo configure:5251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_remove=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_remove=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

    if test $ac_cv_func_remove = no; then
      echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
echo "configure:5272: checking for remove in -lposix" >&5
ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lposix  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5280 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char remove();

int main() {
remove()
; return 0; }
EOF
if { (eval echo configure:5291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
else
  echo "$ac_t""no" 1>&6
fi

    fi

    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
    echo $ac_n "checking for shmat""... $ac_c" 1>&6
echo "configure:5315: checking for shmat" >&5
if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5320 "configure"
#define shmat innocuous_shmat
#include "confdefs.h"
#undef shmat
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char shmat(); below.  */
#define shmat innocuous_shmat
#include <assert.h>
#undef shmat
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char shmat();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_shmat) || defined (__stub___shmat)
choke me
#else
shmat();
#endif

; return 0; }
EOF
if { (eval echo configure:5347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_shmat=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_shmat=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

    if test $ac_cv_func_shmat = no; then
      echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
echo "configure:5368: checking for shmat in -lipc" >&5
ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lipc  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5376 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char shmat();

int main() {
shmat()
; return 0; }
EOF
if { (eval echo configure:5387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
else
  echo "$ac_t""no" 1>&6
fi

    fi
  fi

  # Check for libraries that X11R6 Xt/Xaw programs need.
  ac_save_LDFLAGS="$LDFLAGS"
  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  # check for ICE first), but we must link in the order -lSM -lICE or
  # we get undefined symbols.  So assume we have SM if we have ICE.
  # These have to be linked with before -lX11, unlike the other
  # libraries we check for below, so use a different variable.
  #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
echo "configure:5420: checking for IceConnectionNumber in -lICE" >&5
ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5428 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char IceConnectionNumber();

int main() {
IceConnectionNumber()
; return 0; }
EOF
if { (eval echo configure:5439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
else
  echo "$ac_t""no" 1>&6
fi

  LDFLAGS="$ac_save_LDFLAGS"

fi


XCFLAGS="$X_CFLAGS"

fi # COMPILE_ENVIRONMENT

AS_BIN=$AS
AR_EXTRACT='$(AR) x'
AS='$(CC)'
AS_DASH_C_FLAG='-c'
DLL_PREFIX=lib
LIB_PREFIX=lib
DLL_SUFFIX=.so
OBJ_SUFFIX=o
LIB_SUFFIX=a
IMPORT_LIB_SUFFIX=
DIRENT_INO=d_ino
MOZ_USER_DIR=".mozilla"

MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin -Wl,-rpath-link,${prefix}/lib"

MOZ_FS_LAYOUT=unix

if test "$COMPILE_ENVIRONMENT"; then
    


MOZ_THUMB=toolchain-default
MOZ_THUMB_INTERWORK=toolchain-default
MOZ_FPU=toolchain-default
MOZ_FLOAT_ABI=toolchain-default
MOZ_SOFT_FLOAT=toolchain-default
MOZ_ALIGN=toolchain-default

# Check whether --with-arch or --without-arch was given.
if test "${with_arch+set}" = set; then
  withval="$with_arch"
  if test -z "$GNU_CC"; then
        { echo "configure: error: --with-arch is not supported on non-GNU toolchains" 1>&2; echo "configure: error: --with-arch is not supported on non-GNU toolchains" 1>&5; exit 1; }
    fi
    MOZ_ARCH=$withval
fi


if test -z "$MOZ_ARCH"; then
        case "${CPU_ARCH}-${OS_TARGET}" in
    arm-Android)
        MOZ_THUMB=yes
        MOZ_ARCH=armv7-a
        MOZ_FPU=vfp
        MOZ_FLOAT_ABI=softfp
        MOZ_ALIGN=no
        ;;
    arm-Darwin)
        MOZ_ARCH=toolchain-default
        ;;
    esac
fi

if test "$MOZ_ARCH" = "armv6" -a "$OS_TARGET" = "Android"; then
   MOZ_FPU=vfp
   MOZ_FLOAT_ABI=softfp
fi

# Check whether --with-thumb or --without-thumb was given.
if test "${with_thumb+set}" = set; then
  withval="$with_thumb"
  if test -z "$GNU_CC"; then
        { echo "configure: error: --with-thumb is not supported on non-GNU toolchains" 1>&2; echo "configure: error: --with-thumb is not supported on non-GNU toolchains" 1>&5; exit 1; }
    fi
    MOZ_THUMB=$withval
fi


# Check whether --with-thumb-interwork or --without-thumb-interwork was given.
if test "${with_thumb_interwork+set}" = set; then
  withval="$with_thumb_interwork"
  if test -z "$GNU_CC"; then
        { echo "configure: error: --with-thumb-interwork is not supported on non-GNU toolchains" 1>&2; echo "configure: error: --with-thumb-interwork is not supported on non-GNU toolchains" 1>&5; exit 1; }
    fi
    MOZ_THUMB_INTERWORK=$withval
fi


# Check whether --with-fpu or --without-fpu was given.
if test "${with_fpu+set}" = set; then
  withval="$with_fpu"
  if test -z "$GNU_CC"; then
        { echo "configure: error: --with-fpu is not supported on non-GNU toolchains" 1>&2; echo "configure: error: --with-fpu is not supported on non-GNU toolchains" 1>&5; exit 1; }
    fi
    MOZ_FPU=$withval
fi


# Check whether --with-float-abi or --without-float-abi was given.
if test "${with_float_abi+set}" = set; then
  withval="$with_float_abi"
  if test -z "$GNU_CC"; then
        { echo "configure: error: --with-float-abi is not supported on non-GNU toolchains" 1>&2; echo "configure: error: --with-float-abi is not supported on non-GNU toolchains" 1>&5; exit 1; }
    fi
    MOZ_FLOAT_ABI=$withval
fi


# Check whether --with-soft-float or --without-soft-float was given.
if test "${with_soft_float+set}" = set; then
  withval="$with_soft_float"
  if test -z "$GNU_CC"; then
        { echo "configure: error: --with-soft-float is not supported on non-GNU toolchains" 1>&2; echo "configure: error: --with-soft-float is not supported on non-GNU toolchains" 1>&5; exit 1; }
    fi
    MOZ_SOFT_FLOAT=$withval
fi


case "$MOZ_ARCH" in
toolchain-default|"")
    arch_flag=""
    ;;
*)
    arch_flag="-march=$MOZ_ARCH"
    ;;
esac

case "$MOZ_THUMB" in
yes)
    MOZ_THUMB2=1
    thumb_flag="-mthumb"
    ;;
no)
    MOZ_THUMB2=
    thumb_flag="-marm"
    ;;
*)
    _SAVE_CFLAGS="$CFLAGS"
    CFLAGS="$arch_flag"
    cat > conftest.$ac_ext <<EOF
#line 5598 "configure"
#include "confdefs.h"

int main() {
return sizeof(__thumb2__);
; return 0; }
EOF
if { (eval echo configure:5605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  MOZ_THUMB2=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  MOZ_THUMB2=
fi
rm -f conftest*
    CFLAGS="$_SAVE_CFLAGS"
    thumb_flag=""
    ;;
esac

if test "$MOZ_THUMB2" = 1; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_THUMB2 ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_THUMB2 1
EOF

fi

case "$MOZ_THUMB_INTERWORK" in
yes)
    thumb_interwork_flag="-mthumb-interwork"
    ;;
no)
    thumb_interwork_flag="-mno-thumb-interwork"
    ;;
*) # toolchain-default
    thumb_interwork_flag=""
    ;;
esac

case "$MOZ_FPU" in
toolchain-default|"")
    fpu_flag=""
    ;;
*)
    fpu_flag="-mfpu=$MOZ_FPU"
    ;;
esac

case "$MOZ_FLOAT_ABI" in
toolchain-default|"")
    float_abi_flag=""
    ;;
*)
    float_abi_flag="-mfloat-abi=$MOZ_FLOAT_ABI"
    ;;
esac

case "$MOZ_SOFT_FLOAT" in
yes)
    soft_float_flag="-msoft-float"
    ;;
no)
    soft_float_flag="-mno-soft-float"
    ;;
*) # toolchain-default
    soft_float_flag=""
    ;;
esac

case "$MOZ_ALIGN" in
no)
    align_flag="-mno-unaligned-access"
    ;;
yes)
    align_flag="-munaligned-access"
    ;;
*)
    align_flag=""
    ;;
esac

if test -n "$align_flag"; then
  _SAVE_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS $align_flag"
  echo $ac_n "checking whether alignment flag ($align_flag) is supported""... $ac_c" 1>&6
echo "configure:5688: checking whether alignment flag ($align_flag) is supported" >&5
  cat > conftest.$ac_ext <<EOF
#line 5690 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:5697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  align_flag=""
fi
rm -f conftest*
  CFLAGS="$_SAVE_CFLAGS"
fi

all_flags=`echo $arch_flag $thumb_flag $thumb_interwork_flag $fpu_flag $float_abi_flag $soft_float_flag $align_flag`
if test -n "$all_flags"; then
    _SAVE_CFLAGS="$CFLAGS"
    CFLAGS="$all_flags"
    echo $ac_n "checking whether the chosen combination of compiler flags ($all_flags) works""... $ac_c" 1>&6
echo "configure:5714: checking whether the chosen combination of compiler flags ($all_flags) works" >&5
    cat > conftest.$ac_ext <<EOF
#line 5716 "configure"
#include "confdefs.h"

int main() {
return 0;
; return 0; }
EOF
if { (eval echo configure:5723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  { echo "configure: error: no" 1>&2; echo "configure: error: no" 1>&5; exit 1; }
fi
rm -f conftest*

    CFLAGS="$_SAVE_CFLAGS $all_flags"
    CXXFLAGS="$CXXFLAGS $all_flags"
    ASFLAGS="$ASFLAGS $all_flags"
    if test -n "$thumb_flag"; then
        LDFLAGS="$LDFLAGS $thumb_flag"
    fi
fi



if test "$CPU_ARCH" = "arm"; then
  echo $ac_n "checking for ARM SIMD support in compiler""... $ac_c" 1>&6
echo "configure:5746: checking for ARM SIMD support in compiler" >&5
  # We try to link so that this also fails when
  # building with LTO.
  cat > conftest.$ac_ext <<EOF
#line 5750 "configure"
#include "confdefs.h"

int main() {
asm("uqadd8 r1, r1, r2");
; return 0; }
EOF
if { (eval echo configure:5757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  result="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  result="no"
fi
rm -f conftest*
  echo "$ac_t"""$result"" 1>&6
  if test "$result" = "yes"; then
      cat >> confdefs.pytmp <<\EOF
    (''' HAVE_ARM_SIMD ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_ARM_SIMD 1
EOF

      HAVE_ARM_SIMD=1
  fi

  echo $ac_n "checking ARM version support in compiler""... $ac_c" 1>&6
echo "configure:5780: checking ARM version support in compiler" >&5
    ARM_ARCH=`${CC-cc} ${CFLAGS} -dM -E - < /dev/null | sed -n 's/.*__ARM_ARCH_\([0-9][0-9]*\).*/\1/p'`
  echo "$ac_t"""$ARM_ARCH"" 1>&6

  echo $ac_n "checking for ARM NEON support in compiler""... $ac_c" 1>&6
echo "configure:5785: checking for ARM NEON support in compiler" >&5
  # We try to link so that this also fails when
  # building with LTO.
  cat > conftest.$ac_ext <<EOF
#line 5789 "configure"
#include "confdefs.h"

int main() {
asm(".fpu neon\n vadd.i8 d0, d0, d0");
; return 0; }
EOF
if { (eval echo configure:5796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  result="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  result="no"
fi
rm -f conftest*
  echo "$ac_t"""$result"" 1>&6
  if test "$result" = "yes"; then
      cat >> confdefs.pytmp <<\EOF
    (''' HAVE_ARM_NEON ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_ARM_NEON 1
EOF

      HAVE_ARM_NEON=1

                  if test -n "$ARM_ARCH"; then
          if test "$ARM_ARCH" -lt 7; then
              BUILD_ARM_NEON=
          else
              cat >> confdefs.pytmp <<\EOF
    (''' BUILD_ARM_NEON ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define BUILD_ARM_NEON 1
EOF

              BUILD_ARM_NEON=1
          fi
      fi
  fi

fi # CPU_ARCH = arm







else
    if test "$OS_TARGET" = Android -a x"$MOZ_WIDGET_TOOLKIT" != x"gonk"; then
                MOZ_ARCH=armv7-a
    fi
fi # COMPILE_ENVIRONMENT

if test "$COMPILE_ENVIRONMENT"; then
configure_static_assert_macros='
#define CONFIGURE_STATIC_ASSERT(condition) CONFIGURE_STATIC_ASSERT_IMPL(condition, __LINE__)
#define CONFIGURE_STATIC_ASSERT_IMPL(condition, line) CONFIGURE_STATIC_ASSERT_IMPL2(condition, line)
#define CONFIGURE_STATIC_ASSERT_IMPL2(condition, line) typedef int static_assert_line_##line[(condition) ? 1 : -1]
'

echo $ac_n "checking that static assertion macros used in autoconf tests work""... $ac_c" 1>&6
echo "configure:5855: checking that static assertion macros used in autoconf tests work" >&5
if eval "test \"`echo '$''{'ac_cv_static_assertion_macros_work'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
  ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

  ac_cv_static_assertion_macros_work="yes"
  cat > conftest.$ac_ext <<EOF
#line 5869 "configure"
#include "confdefs.h"
$configure_static_assert_macros
int main() {
CONFIGURE_STATIC_ASSERT(1)
; return 0; }
EOF
if { (eval echo configure:5876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_static_assertion_macros_work="no"
fi
rm -f conftest*
  cat > conftest.$ac_ext <<EOF
#line 5886 "configure"
#include "confdefs.h"
$configure_static_assert_macros
int main() {
CONFIGURE_STATIC_ASSERT(0)
; return 0; }
EOF
if { (eval echo configure:5893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_static_assertion_macros_work="no"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
  ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

  cat > conftest.$ac_ext <<EOF
#line 5909 "configure"
#include "confdefs.h"
$configure_static_assert_macros
int main() {
CONFIGURE_STATIC_ASSERT(1)
; return 0; }
EOF
if { (eval echo configure:5916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_static_assertion_macros_work="no"
fi
rm -f conftest*
  cat > conftest.$ac_ext <<EOF
#line 5926 "configure"
#include "confdefs.h"
$configure_static_assert_macros
int main() {
CONFIGURE_STATIC_ASSERT(0)
; return 0; }
EOF
if { (eval echo configure:5933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_static_assertion_macros_work="no"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
  ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

 
fi

echo "$ac_t"""$ac_cv_static_assertion_macros_work"" 1>&6
if test "$ac_cv_static_assertion_macros_work" = "no"; then
    { echo "configure: error: Compiler cannot compile macros used in autoconf tests." 1>&2; echo "configure: error: Compiler cannot compile macros used in autoconf tests." 1>&5; exit 1; }
fi
fi # COMPILE_ENVIRONMENT




if test "$OS_TARGET" = "Android" -a -z "$gonkdir"; then
    case "${CPU_ARCH}-${MOZ_ARCH}" in
    arm-armv7*)
        ANDROID_CPU_ARCH=armeabi-v7a
        ;;
    arm-*)
        ANDROID_CPU_ARCH=armeabi
        ;;
    x86-*)
        ANDROID_CPU_ARCH=x86
        ;;
    mips32-*) # When target_cpu is mipsel, CPU_ARCH is mips32
        ANDROID_CPU_ARCH=mips
        ;;
    esac

    
fi

if test "$COMPILE_ENVIRONMENT"; then
    

if test "$OS_TARGET" = "Android" -a -z "$gonkdir"; then
    cpu_arch_dir="$ANDROID_CPU_ARCH"
    if test "$MOZ_THUMB2" = 1; then
        cpu_arch_dir="$cpu_arch_dir/thumb"
    fi

    if test -z "$STLPORT_CPPFLAGS$STLPORT_LIBS"; then
        case "$android_cxx_stl" in
        libstdc++)
            # android-ndk-r8b and later
            ndk_base="$android_ndk/sources/cxx-stl/gnu-libstdc++/$android_gnu_compiler_version"
            ndk_libs_include="$ndk_base/libs/$ANDROID_CPU_ARCH"
            ndk_libs="$ndk_base/libs/$cpu_arch_dir"
            ndk_include="$ndk_base/include"

            if ! test -e "$ndk_libs/libgnustl_static.a"; then
                { echo "configure: error: Couldn't find path to gnu-libstdc++ in the android ndk" 1>&2; echo "configure: error: Couldn't find path to gnu-libstdc++ in the android ndk" 1>&5; exit 1; }
            fi

            STLPORT_LIBS="-L$ndk_libs -lgnustl_static"
            STLPORT_CPPFLAGS="-I$ndk_include -I$ndk_include/backward -I$ndk_libs_include/include"
            ;;
        libc++)
            # android-ndk-r8b and later
            ndk_base="$android_ndk/sources/cxx-stl"
            cxx_base="$ndk_base/llvm-libc++"
            cxx_libs="$cxx_base/libs/$cpu_arch_dir"
            cxx_include="$cxx_base/libcxx/include"
            cxxabi_base="$ndk_base/llvm-libc++abi"
            cxxabi_include="$cxxabi_base/libcxxabi/include"

            if ! test -e "$cxx_libs/libc++_static.a"; then
                { echo "configure: error: Couldn't find path to llvm-libc++ in the android ndk" 1>&2; echo "configure: error: Couldn't find path to llvm-libc++ in the android ndk" 1>&5; exit 1; }
            fi

            STLPORT_LIBS="-L$cxx_libs -lc++_static"
            # Add android/support/include/ for prototyping long double math
            # functions, locale-specific C library functions, multibyte support,
            # etc.
            STLPORT_CPPFLAGS="-I$android_ndk/sources/android/support/include -I$cxx_include -I$cxxabi_include"
            ;;
        mozstlport)
            # We don't need to set STLPORT_LIBS, because the build system will
            # take care of linking in our home-built stlport where it is needed.
            STLPORT_CPPFLAGS="-isystem $_topsrcdir/build/stlport/stlport -isystem $_topsrcdir/build/stlport/overrides -isystem $android_ndk/sources/cxx-stl/system/include"
            ;;
        *)
            { echo "configure: error: Bad value for --enable-android-cxx-stl" 1>&2; echo "configure: error: Bad value for --enable-android-cxx-stl" 1>&5; exit 1; }
            ;;
        esac
    fi
    CXXFLAGS="$CXXFLAGS $STLPORT_CPPFLAGS"
fi
MOZ_ANDROID_CXX_STL=$android_cxx_stl




fi # COMPILE_ENVIRONMENT

if test -n "${CLANG_CC}${CLANG_CL}"; then
    _WARNINGS_CFLAGS="-Qunused-arguments ${_WARNINGS_CFLAGS}"
    CPPFLAGS="-Qunused-arguments ${CPPFLAGS}"
fi
if test -n "${CLANG_CXX}${CLANG_CL}"; then
    _WARNINGS_CXXFLAGS="-Qunused-arguments ${_WARNINGS_CXXFLAGS}"
fi

# Check whether --enable-address-sanitizer or --disable-address-sanitizer was given.
if test "${enable_address_sanitizer+set}" = set; then
  enableval="$enable_address_sanitizer"
  if test "$enableval" = "yes"; then
    MOZ_ASAN=1
  elif test "$enableval" = "no"; then
    MOZ_ASAN= 
  else
    { echo "configure: error: Option, address-sanitizer, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, address-sanitizer, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test -n "$MOZ_ASAN"; then
    MOZ_LLVM_HACKS=1
    if test -n "$CLANG_CL"; then
        # Look for clang_rt.asan_dynamic-i386.dll
        MOZ_CLANG_RT_ASAN_LIB=clang_rt.asan_dynamic-i386.dll
        # We use MOZ_PATH_PROG in order to get a Windows style path.
         # Extract the first word of "$MOZ_CLANG_RT_ASAN_LIB", so it can be a program name with args.
set dummy $MOZ_CLANG_RT_ASAN_LIB; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:6071: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$MOZ_CLANG_RT_ASAN_LIB_PATH" in
  /*)
  ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH="$MOZ_CLANG_RT_ASAN_LIB_PATH" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH="$MOZ_CLANG_RT_ASAN_LIB_PATH" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
MOZ_CLANG_RT_ASAN_LIB_PATH="$ac_cv_path_MOZ_CLANG_RT_ASAN_LIB_PATH"
if test -n "$MOZ_CLANG_RT_ASAN_LIB_PATH"; then
  echo "$ac_t""$MOZ_CLANG_RT_ASAN_LIB_PATH" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test "$msyshost"; then
    case "$MOZ_CLANG_RT_ASAN_LIB_PATH" in
    /*)
      tmp_DIRNAME=`dirname "$MOZ_CLANG_RT_ASAN_LIB_PATH"`
      tmp_BASENAME=`basename "$MOZ_CLANG_RT_ASAN_LIB_PATH"`
      tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
      MOZ_CLANG_RT_ASAN_LIB_PATH="$tmp_PWD/$tmp_BASENAME"
      if test -e "$MOZ_CLANG_RT_ASAN_LIB_PATH.exe"; then
        MOZ_CLANG_RT_ASAN_LIB_PATH="$MOZ_CLANG_RT_ASAN_LIB_PATH.exe"
      fi
    esac
  fi

        if test -z "$MOZ_CLANG_RT_ASAN_LIB_PATH"; then
            { echo "configure: error: Couldn't find $MOZ_CLANG_RT_ASAN_LIB.  It should be available in the same location as clang-cl." 1>&2; echo "configure: error: Couldn't find $MOZ_CLANG_RT_ASAN_LIB.  It should be available in the same location as clang-cl." 1>&5; exit 1; }
        fi
        
    fi
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_ASAN ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ASAN 1
EOF

     # Extract the first word of "llvm-symbolizer", so it can be a program name with args.
set dummy llvm-symbolizer; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:6131: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$LLVM_SYMBOLIZER" in
  /*)
  ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_LLVM_SYMBOLIZER="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER"
if test -n "$LLVM_SYMBOLIZER"; then
  echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test "$msyshost"; then
    case "$LLVM_SYMBOLIZER" in
    /*)
      tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"`
      tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"`
      tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
      LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME"
      if test -e "$LLVM_SYMBOLIZER.exe"; then
        LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe"
      fi
    esac
  fi

fi


# Check whether --enable-memory-sanitizer or --disable-memory-sanitizer was given.
if test "${enable_memory_sanitizer+set}" = set; then
  enableval="$enable_memory_sanitizer"
  if test "$enableval" = "yes"; then
    MOZ_MSAN=1
  elif test "$enableval" = "no"; then
    MOZ_MSAN= 
  else
    { echo "configure: error: Option, memory-sanitizer, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, memory-sanitizer, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test -n "$MOZ_MSAN"; then
    MOZ_LLVM_HACKS=1
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_MSAN ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_MSAN 1
EOF

     # Extract the first word of "llvm-symbolizer", so it can be a program name with args.
set dummy llvm-symbolizer; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:6203: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$LLVM_SYMBOLIZER" in
  /*)
  ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_LLVM_SYMBOLIZER="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER"
if test -n "$LLVM_SYMBOLIZER"; then
  echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test "$msyshost"; then
    case "$LLVM_SYMBOLIZER" in
    /*)
      tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"`
      tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"`
      tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
      LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME"
      if test -e "$LLVM_SYMBOLIZER.exe"; then
        LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe"
      fi
    esac
  fi

fi


# Check whether --enable-thread-sanitizer or --disable-thread-sanitizer was given.
if test "${enable_thread_sanitizer+set}" = set; then
  enableval="$enable_thread_sanitizer"
  if test "$enableval" = "yes"; then
    MOZ_TSAN=1
  elif test "$enableval" = "no"; then
    MOZ_TSAN= 
  else
    { echo "configure: error: Option, thread-sanitizer, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, thread-sanitizer, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test -n "$MOZ_TSAN"; then
    MOZ_LLVM_HACKS=1
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_TSAN ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_TSAN 1
EOF

     # Extract the first word of "llvm-symbolizer", so it can be a program name with args.
set dummy llvm-symbolizer; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:6275: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_LLVM_SYMBOLIZER'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$LLVM_SYMBOLIZER" in
  /*)
  ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_LLVM_SYMBOLIZER="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
LLVM_SYMBOLIZER="$ac_cv_path_LLVM_SYMBOLIZER"
if test -n "$LLVM_SYMBOLIZER"; then
  echo "$ac_t""$LLVM_SYMBOLIZER" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test "$msyshost"; then
    case "$LLVM_SYMBOLIZER" in
    /*)
      tmp_DIRNAME=`dirname "$LLVM_SYMBOLIZER"`
      tmp_BASENAME=`basename "$LLVM_SYMBOLIZER"`
      tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
      LLVM_SYMBOLIZER="$tmp_PWD/$tmp_BASENAME"
      if test -e "$LLVM_SYMBOLIZER.exe"; then
        LLVM_SYMBOLIZER="$LLVM_SYMBOLIZER.exe"
      fi
    esac
  fi

fi


# The LLVM symbolizer is used by all sanitizers


# Check whether --enable-llvm-hacks or --disable-llvm-hacks was given.
if test "${enable_llvm_hacks+set}" = set; then
  enableval="$enable_llvm_hacks"
  if test "$enableval" = "yes"; then
    MOZ_LLVM_HACKS=1
  elif test "$enableval" = "no"; then
    MOZ_LLVM_HACKS= 
  else
    { echo "configure: error: Option, llvm-hacks, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, llvm-hacks, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test -n "$MOZ_LLVM_HACKS"; then
    MOZ_NO_WLZDEFS=1
    MOZ_CFLAGS_NSS=1
fi



# Check whether --enable-warnings-as-errors or --disable-warnings-as-errors was given.
if test "${enable_warnings_as_errors+set}" = set; then
  enableval="$enable_warnings_as_errors"
  if test "$enableval" = "yes"; then
    MOZ_ENABLE_WARNINGS_AS_ERRORS=1
  elif test "$enableval" = "no"; then
    MOZ_ENABLE_WARNINGS_AS_ERRORS=
  else
    { echo "configure: error: Option, warnings-as-errors, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, warnings-as-errors, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test "$GNU_CC"; then
    MMX_FLAGS="-mmmx"
    SSE_FLAGS="-msse"
    SSE2_FLAGS="-msse2"
    SSSE3_FLAGS="-mssse3"
    # FIXME: Let us build with strict aliasing. bug 414641.
    CFLAGS="$CFLAGS -fno-strict-aliasing"
    MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$(DSO_SONAME) -o $@'
    MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$(DSO_SONAME) -o $@'
    WARNINGS_AS_ERRORS='-Werror'
    DSO_CFLAGS=''
    DSO_PIC_CFLAGS='-fPIC'
    ASFLAGS="$ASFLAGS -fPIC"
    echo $ac_n "checking for --noexecstack option to as""... $ac_c" 1>&6
echo "configure:6372: checking for --noexecstack option to as" >&5
    _SAVE_CFLAGS=$CFLAGS
    CFLAGS="$CFLAGS -Wa,--noexecstack"
    cat > conftest.$ac_ext <<EOF
#line 6376 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:6383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
                     ASFLAGS="$ASFLAGS -Wa,--noexecstack"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*
    CFLAGS=$_SAVE_CFLAGS
    echo $ac_n "checking for -z noexecstack option to ld""... $ac_c" 1>&6
echo "configure:6396: checking for -z noexecstack option to ld" >&5
    _SAVE_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS -Wl,-z,noexecstack"
    cat > conftest.$ac_ext <<EOF
#line 6400 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:6407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
                  LDFLAGS=$_SAVE_LDFLAGS
fi
rm -f conftest*

    echo $ac_n "checking for -z text option to ld""... $ac_c" 1>&6
echo "configure:6420: checking for -z text option to ld" >&5
    _SAVE_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS -Wl,-z,text"
    cat > conftest.$ac_ext <<EOF
#line 6424 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:6431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
                  NSPR_LDFLAGS="$NSPR_LDFLAGS -Wl,-z,text"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
                  LDFLAGS=$_SAVE_LDFLAGS
fi
rm -f conftest*

    echo $ac_n "checking for --build-id option to ld""... $ac_c" 1>&6
echo "configure:6445: checking for --build-id option to ld" >&5
    _SAVE_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS -Wl,--build-id"
    cat > conftest.$ac_ext <<EOF
#line 6449 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:6456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
                  NSPR_LDFLAGS="$NSPR_LDFLAGS -Wl,--build-id"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
                  LDFLAGS=$_SAVE_LDFLAGS
fi
rm -f conftest*

    echo $ac_n "checking for --ignore-unresolved-symbol option to ld""... $ac_c" 1>&6
echo "configure:6470: checking for --ignore-unresolved-symbol option to ld" >&5
    HAVE_LINKER_SUPPORT_IGNORE_UNRESOLVED=
    _SAVE_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS -Wl,--ignore-unresolved-symbol,environ"
    cat > conftest.$ac_ext <<EOF
#line 6475 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:6482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
                  HAVE_LINKER_SUPPORT_IGNORE_UNRESOLVED=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*
    LDFLAGS=$_SAVE_LDFLAGS

    # Check for -mssse3 on $CC
    echo $ac_n "checking if toolchain supports -mssse3 option""... $ac_c" 1>&6
echo "configure:6497: checking if toolchain supports -mssse3 option" >&5
    HAVE_TOOLCHAIN_SUPPORT_MSSSE3=
    _SAVE_CFLAGS=$CFLAGS
    CFLAGS="$CFLAGS -mssse3"
    cat > conftest.$ac_ext <<EOF
#line 6502 "configure"
#include "confdefs.h"
asm ("pmaddubsw %xmm2,%xmm3");
int main() {

; return 0; }
EOF
if { (eval echo configure:6509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
                     HAVE_TOOLCHAIN_SUPPORT_MSSSE3=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*
    CFLAGS=$_SAVE_CFLAGS

    # Check for -msse4.1 on $CC
    echo $ac_n "checking if toolchain supports -msse4.1 option""... $ac_c" 1>&6
echo "configure:6524: checking if toolchain supports -msse4.1 option" >&5
    HAVE_TOOLCHAIN_SUPPORT_MSSE4_1=
    _SAVE_CFLAGS=$CFLAGS
    CFLAGS="$CFLAGS -msse4.1"
    cat > conftest.$ac_ext <<EOF
#line 6529 "configure"
#include "confdefs.h"
asm ("pmulld %xmm6,%xmm0");
int main() {

; return 0; }
EOF
if { (eval echo configure:6536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
                     HAVE_TOOLCHAIN_SUPPORT_MSSE4_1=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*
    CFLAGS=$_SAVE_CFLAGS

    case "${CPU_ARCH}" in
    x86 | x86_64)
      echo $ac_n "checking for x86 AVX2 asm support in compiler""... $ac_c" 1>&6
echo "configure:6552: checking for x86 AVX2 asm support in compiler" >&5
      cat > conftest.$ac_ext <<EOF
#line 6554 "configure"
#include "confdefs.h"

int main() {
asm volatile ("vpermq      \$0xd8,%ymm0,%ymm0 \n");
; return 0; }
EOF
if { (eval echo configure:6561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  result="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  result="no"
fi
rm -f conftest*
      echo "$ac_t"""$result"" 1>&6
      if test "$result" = "yes"; then
          HAVE_X86_AVX2=1
      fi
    esac

    DSO_LDOPTS='-shared'
    if test "$GCC_USE_GNU_LD"; then
        # Some tools like ASan use a runtime library that is only
        # linked against executables, so we must allow undefined
        # symbols for shared objects in some cases.
        if test -z "$MOZ_NO_WLZDEFS"; then
            # Don't allow undefined symbols in libraries
            DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,defs"

            # BSDs need `environ' exposed for posix_spawn (bug 753046)
            case "$OS_TARGET" in
            DragonFly|FreeBSD|NetBSD|OpenBSD)
                if test -n "$HAVE_LINKER_SUPPORT_IGNORE_UNRESOLVED"; then
                    DSO_LDOPTS="$DSO_LDOPTS -Wl,--ignore-unresolved-symbol,environ"
                else
                    DSO_LDOPTS="$DSO_LDOPTS -Wl,--warn-unresolved-symbols"
                fi
                ;;
            esac
        fi
    fi

    
    # Turn on gcc/clang warnings:
    # https://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/Warning-Options.html

    # -Wall - lots of useful warnings
    # -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives
    # -Wignored-qualifiers - catches return types with qualifiers like const
    # -Wpointer-arith - catches pointer arithmetic using NULL or sizeof(void)
    # -Wsign-compare - catches comparing signed/unsigned ints
    # -Wtype-limits - catches overflow bugs, few false positives
    # -Wunreachable-code - catches some dead code
    _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wall"
    _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wempty-body"
    _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wignored-qualifiers"
    _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wpointer-arith"
    _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wsign-compare"
    _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wtype-limits"
    _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wunreachable-code"

    # -Wclass-varargs - catches objects passed by value to variadic functions.
    # -Wloop-analysis - catches issues around loops
    # -Wnon-literal-null-conversion - catches expressions used as a null pointer constant
    # -Wthread-safety - catches inconsistent use of mutexes
    #
    # XXX: at the time of writing, the version of clang used on the OS X test
    # machines has a bug that causes it to reject some valid files if both
    # -Wnon-literal-null-conversion and -Wsometimes-uninitialized are
    # specified. We work around this by instead using
    # -Werror=non-literal-null-conversion, but we only do that when
    # --enable-warnings-as-errors is specified so that no unexpected fatal
    # warnings are produced.
    
    echo $ac_n "checking whether the C compiler supports -Wclass-varargs""... $ac_c" 1>&6
echo "configure:6632: checking whether the C compiler supports -Wclass-varargs" >&5
if eval "test \"`echo '$''{'ac_c_has_wclass_varargs'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

            _SAVE_CFLAGS="$CFLAGS"
            CFLAGS="$CFLAGS -Werror -Wclass-varargs"
            cat > conftest.$ac_ext <<EOF
#line 6648 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:6655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_c_has_wclass_varargs="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_c_has_wclass_varargs="no"
fi
rm -f conftest*
            CFLAGS="$_SAVE_CFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_c_has_wclass_varargs" 1>&6
    if test "${ac_c_has_wclass_varargs}" = "yes"; then
        _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wclass-varargs"
    fi

    
    echo $ac_n "checking whether the C compiler supports -Wloop-analysis""... $ac_c" 1>&6
echo "configure:6683: checking whether the C compiler supports -Wloop-analysis" >&5
if eval "test \"`echo '$''{'ac_c_has_wloop_analysis'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

            _SAVE_CFLAGS="$CFLAGS"
            CFLAGS="$CFLAGS -Werror -Wloop-analysis"
            cat > conftest.$ac_ext <<EOF
#line 6699 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:6706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_c_has_wloop_analysis="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_c_has_wloop_analysis="no"
fi
rm -f conftest*
            CFLAGS="$_SAVE_CFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_c_has_wloop_analysis" 1>&6
    if test "${ac_c_has_wloop_analysis}" = "yes"; then
        _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wloop-analysis"
    fi


    if test "$MOZ_ENABLE_WARNINGS_AS_ERRORS"; then
        
    echo $ac_n "checking whether the C compiler supports -Werror=non-literal-null-conversion""... $ac_c" 1>&6
echo "configure:6736: checking whether the C compiler supports -Werror=non-literal-null-conversion" >&5
if eval "test \"`echo '$''{'ac_c_has_non_literal_null_conversion'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

            _SAVE_CFLAGS="$CFLAGS"
            CFLAGS="$CFLAGS -Werror -Wnon-literal-null-conversion"
            cat > conftest.$ac_ext <<EOF
#line 6752 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:6759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_c_has_non_literal_null_conversion="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_c_has_non_literal_null_conversion="no"
fi
rm -f conftest*
            CFLAGS="$_SAVE_CFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_c_has_non_literal_null_conversion" 1>&6
    if test "${ac_c_has_non_literal_null_conversion}" = "yes"; then
        _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Werror=non-literal-null-conversion"
    fi

    fi

    
    echo $ac_n "checking whether the C compiler supports -Wthread-safety""... $ac_c" 1>&6
echo "configure:6789: checking whether the C compiler supports -Wthread-safety" >&5
if eval "test \"`echo '$''{'ac_c_has_wthread_safety'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

            _SAVE_CFLAGS="$CFLAGS"
            CFLAGS="$CFLAGS -Werror -Wthread-safety"
            cat > conftest.$ac_ext <<EOF
#line 6805 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:6812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_c_has_wthread_safety="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_c_has_wthread_safety="no"
fi
rm -f conftest*
            CFLAGS="$_SAVE_CFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_c_has_wthread_safety" 1>&6
    if test "${ac_c_has_wthread_safety}" = "yes"; then
        _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wthread-safety"
    fi


    # Turn off some non-useful warnings that -Wall turns on.

    # Prevent the following GCC warnings from being treated as errors:
    # -Wmaybe-uninitialized - too many false positives
    # -Wdeprecated-declarations - we don't want our builds held hostage when a
    #   platform-specific API becomes deprecated.
    # -Wfree-nonheap-object - false positives during PGO
    # -Warray-bounds - false positives depending on optimization
    
    echo $ac_n "checking whether the C compiler supports -Wno-error=maybe-uninitialized""... $ac_c" 1>&6
echo "configure:6849: checking whether the C compiler supports -Wno-error=maybe-uninitialized" >&5
if eval "test \"`echo '$''{'ac_c_has_noerror_maybe_uninitialized'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

            _SAVE_CFLAGS="$CFLAGS"
            CFLAGS="$CFLAGS -Werror -Wno-error=maybe-uninitialized"
            cat > conftest.$ac_ext <<EOF
#line 6865 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:6872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_c_has_noerror_maybe_uninitialized="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_c_has_noerror_maybe_uninitialized="no"
fi
rm -f conftest*
            CFLAGS="$_SAVE_CFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_c_has_noerror_maybe_uninitialized" 1>&6
    if test "${ac_c_has_noerror_maybe_uninitialized}" = "yes"; then
        _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-error=maybe-uninitialized"
    fi

    
    echo $ac_n "checking whether the C compiler supports -Wno-error=deprecated-declarations""... $ac_c" 1>&6
echo "configure:6900: checking whether the C compiler supports -Wno-error=deprecated-declarations" >&5
if eval "test \"`echo '$''{'ac_c_has_noerror_deprecated_declarations'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

            _SAVE_CFLAGS="$CFLAGS"
            CFLAGS="$CFLAGS -Werror -Wno-error=deprecated-declarations"
            cat > conftest.$ac_ext <<EOF
#line 6916 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:6923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_c_has_noerror_deprecated_declarations="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_c_has_noerror_deprecated_declarations="no"
fi
rm -f conftest*
            CFLAGS="$_SAVE_CFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_c_has_noerror_deprecated_declarations" 1>&6
    if test "${ac_c_has_noerror_deprecated_declarations}" = "yes"; then
        _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-error=deprecated-declarations"
    fi

    
    echo $ac_n "checking whether the C compiler supports -Wno-error=array-bounds""... $ac_c" 1>&6
echo "configure:6951: checking whether the C compiler supports -Wno-error=array-bounds" >&5
if eval "test \"`echo '$''{'ac_c_has_noerror_array_bounds'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

            _SAVE_CFLAGS="$CFLAGS"
            CFLAGS="$CFLAGS -Werror -Wno-error=array-bounds"
            cat > conftest.$ac_ext <<EOF
#line 6967 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:6974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_c_has_noerror_array_bounds="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_c_has_noerror_array_bounds="no"
fi
rm -f conftest*
            CFLAGS="$_SAVE_CFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_c_has_noerror_array_bounds" 1>&6
    if test "${ac_c_has_noerror_array_bounds}" = "yes"; then
        _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-error=array-bounds"
    fi


    if test -n "$MOZ_PGO"; then
        
    echo $ac_n "checking whether the C compiler supports -Wno-error=coverage-mismatch""... $ac_c" 1>&6
echo "configure:7004: checking whether the C compiler supports -Wno-error=coverage-mismatch" >&5
if eval "test \"`echo '$''{'ac_c_has_noerror_coverage_mismatch'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

            _SAVE_CFLAGS="$CFLAGS"
            CFLAGS="$CFLAGS -Werror -Wno-error=coverage-mismatch"
            cat > conftest.$ac_ext <<EOF
#line 7020 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:7027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_c_has_noerror_coverage_mismatch="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_c_has_noerror_coverage_mismatch="no"
fi
rm -f conftest*
            CFLAGS="$_SAVE_CFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_c_has_noerror_coverage_mismatch" 1>&6
    if test "${ac_c_has_noerror_coverage_mismatch}" = "yes"; then
        _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-error=coverage-mismatch"
    fi

        
    echo $ac_n "checking whether the C compiler supports -Wno-error=free-nonheap-object""... $ac_c" 1>&6
echo "configure:7055: checking whether the C compiler supports -Wno-error=free-nonheap-object" >&5
if eval "test \"`echo '$''{'ac_c_has_noerror_free_nonheap_object'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

            _SAVE_CFLAGS="$CFLAGS"
            CFLAGS="$CFLAGS -Werror -Wno-error=free-nonheap-object"
            cat > conftest.$ac_ext <<EOF
#line 7071 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:7078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_c_has_noerror_free_nonheap_object="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_c_has_noerror_free_nonheap_object="no"
fi
rm -f conftest*
            CFLAGS="$_SAVE_CFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_c_has_noerror_free_nonheap_object" 1>&6
    if test "${ac_c_has_noerror_free_nonheap_object}" = "yes"; then
        _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-error=free-nonheap-object"
    fi

    fi


    _DEFINES_CFLAGS='-include $(topobjdir)/mozilla-config.h -DMOZILLA_CLIENT'
    _USE_CPP_INCLUDE_FLAG=1

    ASFLAGS="$ASFLAGS $_DEFINES_CFLAGS"

else
    MKSHLIB='$(LD) $(DSO_LDOPTS) -h $(DSO_SONAME) -o $@'
    MKCSHLIB='$(LD) $(DSO_LDOPTS) -h $(DSO_SONAME) -o $@'

    DSO_LDOPTS='-shared'
    if test "$GNU_LD"; then
        # Don't allow undefined symbols in libraries
        DSO_LDOPTS="$DSO_LDOPTS -z defs"
    fi

    DSO_CFLAGS=''
    DSO_PIC_CFLAGS='-KPIC'
    _DEFINES_CFLAGS='$(ACDEFINES) -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT'
fi

if test "$GNU_CXX"; then
    # FIXME: Let us build with strict aliasing. bug 414641.
    CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-strict-aliasing"

    
    # Turn on gcc/clang warnings:
    # https://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/Warning-Options.html

    # -Wall - lots of useful warnings
    # -Wc++1[14z]-compat[-pedantic] - catches C++ version forward-compat issues
    # -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives
    # -Wignored-qualifiers - catches return types with qualifiers like const
    # -Woverloaded-virtual - function declaration hides virtual function from base class
    # -Wpointer-arith - catches pointer arithmetic using NULL or sizeof(void)
    # -Wsign-compare - catches comparing signed/unsigned ints
    # -Wtype-limits - catches overflow bugs, few false positives
    # -Wunreachable-code - catches some dead code
    # -Wwrite-strings - catches treating string literals as non-const
    _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wall"
    _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wc++11-compat"
    _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wempty-body"
    _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wignored-qualifiers"
    _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Woverloaded-virtual"
    _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wpointer-arith"
    _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wsign-compare"
    _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wtype-limits"
    _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wunreachable-code"
    _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wwrite-strings"

    # -Wclass-varargs - catches objects passed by value to variadic functions.
    # -Wimplicit-fallthrough - catches unintentional switch case fallthroughs
    # -Wloop-analysis - catches issues around loops
    # -Wnon-literal-null-conversion - catches expressions used as a null pointer constant
    # -Wthread-safety - catches inconsistent use of mutexes
    #
    # XXX: at the time of writing, the version of clang used on the OS X test
    # machines has a bug that causes it to reject some valid files if both
    # -Wnon-literal-null-conversion and -Wsometimes-uninitialized are
    # specified. We work around this by instead using
    # -Werror=non-literal-null-conversion, but we only do that when
    # --enable-warnings-as-errors is specified so that no unexpected fatal
    # warnings are produced.
    
    echo $ac_n "checking whether the C++ compiler supports -Wc++11-compat-pedantic""... $ac_c" 1>&6
echo "configure:7171: checking whether the C++ compiler supports -Wc++11-compat-pedantic" >&5
if eval "test \"`echo '$''{'ac_cxx_has_wcxx11_compat_pedantic'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

            _SAVE_CXXFLAGS="$CXXFLAGS"
            CXXFLAGS="$CXXFLAGS -Werror -Wc++11-compat-pedantic"
            cat > conftest.$ac_ext <<EOF
#line 7187 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:7194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cxx_has_wcxx11_compat_pedantic="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cxx_has_wcxx11_compat_pedantic="no"
fi
rm -f conftest*
            CXXFLAGS="$_SAVE_CXXFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_cxx_has_wcxx11_compat_pedantic" 1>&6
    if test "${ac_cxx_has_wcxx11_compat_pedantic}" = "yes"; then
        _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wc++11-compat-pedantic"
    fi

    
    echo $ac_n "checking whether the C++ compiler supports -Wc++14-compat""... $ac_c" 1>&6
echo "configure:7222: checking whether the C++ compiler supports -Wc++14-compat" >&5
if eval "test \"`echo '$''{'ac_cxx_has_wcxx14_compat'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

            _SAVE_CXXFLAGS="$CXXFLAGS"
            CXXFLAGS="$CXXFLAGS -Werror -Wc++14-compat"
            cat > conftest.$ac_ext <<EOF
#line 7238 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:7245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cxx_has_wcxx14_compat="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cxx_has_wcxx14_compat="no"
fi
rm -f conftest*
            CXXFLAGS="$_SAVE_CXXFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_cxx_has_wcxx14_compat" 1>&6
    if test "${ac_cxx_has_wcxx14_compat}" = "yes"; then
        _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wc++14-compat"
    fi

    
    echo $ac_n "checking whether the C++ compiler supports -Wc++14-compat-pedantic""... $ac_c" 1>&6
echo "configure:7273: checking whether the C++ compiler supports -Wc++14-compat-pedantic" >&5
if eval "test \"`echo '$''{'ac_cxx_has_wcxx14_compat_pedantic'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

            _SAVE_CXXFLAGS="$CXXFLAGS"
            CXXFLAGS="$CXXFLAGS -Werror -Wc++14-compat-pedantic"
            cat > conftest.$ac_ext <<EOF
#line 7289 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:7296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cxx_has_wcxx14_compat_pedantic="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cxx_has_wcxx14_compat_pedantic="no"
fi
rm -f conftest*
            CXXFLAGS="$_SAVE_CXXFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_cxx_has_wcxx14_compat_pedantic" 1>&6
    if test "${ac_cxx_has_wcxx14_compat_pedantic}" = "yes"; then
        _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wc++14-compat-pedantic"
    fi

    
    echo $ac_n "checking whether the C++ compiler supports -Wc++1z-compat""... $ac_c" 1>&6
echo "configure:7324: checking whether the C++ compiler supports -Wc++1z-compat" >&5
if eval "test \"`echo '$''{'ac_cxx_has_wcxx1z_compat'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

            _SAVE_CXXFLAGS="$CXXFLAGS"
            CXXFLAGS="$CXXFLAGS -Werror -Wc++1z-compat"
            cat > conftest.$ac_ext <<EOF
#line 7340 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:7347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cxx_has_wcxx1z_compat="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cxx_has_wcxx1z_compat="no"
fi
rm -f conftest*
            CXXFLAGS="$_SAVE_CXXFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_cxx_has_wcxx1z_compat" 1>&6
    if test "${ac_cxx_has_wcxx1z_compat}" = "yes"; then
        _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wc++1z-compat"
    fi

    
    echo $ac_n "checking whether the C++ compiler supports -Wclass-varargs""... $ac_c" 1>&6
echo "configure:7375: checking whether the C++ compiler supports -Wclass-varargs" >&5
if eval "test \"`echo '$''{'ac_cxx_has_wclass_varargs'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

            _SAVE_CXXFLAGS="$CXXFLAGS"
            CXXFLAGS="$CXXFLAGS -Werror -Wclass-varargs"
            cat > conftest.$ac_ext <<EOF
#line 7391 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:7398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cxx_has_wclass_varargs="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cxx_has_wclass_varargs="no"
fi
rm -f conftest*
            CXXFLAGS="$_SAVE_CXXFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_cxx_has_wclass_varargs" 1>&6
    if test "${ac_cxx_has_wclass_varargs}" = "yes"; then
        _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wclass-varargs"
    fi

    
    echo $ac_n "checking whether the C++ compiler supports -Wimplicit-fallthrough""... $ac_c" 1>&6
echo "configure:7426: checking whether the C++ compiler supports -Wimplicit-fallthrough" >&5
if eval "test \"`echo '$''{'ac_cxx_has_wimplicit_fallthrough'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

            _SAVE_CXXFLAGS="$CXXFLAGS"
            CXXFLAGS="$CXXFLAGS -Werror -Wimplicit-fallthrough"
            cat > conftest.$ac_ext <<EOF
#line 7442 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:7449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cxx_has_wimplicit_fallthrough="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cxx_has_wimplicit_fallthrough="no"
fi
rm -f conftest*
            CXXFLAGS="$_SAVE_CXXFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_cxx_has_wimplicit_fallthrough" 1>&6
    if test "${ac_cxx_has_wimplicit_fallthrough}" = "yes"; then
        _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wimplicit-fallthrough"
    fi

    
    echo $ac_n "checking whether the C++ compiler supports -Wloop-analysis""... $ac_c" 1>&6
echo "configure:7477: checking whether the C++ compiler supports -Wloop-analysis" >&5
if eval "test \"`echo '$''{'ac_cxx_has_wloop_analysis'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

            _SAVE_CXXFLAGS="$CXXFLAGS"
            CXXFLAGS="$CXXFLAGS -Werror -Wloop-analysis"
            cat > conftest.$ac_ext <<EOF
#line 7493 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:7500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cxx_has_wloop_analysis="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cxx_has_wloop_analysis="no"
fi
rm -f conftest*
            CXXFLAGS="$_SAVE_CXXFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_cxx_has_wloop_analysis" 1>&6
    if test "${ac_cxx_has_wloop_analysis}" = "yes"; then
        _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wloop-analysis"
    fi


    if test "$MOZ_ENABLE_WARNINGS_AS_ERRORS"; then
        
    echo $ac_n "checking whether the C++ compiler supports -Werror=non-literal-null-conversion""... $ac_c" 1>&6
echo "configure:7530: checking whether the C++ compiler supports -Werror=non-literal-null-conversion" >&5
if eval "test \"`echo '$''{'ac_cxx_has_non_literal_null_conversion'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

            _SAVE_CXXFLAGS="$CXXFLAGS"
            CXXFLAGS="$CXXFLAGS -Werror -Wnon-literal-null-conversion"
            cat > conftest.$ac_ext <<EOF
#line 7546 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:7553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cxx_has_non_literal_null_conversion="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cxx_has_non_literal_null_conversion="no"
fi
rm -f conftest*
            CXXFLAGS="$_SAVE_CXXFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_cxx_has_non_literal_null_conversion" 1>&6
    if test "${ac_cxx_has_non_literal_null_conversion}" = "yes"; then
        _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Werror=non-literal-null-conversion"
    fi

    fi

    
    echo $ac_n "checking whether the C++ compiler supports -Wthread-safety""... $ac_c" 1>&6
echo "configure:7583: checking whether the C++ compiler supports -Wthread-safety" >&5
if eval "test \"`echo '$''{'ac_cxx_has_wthread_safety'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

            _SAVE_CXXFLAGS="$CXXFLAGS"
            CXXFLAGS="$CXXFLAGS -Werror -Wthread-safety"
            cat > conftest.$ac_ext <<EOF
#line 7599 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:7606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cxx_has_wthread_safety="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cxx_has_wthread_safety="no"
fi
rm -f conftest*
            CXXFLAGS="$_SAVE_CXXFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_cxx_has_wthread_safety" 1>&6
    if test "${ac_cxx_has_wthread_safety}" = "yes"; then
        _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wthread-safety"
    fi


    # Turn off some non-useful warnings that -Wall turns on.

    # -Wno-invalid-offsetof - we use offsetof on non-POD types frequently
    _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-invalid-offsetof"

    # -Wno-inline-new-delete - we inline 'new' and 'delete' in mozalloc
    
    echo $ac_n "checking whether the C++ compiler supports -Wno-inline-new-delete""... $ac_c" 1>&6
echo "configure:7641: checking whether the C++ compiler supports -Wno-inline-new-delete" >&5
if eval "test \"`echo '$''{'ac_cxx_has_wno_inline_new_delete'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

            _SAVE_CXXFLAGS="$CXXFLAGS"
            CXXFLAGS="$CXXFLAGS -Werror -Winline-new-delete"
            cat > conftest.$ac_ext <<EOF
#line 7657 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:7664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cxx_has_wno_inline_new_delete="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cxx_has_wno_inline_new_delete="no"
fi
rm -f conftest*
            CXXFLAGS="$_SAVE_CXXFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_cxx_has_wno_inline_new_delete" 1>&6
    if test "${ac_cxx_has_wno_inline_new_delete}" = "yes"; then
        _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-inline-new-delete"
    fi


    # Prevent the following GCC warnings from being treated as errors:
    # -Wmaybe-uninitialized - too many false positives
    # -Wdeprecated-declarations - we don't want our builds held hostage when a
    #   platform-specific API becomes deprecated.
    # -Wfree-nonheap-object - false positives during PGO
    # -Warray-bounds - false positives depending on optimization
    
    echo $ac_n "checking whether the C++ compiler supports -Wno-error=maybe-uninitialized""... $ac_c" 1>&6
echo "configure:7699: checking whether the C++ compiler supports -Wno-error=maybe-uninitialized" >&5
if eval "test \"`echo '$''{'ac_cxx_has_noerror_maybe_uninitialized'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

            _SAVE_CXXFLAGS="$CXXFLAGS"
            CXXFLAGS="$CXXFLAGS -Werror -Wno-error=maybe-uninitialized"
            cat > conftest.$ac_ext <<EOF
#line 7715 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:7722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cxx_has_noerror_maybe_uninitialized="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cxx_has_noerror_maybe_uninitialized="no"
fi
rm -f conftest*
            CXXFLAGS="$_SAVE_CXXFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_cxx_has_noerror_maybe_uninitialized" 1>&6
    if test "${ac_cxx_has_noerror_maybe_uninitialized}" = "yes"; then
        _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-error=maybe-uninitialized"
    fi

    
    echo $ac_n "checking whether the C++ compiler supports -Wno-error=deprecated-declarations""... $ac_c" 1>&6
echo "configure:7750: checking whether the C++ compiler supports -Wno-error=deprecated-declarations" >&5
if eval "test \"`echo '$''{'ac_cxx_has_noerror_deprecated_declarations'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

            _SAVE_CXXFLAGS="$CXXFLAGS"
            CXXFLAGS="$CXXFLAGS -Werror -Wno-error=deprecated-declarations"
            cat > conftest.$ac_ext <<EOF
#line 7766 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:7773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cxx_has_noerror_deprecated_declarations="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cxx_has_noerror_deprecated_declarations="no"
fi
rm -f conftest*
            CXXFLAGS="$_SAVE_CXXFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_cxx_has_noerror_deprecated_declarations" 1>&6
    if test "${ac_cxx_has_noerror_deprecated_declarations}" = "yes"; then
        _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-error=deprecated-declarations"
    fi

    
    echo $ac_n "checking whether the C++ compiler supports -Wno-error=array-bounds""... $ac_c" 1>&6
echo "configure:7801: checking whether the C++ compiler supports -Wno-error=array-bounds" >&5
if eval "test \"`echo '$''{'ac_cxx_has_noerror_array_bounds'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

            _SAVE_CXXFLAGS="$CXXFLAGS"
            CXXFLAGS="$CXXFLAGS -Werror -Wno-error=array-bounds"
            cat > conftest.$ac_ext <<EOF
#line 7817 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:7824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cxx_has_noerror_array_bounds="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cxx_has_noerror_array_bounds="no"
fi
rm -f conftest*
            CXXFLAGS="$_SAVE_CXXFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_cxx_has_noerror_array_bounds" 1>&6
    if test "${ac_cxx_has_noerror_array_bounds}" = "yes"; then
        _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-error=array-bounds"
    fi


    if test -n "$MOZ_PGO"; then
        
    echo $ac_n "checking whether the C++ compiler supports -Wno-error=coverage-mismatch""... $ac_c" 1>&6
echo "configure:7854: checking whether the C++ compiler supports -Wno-error=coverage-mismatch" >&5
if eval "test \"`echo '$''{'ac_cxx_has_noerror_coverage_mismatch'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

            _SAVE_CXXFLAGS="$CXXFLAGS"
            CXXFLAGS="$CXXFLAGS -Werror -Wno-error=coverage-mismatch"
            cat > conftest.$ac_ext <<EOF
#line 7870 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:7877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cxx_has_noerror_coverage_mismatch="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cxx_has_noerror_coverage_mismatch="no"
fi
rm -f conftest*
            CXXFLAGS="$_SAVE_CXXFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_cxx_has_noerror_coverage_mismatch" 1>&6
    if test "${ac_cxx_has_noerror_coverage_mismatch}" = "yes"; then
        _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-error=coverage-mismatch"
    fi

        
    echo $ac_n "checking whether the C++ compiler supports -Wno-error=free-nonheap-object""... $ac_c" 1>&6
echo "configure:7905: checking whether the C++ compiler supports -Wno-error=free-nonheap-object" >&5
if eval "test \"`echo '$''{'ac_cxx_has_noerror_free_nonheap_object'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

            _SAVE_CXXFLAGS="$CXXFLAGS"
            CXXFLAGS="$CXXFLAGS -Werror -Wno-error=free-nonheap-object"
            cat > conftest.$ac_ext <<EOF
#line 7921 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:7928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cxx_has_noerror_free_nonheap_object="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cxx_has_noerror_free_nonheap_object="no"
fi
rm -f conftest*
            CXXFLAGS="$_SAVE_CXXFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_cxx_has_noerror_free_nonheap_object" 1>&6
    if test "${ac_cxx_has_noerror_free_nonheap_object}" = "yes"; then
        _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-error=free-nonheap-object"
    fi

    fi


    _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -include $(topobjdir)/mozilla-config.h'
    _USE_CPP_INCLUDE_FLAG=1

else
    _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -D_MOZILLA_CONFIG_H_ $(ACDEFINES)'
fi

if test "$COMPILE_ENVIRONMENT"; then

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

echo $ac_n "checking for 64-bit OS""... $ac_c" 1>&6
echo "configure:7974: checking for 64-bit OS" >&5
cat > conftest.$ac_ext <<EOF
#line 7976 "configure"
#include "confdefs.h"
$configure_static_assert_macros
int main() {
CONFIGURE_STATIC_ASSERT(sizeof(void*) == 8)
; return 0; }
EOF
if { (eval echo configure:7983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  result="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  result="no"
fi
rm -f conftest*
echo "$ac_t"""$result"" 1>&6
if test "$result" = "yes"; then
    cat >> confdefs.pytmp <<\EOF
    (''' HAVE_64BIT_BUILD ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_64BIT_BUILD 1
EOF

    HAVE_64BIT_BUILD=1
fi

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

fi # COMPILE_ENVIRONMENT


if test -n "$MACOSX_DEPLOYMENT_TARGET" -a -n "$MOZ_RUST"; then
  echo $ac_n "checking if we're targeting 32-bit""... $ac_c" 1>&6
echo "configure:8017: checking if we're targeting 32-bit" >&5
  if test -z "$HAVE_64BIT_BUILD"; then
    echo "$ac_t""using $RUSTC" 1>&6
  else
    echo "$ac_t""no" 1>&6
  fi
  echo $ac_n "checking rustc compatibility with MacOS X""... $ac_c" 1>&6
echo "configure:8024: checking rustc compatibility with MacOS X" >&5
  # Stock rustc doesn't support MacOS X 10.6 or earlier.
  # https://github.com/rust-lang/rust/issues/25342
  _MACOSX_TARGET_MINOR=`echo "$MACOSX_DEPLOYMENT_TARGET" | cut -d. -f2`
  if test "$_MACOSX_TARGET_MINOR" -lt 7; then
            cat > conftest.rs <<EOF
      #[no_mangle]
      pub extern fn rusty_answer() -> u8 { 42 }
EOF
    ac_try="$RUSTC --crate-type staticlib -o conftest.a conftest.rs >/dev/null"
    { (eval echo configure:8034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    save_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS conftest.a -lpthread -lm"
    cat > conftest.$ac_ext <<EOF
#line 8038 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char rusty_answer();

int main() {
rusty_answer()
; return 0; }
EOF
if { (eval echo configure:8049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""$MACOSX_DEPLOYMENT_TARGET is ok with this rustc" 1>&6
    
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""cannot link for $MACOSX_DEPLOYMENT_TARGET" 1>&6
      MOZ_RUST=
    
fi
rm -f conftest*
    LDFLAGS=$save_LDFLAGS
    rm -rf conftest*
  else
    echo "$ac_t""$MACOSX_DEPLOYMENT_TARGET is ok" 1>&6
  fi
  if test -z "$MOZ_RUST"; then
    { echo "configure: error: rustc does not support MacOS X $MACOSX_DEPLOYMENT_TARGET
      Add 'ac_add_options --enable-macos-target=10.7' (or later)
      to mozconfig, disable Rust support, or use an alternate toolchain." 1>&2; echo "configure: error: rustc does not support MacOS X $MACOSX_DEPLOYMENT_TARGET
      Add 'ac_add_options --enable-macos-target=10.7' (or later)
      to mozconfig, disable Rust support, or use an alternate toolchain." 1>&5; exit 1; }
  fi
fi

# Check whether --enable-valgrind or --disable-valgrind was given.
if test "${enable_valgrind+set}" = set; then
  enableval="$enable_valgrind"
  if test "$enableval" = "yes"; then
    MOZ_VALGRIND=1
  elif test "$enableval" = "no"; then
    MOZ_VALGRIND= 
  else
    { echo "configure: error: Option, valgrind, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, valgrind, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test -n "$MOZ_VALGRIND"; then
       ac_safe=`echo "valgrind/valgrind.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for valgrind/valgrind.h""... $ac_c" 1>&6
echo "configure:8091: checking for valgrind/valgrind.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 8096 "configure"
#include "confdefs.h"

#include <valgrind/valgrind.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:8104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    :
  else
    echo "$ac_t""no" 1>&6
    { echo "configure: error: --enable-valgrind specified but Valgrind is not installed" 1>&2; echo "configure: error: --enable-valgrind specified but Valgrind is not installed" 1>&5; exit 1; }
  fi

    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_VALGRIND ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_VALGRIND 1
EOF

fi


# For profiling builds keep the symbol information
if test "$MOZ_PROFILING" -a -z "$STRIP_FLAGS"; then
    case "$OS_TARGET" in
    Linux|DragonFly|FreeBSD|NetBSD|OpenBSD)
        STRIP_FLAGS="--strip-debug"
        ;;
    esac
fi


if test "$MOZ_DMD"; then
    if test "${CPU_ARCH}" = "arm"; then
        CFLAGS="$CFLAGS -funwind-tables"
        CXXFLAGS="$CXXFLAGS -funwind-tables"
    fi
fi

case "$host" in
*mingw*)
    if test -n "$_WIN32_MSVC"; then
        HOST_AR=lib
        HOST_AR_FLAGS='-NOLOGO -OUT:$@'
        HOST_CFLAGS="$HOST_CFLAGS -TC -nologo"
        HOST_RANLIB='echo ranlib'
    else
        HOST_CFLAGS="$HOST_CFLAGS -mwindows"
    fi
    HOST_CFLAGS="$HOST_CFLAGS -DXP_WIN32 -DXP_WIN -DWIN32 -D_WIN32 -D_CRT_SECURE_NO_WARNINGS"
    HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}"
    HOST_BIN_SUFFIX=.exe

    case "${host_cpu}" in
    i*86)
        if test -n "$_WIN32_MSVC"; then
            HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X86"
        fi
        ;;
    x86_64)
        if test -n "$_WIN32_MSVC"; then
            HOST_LDFLAGS="$HOST_LDFLAGS -MACHINE:X64"
        fi
        HOST_CFLAGS="$HOST_CFLAGS -D_AMD64_"
        ;;
    esac
    ;;

*-darwin*)
    HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX"
    HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}"
    ;;

*-linux*|*-kfreebsd*-gnu|*-gnu*)
    HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
    HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}"
    ;;

*)
    HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
    HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}"
    ;;
esac

MOZILLA_VERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir`
MOZILLA_UAVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --uaversion`
MOZILLA_SYMBOLVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --symbolversion`
if test -z "$MOZILLA_VERSION"; then
  { echo "configure: error: failed to read version info from milestone file" 1>&2; echo "configure: error: failed to read version info from milestone file" 1>&5; exit 1; }
fi

FIREFOX_VERSION=`cat $_topsrcdir/browser/config/version.txt`
FIREFOX_VERSION_DISPLAY=`cat $_topsrcdir/browser/config/version_display.txt`

if test -z "$FIREFOX_VERSION"; then
    { echo "configure: error: FIREFOX_VERSION is unexpectedly blank." 1>&2; echo "configure: error: FIREFOX_VERSION is unexpectedly blank." 1>&5; exit 1; }
fi

if test -z "$FIREFOX_VERSION_DISPLAY"; then
    { echo "configure: error: FIREFOX_VERSION_DISPLAY is unexpectedly blank." 1>&2; echo "configure: error: FIREFOX_VERSION_DISPLAY is unexpectedly blank." 1>&5; exit 1; }
fi

cat >> confdefs.pytmp <<EOF
    (''' MOZILLA_VERSION ''', r''' "$MOZILLA_VERSION" ''')
EOF
cat >> confdefs.h <<EOF
#define MOZILLA_VERSION "$MOZILLA_VERSION"
EOF

cat >> confdefs.pytmp <<EOF
    (''' MOZILLA_VERSION_U ''', r''' $MOZILLA_VERSION ''')
EOF
cat >> confdefs.h <<EOF
#define MOZILLA_VERSION_U $MOZILLA_VERSION
EOF

cat >> confdefs.pytmp <<EOF
    (''' MOZILLA_UAVERSION ''', r''' "$MOZILLA_UAVERSION" ''')
EOF
cat >> confdefs.h <<EOF
#define MOZILLA_UAVERSION "$MOZILLA_UAVERSION"
EOF




  cat > conftest.c <<EOF
                  int foo = 1;
EOF
  lto_is_enabled=no
  if ${CC-cc} ${CFLAGS} -S conftest.c -o conftest.s >/dev/null 2>&1; then
    if grep '^target triple =' conftest.s; then
      lto_is_enabled=yes
    fi
  fi
  rm -f conftest.cs



case "$target" in
*-darwin*)
    MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
    MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
    MOZ_OPTIMIZE_FLAGS="-O3"
    CXXFLAGS="$CXXFLAGS -stdlib=libc++"
    DLL_SUFFIX=".dylib"
    DSO_LDOPTS=''
    STRIP_FLAGS="$STRIP_FLAGS -x -S"
    # Ensure that if we're targeting iOS an SDK was provided.
    echo $ac_n "checking for iOS target""... $ac_c" 1>&6
echo "configure:8262: checking for iOS target" >&5
if eval "test \"`echo '$''{'ac_cv_ios_target'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8267 "configure"
#include "confdefs.h"
#include <TargetConditionals.h>
#if !(TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
#error not iOS
#endif
int main() {

; return 0; }
EOF
if { (eval echo configure:8277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_ios_target="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_ios_target="no"
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_ios_target" 1>&6
    if test "$ac_cv_ios_target" = "yes" -a -z $MOZ_IOS; then
       { echo "configure: error: targeting iOS but not using an iOS SDK?" 1>&2; echo "configure: error: targeting iOS but not using an iOS SDK?" 1>&5; exit 1; }
    fi
    if test -n "$MOZ_IOS"; then
        direct_nspr_config=1
    else
        # The ExceptionHandling framework is needed for Objective-C exception
        # logging code in nsObjCExceptions.h. Currently we only use that in debug
        # builds.
        MOZ_DEBUG_LDFLAGS="$MOZ_DEBUG_LDFLAGS -framework ExceptionHandling";
    fi

    if test "x$lto_is_enabled" = "xyes"; then
        echo "Skipping -dead_strip because lto is enabled."
            elif test "x$enable_dtrace" = "xyes"; then
        echo "Skipping -dead_strip because DTrace is enabled. See bug 403132."
    else
                echo $ac_n "checking for -dead_strip option to ld""... $ac_c" 1>&6
echo "configure:8308: checking for -dead_strip option to ld" >&5
        _SAVE_LDFLAGS=$LDFLAGS
        LDFLAGS="$LDFLAGS -Wl,-dead_strip"
        cat > conftest.$ac_ext <<EOF
#line 8312 "configure"
#include "confdefs.h"

int main() {
return 0;
; return 0; }
EOF
if { (eval echo configure:8319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  _HAVE_DEAD_STRIP=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  _HAVE_DEAD_STRIP=
fi
rm -f conftest*
        if test -n "$_HAVE_DEAD_STRIP" ; then
            echo "$ac_t""yes" 1>&6
            MOZ_OPTIMIZE_LDFLAGS="-Wl,-dead_strip"
        else
            echo "$ac_t""no" 1>&6
        fi

        LDFLAGS=$_SAVE_LDFLAGS
    fi

            echo $ac_n "checking for -allow_heap_execute option to ld""... $ac_c" 1>&6
echo "configure:8340: checking for -allow_heap_execute option to ld" >&5
    _SAVE_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS -Wl,-allow_heap_execute"
    cat > conftest.$ac_ext <<EOF
#line 8344 "configure"
#include "confdefs.h"

int main() {
return 0;
; return 0; }
EOF
if { (eval echo configure:8351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  _HAVE_ALLOW_HEAP_EXECUTE=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  _HAVE_ALLOW_HEAP_EXECUTE=
fi
rm -f conftest*
    if test -n "$_HAVE_ALLOW_HEAP_EXECUTE" ; then
        echo "$ac_t""yes" 1>&6
        MOZ_ALLOW_HEAP_EXECUTE_FLAGS="-Wl,-allow_heap_execute"
    else
        echo "$ac_t""no" 1>&6
    fi
    LDFLAGS=$_SAVE_LDFLAGS

    MOZ_FIX_LINK_PATHS="-Wl,-executable_path,${DIST}/bin"
    ;;

*-android*|*-linuxandroid*)
    cat >> confdefs.pytmp <<\EOF
    (''' NO_PW_GECOS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define NO_PW_GECOS 1
EOF

    if test -n "$gonkdir"; then
        _PLATFORM_HAVE_RIL=1
        MOZ_B2G_FM=1
        MOZ_SYNTH_PICO=1
    else
        if test "$COMPILE_ENVIRONMENT"; then
            MOZ_LINKER=1
        fi
    fi

    MOZ_GFX_OPTIMIZE_MOBILE=1
    MOZ_OPTIMIZE_FLAGS="-Os"
    if test -z "$CLANG_CC"; then
       MOZ_OPTIMIZE_FLAGS="-freorder-blocks -fno-reorder-functions $MOZ_OPTIMIZE_FLAGS"
    fi
    ;;

*-*linux*)
    if test "$GNU_CC" -o "$GNU_CXX"; then
        MOZ_PGO_OPTIMIZE_FLAGS="-O3"
        MOZ_OPTIMIZE_FLAGS="-Os"
        if test -z "$CLANG_CC"; then
           MOZ_OPTIMIZE_FLAGS="-freorder-blocks $MOZ_OPTIMIZE_FLAGS"
        fi
    fi

    case "${target_cpu}" in
    alpha*)
        CFLAGS="$CFLAGS -mieee"
        CXXFLAGS="$CXXFLAGS -mieee"
    ;;
    esac

    if test -z "$MC"; then
        MC=mc.exe
    fi
    ;;
*-mingw*)
    DSO_CFLAGS=
    DSO_PIC_CFLAGS=
    DLL_SUFFIX=.dll
    RC=rc.exe
    MC=mc.exe
    # certain versions of cygwin's makedepend barf on the
    # #include <string> vs -I./dist/include/string issue so don't use it
    if test -n "$GNU_CC" -o -n "$CLANG_CC"; then
        CC="$CC -mwindows"
        CXX="$CXX -mwindows"
        CPP="$CPP -mwindows"
        CFLAGS="$CFLAGS -mms-bitfields"
        CXXFLAGS="$CXXFLAGS -mms-bitfields"
        DSO_LDOPTS='-shared'
        MKSHLIB='$(CXX) $(DSO_LDOPTS) -o $@'
        MKCSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
        RC='$(WINDRES)'
        # Use static libgcc and libstdc++
        LDFLAGS="$LDFLAGS -static"
        NSPR_LDFLAGS="$NSPR_LDFLAGS -static-libgcc"
        # Use temp file for windres (bug 213281)
        RCFLAGS='-O coff --use-temp-file'
        # mingw doesn't require kernel32, user32, and advapi32 explicitly
        LIBS="$LIBS -luuid -lgdi32 -lwinmm -lwsock32 -luserenv -lsecur32 -lnetapi32"
        MOZ_FIX_LINK_PATHS=
        DLL_PREFIX=
        IMPORT_LIB_SUFFIX=a

        WIN32_CONSOLE_EXE_LDFLAGS=-mconsole
        WIN32_GUI_EXE_LDFLAGS=-mwindows

        # GCC/binutils can't link to a function if we try to include dllexport function
        # in the same library as dllimport caller. To work around it, we build NSPR
        # and NSS with -mnop-fun-dllimport flag. The drawback of this solution is that
        # function thunks need to be generated for cross-DLL calls.
        MOZ_FOLD_LIBS_FLAGS=-mnop-fun-dllimport

        # We use mix of both POSIX and Win32 printf format across the tree, so format
        # warnings are useless on mingw.
        
    echo $ac_n "checking whether the C compiler supports -Wno-format""... $ac_c" 1>&6
echo "configure:8459: checking whether the C compiler supports -Wno-format" >&5
if eval "test \"`echo '$''{'ac_c_has_wno_format'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

            _SAVE_CFLAGS="$CFLAGS"
            CFLAGS="$CFLAGS -Werror -Wformat"
            cat > conftest.$ac_ext <<EOF
#line 8475 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:8482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_c_has_wno_format="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_c_has_wno_format="no"
fi
rm -f conftest*
            CFLAGS="$_SAVE_CFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_c_has_wno_format" 1>&6
    if test "${ac_c_has_wno_format}" = "yes"; then
        _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-format"
    fi

        
    echo $ac_n "checking whether the C++ compiler supports -Wno-format""... $ac_c" 1>&6
echo "configure:8510: checking whether the C++ compiler supports -Wno-format" >&5
if eval "test \"`echo '$''{'ac_cxx_has_wno_format'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

            _SAVE_CXXFLAGS="$CXXFLAGS"
            CXXFLAGS="$CXXFLAGS -Werror -Wformat"
            cat > conftest.$ac_ext <<EOF
#line 8526 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:8533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cxx_has_wno_format="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cxx_has_wno_format="no"
fi
rm -f conftest*
            CXXFLAGS="$_SAVE_CXXFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_cxx_has_wno_format" 1>&6
    if test "${ac_cxx_has_wno_format}" = "yes"; then
        _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-format"
    fi

    else
        TARGET_COMPILER_ABI=msvc
        HOST_LD='$(LD)'
        if test "$AS_BIN"; then
            AS="$(basename "$AS_BIN")"
        fi
        AR='lib'
        AR_FLAGS='-NOLOGO -OUT:$@'
        AR_EXTRACT=
        RANLIB='echo not_ranlib'
        STRIP='echo not_strip'
        PKG_SKIP_STRIP=1
        OBJ_SUFFIX=obj
        LIB_SUFFIX=lib
        DLL_PREFIX=
        LIB_PREFIX=
        IMPORT_LIB_SUFFIX=lib
        MKSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
        MKCSHLIB='$(LD) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
                if test "$CPU_ARCH" = "x86"; then
            WIN32_SUBSYSTEM_VERSION=5.01
        else
            WIN32_SUBSYSTEM_VERSION=6.01
        fi
        WIN32_CONSOLE_EXE_LDFLAGS=-SUBSYSTEM:CONSOLE,$WIN32_SUBSYSTEM_VERSION
        WIN32_GUI_EXE_LDFLAGS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION
        DSO_LDOPTS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION
        _USE_CPP_INCLUDE_FLAG=1
        _DEFINES_CFLAGS='-FI $(topobjdir)/mozilla-config.h -DMOZILLA_CLIENT'
        _DEFINES_CXXFLAGS='-FI $(topobjdir)/mozilla-config.h -DMOZILLA_CLIENT'
        CFLAGS="$CFLAGS -W3 -Gy"
        CXXFLAGS="$CXXFLAGS -W3 -Gy"
        if test "$CPU_ARCH" = "x86"; then
                                                if test -z `echo $CFLAGS | grep -i -/arch:`; then
              CFLAGS="$CFLAGS -arch:SSE2"
            fi
            if test -z `echo $CXXFLAGS | grep -i -/arch:`; then
              CXXFLAGS="$CXXFLAGS -arch:SSE2"
            fi
            SSE_FLAGS="-arch:SSE"
            SSE2_FLAGS="-arch:SSE2"
                                    SSSE3_FLAGS="-arch:SSE2"
        fi
                        CFLAGS="$CFLAGS -FS"
        CXXFLAGS="$CXXFLAGS -FS"
        # khuey says we can safely ignore MSVC warning C4251
        # MSVC warning C4244 (implicit type conversion may lose data) warns
        # and requires workarounds for perfectly valid code.  Also, GCC/clang
        # don't warn about it by default. So for consistency/sanity, we turn
        # it off on MSVC, too.
        # MSVC warning C4267 warns for narrowing type conversions from size_t
        # to 32-bit integer types on 64-bit platforms.  Since this is virtually
        # the same thing as C4244, we disable C4267, too.
        # MSVC warning C4345 warns of newly conformant behavior as of VS2003.
        # MSVC warning C4351 warns of newly conformant behavior as of VS2005.
        # MSVC warning C4800 warns when a value is implicitly cast to bool,
        # because this also forces narrowing to a single byte, which can be a
        # perf hit.  But this matters so little in practice (and often we want
        # that behavior) that it's better to turn it off.
        # MSVC warning C4819 warns some UTF-8 characters (e.g. copyright sign)
        # on non-Western system locales even if it is in a comment.
        # MSVC warning wd4595 warns non-member operator new or delete functions
        # may not be declared inline, as of VS2015 Update 2.
        CFLAGS="$CFLAGS -wd4244 -wd4267 -wd4819"
        CXXFLAGS="$CXXFLAGS -wd4251 -wd4244 -wd4267 -wd4345 -wd4351 -wd4800 -wd4819 -wd4595"
        if test -n "$CLANG_CL"; then
            # XXX We should combine some of these with our generic GCC-style
            # warning checks.
            #
            # Suppress the clang-cl warning for the inline 'new' and 'delete' in mozalloc
            CXXFLAGS="$CXXFLAGS -Wno-inline-new-delete"
            # We use offsetof on non-POD objects all the time.
            # We also suppress this warning on other platforms.
            CXXFLAGS="$CXXFLAGS -Wno-invalid-offsetof"
            # MFBT thinks clang-cl supports constexpr, which it does, but
            # not everything in Windows C++ headers supports constexpr
            # as we might expect until MSVC 2015, so turn off this warning
            # for now.
            CXXFLAGS="$CXXFLAGS -Wno-invalid-constexpr"
            # This warns for reasonable things like:
            #   enum { X = 0xffffffffU };
            # which is annoying for IDL headers.
            CXXFLAGS="$CXXFLAGS -Wno-microsoft-enum-value"
            # This warns for cases that would be reached by the Microsoft
            # #include rules, but also currently warns on cases that would
            # *also* be reached by standard C++ include rules.  That
            # behavior doesn't seem useful, so we turn it off.
            CXXFLAGS="$CXXFLAGS -Wno-microsoft-include"
            # We normally error out on unknown pragmas, but since clang-cl
            # claims to be MSVC, it would be difficult to add
            # #if defined(_MSC_VER) && !defined(__clang__) everywhere we
            # use such pragmas, so just ignore them.
            CFLAGS="$CFLAGS -Wno-unknown-pragmas"
            CXXFLAGS="$CXXFLAGS -Wno-unknown-pragmas"
            # clang-cl's Intrin.h marks things like _ReadWriteBarrier
            # as __attribute((__deprecated__)).  This is nice to know,
            # but since we don't get the equivalent warning from MSVC,
            # let's just ignore it.
            CFLAGS="$CFLAGS -Wno-deprecated-declarations"
            CXXFLAGS="$CXXFLAGS -Wno-deprecated-declarations"
            # We use a function like:
            #   __declspec(noreturn) __inline void f() {}
            # which -Winvalid-noreturn complains about.  Again, MSVC seems
            # OK with it, so let's silence the warning.
            CFLAGS="$CFLAGS -Wno-invalid-noreturn"
            CXXFLAGS="$CXXFLAGS -Wno-invalid-noreturn"
            # Missing |override| on virtual function declarations isn't
            # something that MSVC currently warns about.
            CXXFLAGS="$CXXFLAGS -Wno-inconsistent-missing-override"
            # We use -DHAS_EXCEPTIONS=0, which removes the |throw()|
            # declaration on |operator delete(void*)|.  However, clang-cl
            # must internally declare |operator delete(void*)| differently,
            # which causes this warning for virtually every file in the
            # tree.  clang-cl doesn't support -fno-exceptions or equivalent,
            # so there doesn't seem to be any way to convince clang-cl to
            # declare |delete| differently.  Therefore, suppress this
            # warning.
            CXXFLAGS="$CXXFLAGS -Wno-implicit-exception-spec-mismatch"
            # At least one MSVC header and several headers in-tree have
            # unused typedefs, so turn this on.
            CXXFLAGS="$CXXFLAGS -Wno-unused-local-typedef"
            # Several JS engine header files use __declspec(dllimport) on
            # classes, and clang-cl helpfully warns about its non-support
            # for such cases.  We're not particularly worried about that,
            # so ignore that warning.
            CXXFLAGS="$CXXFLAGS -Wno-ignored-attributes"
        fi
        # make 'foo == bar;' error out
        CFLAGS="$CFLAGS -we4553"
        CXXFLAGS="$CXXFLAGS -we4553"
        LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib secur32.lib netapi32.lib"
        MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
        WARNINGS_AS_ERRORS='-WX'
        MOZ_OPTIMIZE_FLAGS='-O1 -Oi'
        MOZ_FIX_LINK_PATHS=
        LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE -NXCOMPAT"
        if test -z "$DEVELOPER_OPTIONS"; then
            LDFLAGS="$LDFLAGS -RELEASE"
        fi
                PROFILE_GEN_CFLAGS="-GL"
        num_cores=$($PYTHON -c 'import multiprocessing; print(min(8,multiprocessing.cpu_count()))')
        cgthreads="-CGTHREADS:${num_cores}"
        PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT -PogoSafeMode $cgthreads"
                                                                PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"
                        PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE $cgthreads"
        LDFLAGS="$LDFLAGS -DYNAMICBASE"
        RCFLAGS="-nologo"
        if test "$CC_VERSION" = "18.00.31101"; then
                                    LDFLAGS="$LDFLAGS -MaxILKSize:0x7FF00000"
        fi
                        HAVE_TOOLCHAIN_SUPPORT_MSSSE3=1
        HAVE_TOOLCHAIN_SUPPORT_MSSE4_1=1
                HAVE_X86_AVX2=1
    fi
    cat >> confdefs.pytmp <<\EOF
    (''' STDC_HEADERS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define STDC_HEADERS 1
EOF

    cat >> confdefs.pytmp <<\EOF
    (''' WIN32_LEAN_AND_MEAN ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define WIN32_LEAN_AND_MEAN 1
EOF

        cat >> confdefs.pytmp <<\EOF
    (''' NOMINMAX ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define NOMINMAX 1
EOF

    BIN_SUFFIX='.exe'
    MOZ_USER_DIR="Mozilla"

    case "$host_os" in
    cygwin*|msvc*|mks*)
        { echo "configure: error: Using a Cygwin build environment is unsupported. Configure cannot check for presence of necessary headers. Please upgrade to MozillaBuild; see https://developer.mozilla.org/en/Windows_Build_Prerequisites." 1>&2; echo "configure: error: Using a Cygwin build environment is unsupported. Configure cannot check for presence of necessary headers. Please upgrade to MozillaBuild; see https://developer.mozilla.org/en/Windows_Build_Prerequisites." 1>&5; exit 1; }
        ;;
    esac

    case "$target" in
    i*86-*)
        if test "$HAVE_64BIT_BUILD"; then
            { echo "configure: error: You are targeting i386 but using the 64-bit compiler." 1>&2; echo "configure: error: You are targeting i386 but using the 64-bit compiler." 1>&5; exit 1; }
        fi

        if test -n "$GNU_CC"; then
            CFLAGS="$CFLAGS -mstackrealign -fno-keep-inline-dllexport"
            CXXFLAGS="$CXXFLAGS -mstackrealign -fno-keep-inline-dllexport"
            LDFLAGS="$LDFLAGS -Wl,--enable-stdcall-fixup -Wl,--large-address-aware"
        else
            DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X86"
            LDFLAGS="$LDFLAGS -SAFESEH"
        fi

        cat >> confdefs.pytmp <<\EOF
    (''' _X86_ ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _X86_ 1
EOF

        ;;
    x86_64-*)
        if test -z "$HAVE_64BIT_BUILD"; then
            { echo "configure: error: You are targeting 64-bit but using the 32-bit compiler." 1>&2; echo "configure: error: You are targeting 64-bit but using the 32-bit compiler." 1>&5; exit 1; }
        fi
        if test -n "$_WIN32_MSVC"; then
            DSO_LDOPTS="$DSO_LDOPTS -MACHINE:X64"
        fi
        cat >> confdefs.pytmp <<\EOF
    (''' _AMD64_ ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _AMD64_ 1
EOF

        ;;
    *)
        cat >> confdefs.pytmp <<\EOF
    (''' _CPU_ARCH_NOT_DEFINED ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _CPU_ARCH_NOT_DEFINED 1
EOF

        ;;
    esac
    ;;

*-netbsd*)
    DSO_CFLAGS=''
    CFLAGS="$CFLAGS -Dunix"
    CXXFLAGS="$CXXFLAGS -Dunix"
    if $CC -E - -dM </dev/null | grep __ELF__ >/dev/null; then
        DLL_SUFFIX=".so"
        DSO_PIC_CFLAGS='-fPIC -DPIC'
        DSO_LDOPTS='-shared'
        BIN_FLAGS='-Wl,--export-dynamic'
    else
        DSO_PIC_CFLAGS='-fPIC -DPIC'
        DLL_SUFFIX=".so.1.0"
        DSO_LDOPTS='-shared'
    fi
    # This will fail on a.out systems prior to 1.5.1_ALPHA.
    if test "$LIBRUNPATH"; then
        DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS"
    fi
    MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$(DSO_SONAME) -o $@'
    MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$(DSO_SONAME) -o $@'
    ;;

*-openbsd*)
    if test "$SO_VERSION"; then
        DLL_SUFFIX=".so.$SO_VERSION"
    else
        DLL_SUFFIX=".so.1.0"
    fi
    if test -z "$X11BASE"; then
        X11BASE=/usr/X11R6
    fi
    MOZ_FIX_LINK_PATHS="$MOZ_FIX_LINK_PATHS -Wl,-rpath-link,${X11BASE}/lib"
    DSO_CFLAGS=''
    DSO_PIC_CFLAGS='-fPIC'
    DSO_LDOPTS='-shared -fPIC'
    if test "$LIBRUNPATH"; then
        DSO_LDOPTS="-R$LIBRUNPATH $DSO_LDOPTS"
    fi
    ;;

esac







if test -n "$MOZ_LINKER"; then
  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_LINKER ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_LINKER 1
EOF

fi

cat >> confdefs.pytmp <<EOF
    (''' D_INO ''', r''' $DIRENT_INO ''')
EOF
cat >> confdefs.h <<EOF
#define D_INO $DIRENT_INO
EOF


case "$target" in
    *-linux*|*-kfreebsd*-gnu|*-gnu*)
        MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
        ;;
    *-darwin*)
        MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,-exported_symbols_list -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-export-list'
        ;;
    *-mingw*)
        if test -n "$GNU_CC"; then
           MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
        fi
        ;;
esac

if test -z "$COMPILE_ENVIRONMENT"; then
    SKIP_COMPILER_CHECKS=1
    SKIP_LIBRARY_CHECKS=1
    PKG_SKIP_STRIP=1
else
    
  
if test -z "$MOZ_DEBUG_FLAGS"; then
  if test -n "$_MSC_VER"; then
    MOZ_DEBUG_FLAGS="-Zi"
  else
    MOZ_DEBUG_FLAGS="-g"
  fi
fi



# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
  enableval="$enable_debug"
   if test "$enableval" != "no"; then
    MOZ_DEBUG=1
    if test -n "$enableval" -a "$enableval" != "yes"; then
        MOZ_DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
        _MOZ_DEBUG_FLAGS_SET=1
    fi
  else
    MOZ_DEBUG=
  fi 
else
  MOZ_DEBUG=
fi


if test -z "$MOZ_DEBUG" -o -n "$MOZ_ASAN"; then
    MOZ_NO_DEBUG_RTL=1
fi



MOZ_DEBUG_ENABLE_DEFS="DEBUG TRACING"
# Check whether --with-debug-label or --without-debug-label was given.
if test "${with_debug_label+set}" = set; then
  withval="$with_debug_label"
   for option in `echo $withval | sed 's/,/ /g'`; do
    MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS DEBUG_${option}"
done
fi


if test -n "$MOZ_DEBUG"; then
    echo $ac_n "checking for valid debug flags""... $ac_c" 1>&6
echo "configure:8925: checking for valid debug flags" >&5
    _SAVE_CFLAGS=$CFLAGS
    CFLAGS="$CFLAGS $MOZ_DEBUG_FLAGS"
    cat > conftest.$ac_ext <<EOF
#line 8929 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
printf("Hello World\n");
; return 0; }
EOF
if { (eval echo configure:8936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  _results=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  _results=no
fi
rm -f conftest*
    echo "$ac_t""$_results" 1>&6
    if test "$_results" = "no"; then
        { echo "configure: error: These compiler flags are invalid: $MOZ_DEBUG_FLAGS" 1>&2; echo "configure: error: These compiler flags are invalid: $MOZ_DEBUG_FLAGS" 1>&5; exit 1; }
    fi
    CFLAGS=$_SAVE_CFLAGS

    MOZ_DEBUG_DEFINES="$MOZ_DEBUG_ENABLE_DEFS"
else
    MOZ_DEBUG_DEFINES="NDEBUG TRIMMED"
fi



# Check whether --enable-debug-symbols or --disable-debug-symbols was given.
if test "${enable_debug_symbols+set}" = set; then
  enableval="$enable_debug_symbols"
   if test "$enableval" != "no"; then
      MOZ_DEBUG_SYMBOLS=1
      if test -n "$enableval" -a "$enableval" != "yes"; then
          if test -z "$_MOZ_DEBUG_FLAGS_SET"; then
              MOZ_DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
          else
              { echo "configure: error: --enable-debug-symbols flags cannot be used with --enable-debug flags" 1>&2; echo "configure: error: --enable-debug-symbols flags cannot be used with --enable-debug flags" 1>&5; exit 1; }
          fi
      fi
  else
      MOZ_DEBUG_SYMBOLS=
  fi 
else
  MOZ_DEBUG_SYMBOLS=1
fi


if test -n "$MOZ_DEBUG" -o -n "$MOZ_DEBUG_SYMBOLS"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_DEBUG_SYMBOLS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_DEBUG_SYMBOLS 1
EOF

    export MOZ_DEBUG_SYMBOLS
fi


  
# Check whether --enable-cpp-rtti or --disable-cpp-rtti was given.
if test "${enable_cpp_rtti+set}" = set; then
  enableval="$enable_cpp_rtti"
  if test "$enableval" = "yes"; then
     _MOZ_USE_RTTI=1 
  elif test "$enableval" = "no"; then
     _MOZ_USE_RTTI= 
  else
    { echo "configure: error: Option, cpp-rtti, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, cpp-rtti, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -z "$_MOZ_USE_RTTI"; then
    if test "$GNU_CC"; then
        CXXFLAGS="$CXXFLAGS -fno-rtti"
    else
        case "$target" in
        *-mingw*)
            CXXFLAGS="$CXXFLAGS -GR-"
        esac
    fi
fi

if test "$CLANG_CXX"; then
    ## We disable return-type-c-linkage because jsval is defined as a C++ type but is
    ## returned by C functions. This is possible because we use knowledge about the ABI
    ## to typedef it to a C type with the same layout when the headers are included
    ## from C.
    _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-unknown-warning-option -Wno-return-type-c-linkage"
fi

echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) actually is a C++ compiler""... $ac_c" 1>&6
echo "configure:9025: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) actually is a C++ compiler" >&5

ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

_SAVE_LIBS=$LIBS
LIBS=
cat > conftest.$ac_ext <<EOF
#line 9037 "configure"
#include "confdefs.h"
#include <new>
int main() {
int *foo = new int;
; return 0; }
EOF
if { (eval echo configure:9044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
            { echo "configure: error: $CXX $CXXFLAGS $LDFLAGS failed to compile and link a simple C++ source." 1>&2; echo "configure: error: $CXX $CXXFLAGS $LDFLAGS failed to compile and link a simple C++ source." 1>&5; exit 1; }
fi
rm -f conftest*
LIBS=$_SAVE_LIBS
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

echo "$ac_t""yes" 1>&6

if test -n "$DEVELOPER_OPTIONS"; then
    MOZ_FORCE_GOLD=1
fi

# Check whether --enable-gold or --disable-gold was given.
if test "${enable_gold+set}" = set; then
  enableval="$enable_gold"
  if test "$enableval" = "yes"; then
    MOZ_FORCE_GOLD=1
  elif test "$enableval" = "no"; then
    MOZ_FORCE_GOLD=
    
  else
    { echo "configure: error: Option, gold, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, gold, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test "$GNU_CC" -a -n "$MOZ_FORCE_GOLD"; then
            if $CC -Wl,--version 2>&1 | grep -q "GNU ld"; then
        GOLD=$($CC -print-prog-name=ld.gold)
        case "$GOLD" in
        /*)
            ;;
        *)
            GOLD=$(which $GOLD)
            ;;
        esac
        if test -n "$GOLD"; then
            mkdir -p $_objdir/build/unix/gold
            rm -f $_objdir/build/unix/gold/ld
            ln -s "$GOLD" $_objdir/build/unix/gold/ld
            if $CC -B $_objdir/build/unix/gold -Wl,--version 2>&1 | grep -q "GNU gold"; then
                LDFLAGS="$LDFLAGS -B $_objdir/build/unix/gold"
            else
                rm -rf $_objdir/build/unix/gold
            fi
        fi
    fi
fi
if test "$GNU_CC"; then
    if $CC $LDFLAGS -Wl,--version 2>&1 | grep -q "GNU ld"; then
        LD_IS_BFD=1
    fi
fi



if test "$GNU_CC"; then
    if test -z "$DEVELOPER_OPTIONS"; then
        CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"
        CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections"
    fi
    CFLAGS="$CFLAGS -fno-math-errno"
    CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-math-errno"
fi


# Check whether --enable-icf or --disable-icf was given.
if test "${enable_icf+set}" = set; then
  enableval="$enable_icf"
  if test "$enableval" = "no"; then
    MOZ_DISABLE_ICF=1
  elif test "$enableval" = "yes"; then
    MOZ_DISABLE_ICF= 
  else
    { echo "configure: error: Option, icf, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, icf, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -a -z "$MOZ_DISABLE_ICF" -a -z "$DEVELOPER_OPTIONS"; then
    echo $ac_n "checking whether the linker supports Identical Code Folding""... $ac_c" 1>&6
echo "configure:9137: checking whether the linker supports Identical Code Folding" >&5
if eval "test \"`echo '$''{'LD_SUPPORTS_ICF'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'int foo() {return 42;}' \
              'int bar() {return 42;}' \
              'int main() {return foo() - bar();}' > conftest.${ac_ext}
        # If the linker supports ICF, foo and bar symbols will have
        # the same address
        if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS -Wl,--icf=safe -ffunction-sections conftest.${ac_ext} $LIBS 1>&2'; { (eval echo configure:9146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } &&
           test -s conftest${ac_exeext} &&
           objdump -t conftest${ac_exeext} | awk '{a[$6] = $1} END {if (a["foo"] && (a["foo"] != a["bar"])) { exit 1 }}'; then
            LD_SUPPORTS_ICF=yes
        else
            LD_SUPPORTS_ICF=no
        fi
        rm -rf conftest*
fi

echo "$ac_t""$LD_SUPPORTS_ICF" 1>&6
    if test "$LD_SUPPORTS_ICF" = yes; then
        _SAVE_LDFLAGS="$LDFLAGS -Wl,--icf=safe"
        LDFLAGS="$LDFLAGS -Wl,--icf=safe -Wl,--print-icf-sections"
        cat > conftest.$ac_ext <<EOF
#line 9161 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:9168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  LD_PRINT_ICF_SECTIONS=-Wl,--print-icf-sections
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  LD_PRINT_ICF_SECTIONS=
fi
rm -f conftest*
        
        LDFLAGS="$_SAVE_LDFLAGS"
    fi
fi


if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -a -z "$DEVELOPER_OPTIONS"; then
    if test -n "$MOZ_DEBUG_FLAGS"; then
                echo $ac_n "checking whether removing dead symbols breaks debugging""... $ac_c" 1>&6
echo "configure:9187: checking whether removing dead symbols breaks debugging" >&5
if eval "test \"`echo '$''{'GC_SECTIONS_BREAKS_DEBUG_RANGES'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'int foo() {return 42;}' \
                  'int bar() {return 1;}' \
                  'int main() {return foo();}' > conftest.${ac_ext}
            if { ac_try='${CC-cc} -o conftest.${ac_objext} $CFLAGS $MOZ_DEBUG_FLAGS -c conftest.${ac_ext} 1>&2'; { (eval echo configure:9194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } &&
                { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS $MOZ_DEBUG_FLAGS -Wl,--gc-sections conftest.${ac_objext} $LIBS 1>&2'; { (eval echo configure:9195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } &&
                test -s conftest${ac_exeext} -a -s conftest.${ac_objext}; then
                 if test "`$PYTHON -m mozbuild.configure.check_debug_ranges conftest.${ac_objext} conftest.${ac_ext}`" = \
                         "`$PYTHON -m mozbuild.configure.check_debug_ranges conftest${ac_exeext} conftest.${ac_ext}`"; then
                     GC_SECTIONS_BREAKS_DEBUG_RANGES=no
                 else
                     GC_SECTIONS_BREAKS_DEBUG_RANGES=yes
                 fi
             else
                                    GC_SECTIONS_BREAKS_DEBUG_RANGES="no, but it's broken in some other way"
             fi
             rm -rf conftest*
fi

echo "$ac_t""$GC_SECTIONS_BREAKS_DEBUG_RANGES" 1>&6
         if test "$GC_SECTIONS_BREAKS_DEBUG_RANGES" = no; then
             DSO_LDOPTS="$DSO_LDOPTS -Wl,--gc-sections"
         fi
    else
        DSO_LDOPTS="$DSO_LDOPTS -Wl,--gc-sections"
    fi
fi

# bionic in Android < 4.1 doesn't support PIE
# On OSX, the linker defaults to building PIE programs when targetting OSX 10.7+,
# but not when targetting OSX < 10.7. OSX < 10.7 doesn't support running PIE
# programs, so as long as support for OSX 10.6 is kept, we can't build PIE.
# Even after dropping 10.6 support, MOZ_PIE would not be useful since it's the
# default (and clang says the -pie option is not used).
# On other Unix systems, some file managers (Nautilus) can't start PIE programs
if test -n "$gonkdir" && test "$ANDROID_VERSION" -ge 16; then
    MOZ_PIE=1
else
    MOZ_PIE=
fi

# Check whether --enable-pie or --disable-pie was given.
if test "${enable_pie+set}" = set; then
  enableval="$enable_pie"
  if test "$enableval" = "yes"; then
    MOZ_PIE=1
  elif test "$enableval" = "no"; then
    MOZ_PIE= 
  else
    { echo "configure: error: Option, pie, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, pie, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test "$GNU_CC" -a -n "$MOZ_PIE"; then
    echo $ac_n "checking for PIE support""... $ac_c" 1>&6
echo "configure:9246: checking for PIE support" >&5
    _SAVE_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS -pie"
    cat > conftest.$ac_ext <<EOF
#line 9250 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:9257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
                  MOZ_PROGRAM_LDFLAGS="$MOZ_PROGRAM_LDFLAGS -pie"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
                  { echo "configure: error: --enable-pie requires PIE support from the linker." 1>&2; echo "configure: error: --enable-pie requires PIE support from the linker." 1>&5; exit 1; }
fi
rm -f conftest*
    LDFLAGS=$_SAVE_LDFLAGS
fi



if test -n "$GCC_USE_GNU_LD"; then
  case "$LDFLAGS" in
  *-fsanitize=address*)
    LDFLAGS="$LDFLAGS -Wl,-Bsymbolic"
    ;;
  esac
fi


fi # COMPILE_ENVIRONMENT

if test -z "$SKIP_COMPILER_CHECKS"; then
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:9287: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 9292 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:9300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 9317 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "memchr" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 9335 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "free" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
#line 9356 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int main () { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }

EOF
if { (eval echo configure:9367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
fi
rm -fr conftest*
fi

fi
fi

echo "$ac_t""$ac_cv_header_stdc" 1>&6
if test $ac_cv_header_stdc = yes; then
  cat >> confdefs.pytmp <<\EOF
    (''' STDC_HEADERS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define STDC_HEADERS 1
EOF

fi

echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:9394: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 9399 "configure"
#include "confdefs.h"

int main() {

/* Ultrix mips cc rejects this.  */
typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this.  */
char const *const *ccp;
char **p;
/* NEC SVR4.0.2 mips cc rejects this.  */
struct point {int x, y;};
static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
   It does not let you subtract one const X* pointer from another in an arm
   of an if-expression whose if-part is not a constant expression */
const char *g = "string";
ccp = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++ccp;
p = (char**) ccp;
ccp = (char const *const *) p;
{ /* SCO 3.2v4 cc rejects this.  */
  char *t;
  char const *s = 0 ? (char *) 0 : (char const *) 0;

  *t++ = 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  int x[] = {25, 17};
  const int *foo = &x[0];
  ++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  typedef const int *iptr;
  iptr p = 0;
  ++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  struct s { int j; const int *ap[3]; };
  struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  const int foo = 10;
}

; return 0; }
EOF
if { (eval echo configure:9448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_const=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_const=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
  cat >> confdefs.pytmp <<\EOF
    (''' const ''', r'''  ''')
EOF
cat >> confdefs.h <<\EOF
#define const 
EOF

fi

echo $ac_n "checking for mode_t""... $ac_c" 1>&6
echo "configure:9472: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 9477 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_mode_t=yes
else
  rm -rf conftest*
  ac_cv_type_mode_t=no
fi
rm -f conftest*

fi
echo "$ac_t""$ac_cv_type_mode_t" 1>&6
if test $ac_cv_type_mode_t = no; then
  cat >> confdefs.pytmp <<\EOF
    (''' mode_t ''', r''' int ''')
EOF
cat >> confdefs.h <<\EOF
#define mode_t int
EOF

fi

echo $ac_n "checking for off_t""... $ac_c" 1>&6
echo "configure:9508: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 9513 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_off_t=yes
else
  rm -rf conftest*
  ac_cv_type_off_t=no
fi
rm -f conftest*

fi
echo "$ac_t""$ac_cv_type_off_t" 1>&6
if test $ac_cv_type_off_t = no; then
  cat >> confdefs.pytmp <<\EOF
    (''' off_t ''', r''' long ''')
EOF
cat >> confdefs.h <<\EOF
#define off_t long
EOF

fi

echo $ac_n "checking for pid_t""... $ac_c" 1>&6
echo "configure:9544: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 9549 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_pid_t=yes
else
  rm -rf conftest*
  ac_cv_type_pid_t=no
fi
rm -f conftest*

fi
echo "$ac_t""$ac_cv_type_pid_t" 1>&6
if test $ac_cv_type_pid_t = no; then
  cat >> confdefs.pytmp <<\EOF
    (''' pid_t ''', r''' int ''')
EOF
cat >> confdefs.h <<\EOF
#define pid_t int
EOF

fi

echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:9580: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 9585 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_size_t=yes
else
  rm -rf conftest*
  ac_cv_type_size_t=no
fi
rm -f conftest*

fi
echo "$ac_t""$ac_cv_type_size_t" 1>&6
if test $ac_cv_type_size_t = no; then
  cat >> confdefs.pytmp <<\EOF
    (''' size_t ''', r''' unsigned ''')
EOF
cat >> confdefs.h <<\EOF
#define size_t unsigned
EOF

fi

ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross


ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross



ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

if test "$GNU_CXX"; then
    echo $ac_n "checking whether 64-bits std::atomic requires -latomic""... $ac_c" 1>&6
echo "configure:9648: checking whether 64-bits std::atomic requires -latomic" >&5
if eval "test \"`echo '$''{'ac_cv_needs_atomic'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 9653 "configure"
#include "confdefs.h"
#include <cstdint>
             #include <atomic>
int main() {
 std::atomic<uint64_t> foo; foo = 1; 
; return 0; }
EOF
if { (eval echo configure:9661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_needs_atomic=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  _SAVE_LIBS="$LIBS"
            LIBS="$LIBS -latomic"
            cat > conftest.$ac_ext <<EOF
#line 9671 "configure"
#include "confdefs.h"
#include <cstdint>
                 #include <atomic>
int main() {
 std::atomic<uint64_t> foo; foo = 1; 
; return 0; }
EOF
if { (eval echo configure:9679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_needs_atomic=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_needs_atomic="do not know; assuming no"
fi
rm -f conftest*
            LIBS="$_SAVE_LIBS"
        
fi
rm -f conftest*
    
fi

echo "$ac_t""$ac_cv_needs_atomic" 1>&6
    if test "$ac_cv_needs_atomic" = yes; then
      MOZ_NEEDS_LIBATOMIC=1
    else
      MOZ_NEEDS_LIBATOMIC=
    fi
    
fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross



ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross


if test "$GNU_CC" -a "$OS_TARGET" != WINNT; then
  cat >> confdefs.pytmp <<\EOF
    (''' HAVE_VISIBILITY_HIDDEN_ATTRIBUTE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1
EOF

  cat >> confdefs.pytmp <<\EOF
    (''' HAVE_VISIBILITY_ATTRIBUTE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_VISIBILITY_ATTRIBUTE 1
EOF

  case "$OS_TARGET" in
  Darwin)
    VISIBILITY_FLAGS='-fvisibility=hidden -fvisibility-inlines-hidden'
    ;;
  *)
    VISIBILITY_FLAGS="-I${DIST}/system_wrappers -include ${_topsrcdir}/config/gcc_hidden.h"
    WRAP_SYSTEM_INCLUDES=1
    ;;
  esac
fi         # GNU_CC

case "${OS_TARGET}" in
Darwin)
  ;;
*)
  STL_FLAGS="-I${DIST}/stl_wrappers"
  WRAP_STL_INCLUDES=1
  ;;
esac




ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
echo "configure:9764: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 9769 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
int main() {
DIR *dirp = 0;
; return 0; }
EOF
if { (eval echo configure:9777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_dirent_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_dirent_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 ac_header_dirent=$ac_hdr; break
else
  echo "$ac_t""no" 1>&6
fi
done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
echo "configure:9805: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ldir  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 9813 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char opendir();

int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:9824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LIBS="$LIBS -ldir"
else
  echo "$ac_t""no" 1>&6
fi

else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
echo "configure:9846: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lx  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 9854 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char opendir();

int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:9865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LIBS="$LIBS -lx"
else
  echo "$ac_t""no" 1>&6
fi

fi

case "$target_os" in
bitrig*|dragonfly*|freebsd*|openbsd*)
# for stuff like -lXshm
    CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}"
    ;;
esac
 for ac_hdr in sys/byteorder.h compat.h getopt.h sys/bitypes.h \
        memory.h unistd.h gnu/libc-version.h nl_types.h malloc.h \
        X11/XKBlib.h io.h cpuid.h
  do
       ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:9899: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 9904 "configure"
#include "confdefs.h"

#include <$ac_hdr>
int main() {

; return 0; }
EOF
if { (eval echo configure:9912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
                       cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
  else
    echo "$ac_t""no" 1>&6
    
  fi

  done



 for ac_hdr in sys/statvfs.h sys/statfs.h sys/vfs.h sys/mount.h
  do
       ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:9947: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 9952 "configure"
#include "confdefs.h"

#include <$ac_hdr>
int main() {

; return 0; }
EOF
if { (eval echo configure:9960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
                       cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
  else
    echo "$ac_t""no" 1>&6
    
  fi

  done


 for ac_hdr in sys/quota.h sys/sysmacros.h
  do
       ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:9994: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 9999 "configure"
#include "confdefs.h"

#include <$ac_hdr>
int main() {

; return 0; }
EOF
if { (eval echo configure:10007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
                       cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
  else
    echo "$ac_t""no" 1>&6
    
  fi

  done

 for ac_hdr in linux/quota.h
  do
       ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:10040: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 10045 "configure"
#include "confdefs.h"
#include <sys/socket.h>
#include <$ac_hdr>
int main() {

; return 0; }
EOF
if { (eval echo configure:10053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
                       cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
  else
    echo "$ac_t""no" 1>&6
    
  fi

  done


 for ac_hdr in linux/if_addr.h linux/rtnetlink.h
  do
       ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:10087: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 10092 "configure"
#include "confdefs.h"
#include <sys/socket.h>
#include <$ac_hdr>
int main() {

; return 0; }
EOF
if { (eval echo configure:10100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
                       cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
  else
    echo "$ac_t""no" 1>&6
    
  fi

  done

 for ac_hdr in sys/queue.h
  do
       ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:10133: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 10138 "configure"
#include "confdefs.h"

#include <$ac_hdr>
int main() {

; return 0; }
EOF
if { (eval echo configure:10146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
                       cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
  else
    echo "$ac_t""no" 1>&6
    
  fi

  done


 for ac_hdr in sys/types.h netinet/in.h byteswap.h
  do
       ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:10180: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 10185 "configure"
#include "confdefs.h"

#include <$ac_hdr>
int main() {

; return 0; }
EOF
if { (eval echo configure:10193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
                       cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
  else
    echo "$ac_t""no" 1>&6
    
  fi

  done


echo $ac_n "checking for sockaddr_in.sin_len""... $ac_c" 1>&6
echo "configure:10224: checking for sockaddr_in.sin_len" >&5
if eval "test \"`echo '$''{'ac_cv_sockaddr_in_sin_len'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 10229 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
                                    #include <sys/types.h>
                                    #endif
                                    #include <netinet/in.h>
                                    struct sockaddr_in x;
                                    void *foo = (void*) &x.sin_len;
int main() {

; return 0; }
EOF
if { (eval echo configure:10241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_sockaddr_in_sin_len=true
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_sockaddr_in_sin_len=false
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_sockaddr_in_sin_len" 1>&6
if test "$ac_cv_sockaddr_in_sin_len" = true ; then
  cat >> confdefs.pytmp <<\EOF
    (''' HAVE_SIN_LEN ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_SIN_LEN 1
EOF

  cat >> confdefs.pytmp <<\EOF
    (''' HAVE_SCONN_LEN ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_SCONN_LEN 1
EOF

fi

echo $ac_n "checking for sockaddr_in6.sin6_len""... $ac_c" 1>&6
echo "configure:10272: checking for sockaddr_in6.sin6_len" >&5
if eval "test \"`echo '$''{'ac_cv_sockaddr_in6_sin6_len'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 10277 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
                                #include <sys/types.h>
                                #endif
                                #include <netinet/in.h>
                                struct sockaddr_in6 x;
                                void *foo = (void*) &x.sin6_len;
int main() {

; return 0; }
EOF
if { (eval echo configure:10289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_sockaddr_in6_sin6_len=true
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_sockaddr_in6_sin6_len=false
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_sockaddr_in6_sin6_len" 1>&6
if test "$ac_cv_sockaddr_in6_sin6_len" = true ; then
  cat >> confdefs.pytmp <<\EOF
    (''' HAVE_SIN6_LEN ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_SIN6_LEN 1
EOF

fi

echo $ac_n "checking for sockaddr.sa_len""... $ac_c" 1>&6
echo "configure:10313: checking for sockaddr.sa_len" >&5
if eval "test \"`echo '$''{'ac_cv_sockaddr_sa_len'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 10318 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
                                #include <sys/types.h>
                                #endif
                                #include <sys/socket.h>
                                struct sockaddr x;
                                void *foo = (void*) &x.sa_len;
int main() {

; return 0; }
EOF
if { (eval echo configure:10330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_sockaddr_sa_len=true
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_sockaddr_sa_len=false
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_sockaddr_sa_len" 1>&6
if test "$ac_cv_sockaddr_sa_len" = true ; then
  cat >> confdefs.pytmp <<\EOF
    (''' HAVE_SA_LEN ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_SA_LEN 1
EOF

fi

# Check whether --enable-dtrace or --disable-dtrace was given.
if test "${enable_dtrace+set}" = set; then
  enableval="$enable_dtrace"
  if test "$enableval" = "yes"; then
    enable_dtrace="yes"
  elif test "$enableval" = "no"; then
    :
  else
    { echo "configure: error: Option, dtrace, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, dtrace, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test "x$enable_dtrace" = "xyes"; then
     ac_safe=`echo "sys/sdt.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for sys/sdt.h""... $ac_c" 1>&6
echo "configure:10368: checking for sys/sdt.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 10373 "configure"
#include "confdefs.h"

#include <sys/sdt.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:10381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    HAVE_DTRACE=1
  else
    echo "$ac_t""no" 1>&6
    
  fi

  if test -n "$HAVE_DTRACE"; then
      cat >> confdefs.pytmp <<\EOF
    (''' INCLUDE_MOZILLA_DTRACE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define INCLUDE_MOZILLA_DTRACE 1
EOF

  else
      { echo "configure: error: dtrace enabled but sys/sdt.h not found" 1>&2; echo "configure: error: dtrace enabled but sys/sdt.h not found" 1>&5; exit 1; };
  fi
fi




# Check whether --with-linux-headers or --without-linux-headers was given.
if test "${with_linux_headers+set}" = set; then
  withval="$with_linux_headers"
  linux_headers=$withval
fi


LINUX_HEADERS_INCLUDES=

if test "$linux_headers"; then
    LINUX_HEADERS_INCLUDES="-I$linux_headers"
fi

_SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $LINUX_HEADERS_INCLUDES"

   ac_safe=`echo "linux/perf_event.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for linux/perf_event.h""... $ac_c" 1>&6
echo "configure:10435: checking for linux/perf_event.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 10440 "configure"
#include "confdefs.h"

#include <linux/perf_event.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:10448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    echo $ac_n "checking for perf_event_open system call""... $ac_c" 1>&6
echo "configure:10463: checking for perf_event_open system call" >&5
if eval "test \"`echo '$''{'ac_cv_perf_event_open'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 10468 "configure"
#include "confdefs.h"
#include <asm/unistd.h>
int main() {
return sizeof(__NR_perf_event_open);
; return 0; }
EOF
if { (eval echo configure:10475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_perf_event_open=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_perf_event_open=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_perf_event_open" 1>&6
  else
    echo "$ac_t""no" 1>&6
    
  fi

if test "$ac_cv_perf_event_open" = "yes"; then
    HAVE_LINUX_PERF_EVENT_H=1
else
    HAVE_LINUX_PERF_EVENT_H=
    LINUX_HEADERS_INCLUDES=
fi



CFLAGS="$_SAVE_CFLAGS"



echo $ac_n "checking for gethostbyname_r in -lc_r""... $ac_c" 1>&6
echo "configure:10507: checking for gethostbyname_r in -lc_r" >&5
ac_lib_var=`echo c_r'_'gethostbyname_r | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lc_r  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 10515 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gethostbyname_r();

int main() {
gethostbyname_r()
; return 0; }
EOF
if { (eval echo configure:10526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo c_r | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_lib ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lc_r $LIBS"

else
  echo "$ac_t""no" 1>&6
fi


case $target in
*-darwin*)
    ;;
*)
    
echo $ac_n "checking for library containing dlopen""... $ac_c" 1>&6
echo "configure:10563: checking for library containing dlopen" >&5
if eval "test \"`echo '$''{'ac_cv_search_dlopen'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_func_search_save_LIBS="$LIBS"
ac_cv_search_dlopen="no"
cat > conftest.$ac_ext <<EOF
#line 10570 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dlopen();

int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:10581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_dlopen="none required"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
test "$ac_cv_search_dlopen" = "no" && for i in dl; do
LIBS="-l$i  $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 10592 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dlopen();

int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:10603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_dlopen="-l$i"
break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
LIBS="$ac_func_search_save_LIBS"
fi

echo "$ac_t""$ac_cv_search_dlopen" 1>&6
if test "$ac_cv_search_dlopen" != "no"; then
  test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS"
     ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
echo "configure:10621: checking for dlfcn.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 10626 "configure"
#include "confdefs.h"

#include <dlfcn.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:10634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    cat >> confdefs.pytmp <<\EOF
    (''' HAVE_DLOPEN ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_DLOPEN 1
EOF

  else
    echo "$ac_t""no" 1>&6
    
  fi

else :
  
fi
    ;;
esac

_SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -D_GNU_SOURCE"
for ac_func in dladdr memmem
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:10671: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 10676 "configure"
#define $ac_func innocuous_$ac_func
#include "confdefs.h"
#undef $ac_func
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#define $ac_func innocuous_$ac_func
#include <assert.h>
#undef $ac_func
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:10703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_func ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

CFLAGS="$_SAVE_CFLAGS"

if test ! "$GNU_CXX"; then
    echo $ac_n "checking for demangle in -lC""... $ac_c" 1>&6
echo "configure:10734: checking for demangle in -lC" >&5
ac_lib_var=`echo C'_'demangle | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lC  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 10742 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char demangle();

int main() {
demangle()
; return 0; }
EOF
if { (eval echo configure:10753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo C | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_lib ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lC $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

fi

echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
echo "configure:10786: checking for socket in -lsocket" >&5
ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lsocket  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 10794 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char socket();

int main() {
socket()
; return 0; }
EOF
if { (eval echo configure:10805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_lib ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lsocket $LIBS"

else
  echo "$ac_t""no" 1>&6
fi


XLDFLAGS="$X_LIBS"
XLIBS="$X_EXTRA_LIBS"

if test -n "$MOZ_X11"; then
    cat >> confdefs.pytmp <<EOF
    (''' FUNCPROTO ''', r''' 15 ''')
EOF
cat >> confdefs.h <<EOF
#define FUNCPROTO 15
EOF

    XLIBS="-lX11 $XLIBS"
    _SAVE_LDFLAGS="$LDFLAGS"
    LDFLAGS="$XLDFLAGS $LDFLAGS"
    echo $ac_n "checking for XDrawLines in -lX11""... $ac_c" 1>&6
echo "configure:10851: checking for XDrawLines in -lX11" >&5
ac_lib_var=`echo X11'_'XDrawLines | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lX11 $XLIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 10859 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char XDrawLines();

int main() {
XDrawLines()
; return 0; }
EOF
if { (eval echo configure:10870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X11_LIBS="-lX11"
else
  echo "$ac_t""no" 1>&6
MISSING_X="$MISSING_X -lX11"
fi

    echo $ac_n "checking for XextAddDisplay in -lXext""... $ac_c" 1>&6
echo "configure:10892: checking for XextAddDisplay in -lXext" >&5
ac_lib_var=`echo Xext'_'XextAddDisplay | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lXext $XLIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 10900 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char XextAddDisplay();

int main() {
XextAddDisplay()
; return 0; }
EOF
if { (eval echo configure:10911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  XEXT_LIBS="-lXext"
else
  echo "$ac_t""no" 1>&6
MISSING_X="$MISSING_X -lXext"
fi


    if test "$MOZ_WIDGET_TOOLKIT" != qt; then
    echo $ac_n "checking for XtFree in -lXt""... $ac_c" 1>&6
echo "configure:10935: checking for XtFree in -lXt" >&5
ac_lib_var=`echo Xt'_'XtFree | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lXt  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 10943 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char XtFree();

int main() {
XtFree()
; return 0; }
EOF
if { (eval echo configure:10954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
   XT_LIBS="-lXt"
else
  echo "$ac_t""no" 1>&6

        unset ac_cv_lib_Xt_XtFree
        echo $ac_n "checking for IceFlush in -lICE""... $ac_c" 1>&6
echo "configure:10975: checking for IceFlush in -lICE" >&5
ac_lib_var=`echo ICE'_'IceFlush | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lICE $XT_LIBS $XLIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 10983 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char IceFlush();

int main() {
IceFlush()
; return 0; }
EOF
if { (eval echo configure:10994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  XT_LIBS="-lICE $XT_LIBS"
else
  echo "$ac_t""no" 1>&6
fi

        echo $ac_n "checking for SmcCloseConnection in -lSM""... $ac_c" 1>&6
echo "configure:11015: checking for SmcCloseConnection in -lSM" >&5
ac_lib_var=`echo SM'_'SmcCloseConnection | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lSM $XT_LIBS $XLIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11023 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char SmcCloseConnection();

int main() {
SmcCloseConnection()
; return 0; }
EOF
if { (eval echo configure:11034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  XT_LIBS="-lSM $XT_LIBS"
else
  echo "$ac_t""no" 1>&6
fi

        echo $ac_n "checking for XtFree in -lXt""... $ac_c" 1>&6
echo "configure:11055: checking for XtFree in -lXt" >&5
ac_lib_var=`echo Xt'_'XtFree | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lXt $X_PRE_LIBS $XT_LIBS $XLIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11063 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char XtFree();

int main() {
XtFree()
; return 0; }
EOF
if { (eval echo configure:11074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
   XT_LIBS="-lXt $XT_LIBS"
else
  echo "$ac_t""no" 1>&6
MISSING_X="$MISSING_X -lXt"
fi

        
fi

    fi

                echo $ac_n "checking for XShmCreateImage in -lXext""... $ac_c" 1>&6
echo "configure:11101: checking for XShmCreateImage in -lXext" >&5
ac_lib_var=`echo Xext'_'XShmCreateImage | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lXext $XLIBS $XEXT_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11109 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char XShmCreateImage();

int main() {
XShmCreateImage()
; return 0; }
EOF
if { (eval echo configure:11120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  _HAVE_XSHM_XEXT=1
else
  echo "$ac_t""no" 1>&6
fi


                   ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
echo "configure:11143: checking for X11/extensions/scrnsaver.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 11148 "configure"
#include "confdefs.h"

#include <X11/extensions/scrnsaver.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:11156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    echo $ac_n "checking for XScreenSaverQueryInfo in -lXss""... $ac_c" 1>&6
echo "configure:11171: checking for XScreenSaverQueryInfo in -lXss" >&5
ac_lib_var=`echo Xss'_'XScreenSaverQueryInfo | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lXss $XEXT_LIBS $XLIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11179 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char XScreenSaverQueryInfo();

int main() {
XScreenSaverQueryInfo()
; return 0; }
EOF
if { (eval echo configure:11190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  XSS_LIBS="-lXss $XEXT_LIBS $XLIBS"
             cat >> confdefs.pytmp <<\EOF
    (''' HAVE_LIBXSS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_LIBXSS 1
EOF

else
  echo "$ac_t""no" 1>&6
fi

  else
    echo "$ac_t""no" 1>&6
    
  fi


    LDFLAGS="$_SAVE_LDFLAGS"
fi # $MOZ_X11








case "$target_os" in
darwin*)
    MOZ_USE_PTHREADS=1
    ;;
*)
    echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
echo "configure:11239: checking for pthread_create in -lpthreads" >&5
ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lpthreads  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11247 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pthread_create();

int main() {
pthread_create()
; return 0; }
EOF
if { (eval echo configure:11258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  MOZ_USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
echo "configure:11277: checking for pthread_create in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lpthread  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11285 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pthread_create();

int main() {
pthread_create()
; return 0; }
EOF
if { (eval echo configure:11296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  MOZ_USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
echo "configure:11315: checking for pthread_create in -lc_r" >&5
ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lc_r  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11323 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pthread_create();

int main() {
pthread_create()
; return 0; }
EOF
if { (eval echo configure:11334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  MOZ_USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
echo "configure:11353: checking for pthread_create in -lc" >&5
ac_lib_var=`echo c'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lc  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11361 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pthread_create();

int main() {
pthread_create()
; return 0; }
EOF
if { (eval echo configure:11372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  MOZ_USE_PTHREADS=1
                
else
  echo "$ac_t""no" 1>&6
fi

            
fi

        
fi

    
fi

    ;;
esac

# Check whether --with-pthreads or --without-pthreads was given.
if test "${with_pthreads+set}" = set; then
  withval="$with_pthreads"
  if test "$withval" = "yes"; then
     if test "$MOZ_USE_PTHREADS"x = x; then
    { echo "configure: error:  --with-pthreads specified for a system without pthread support " 1>&2; echo "configure: error:  --with-pthreads specified for a system without pthread support " 1>&5; exit 1; };
fi
  elif test "$withval" = "no"; then
    MOZ_USE_PTHREADS=
    _PTHREAD_LDFLAGS=

  else
    { echo "configure: error: Option, pthreads, does not take an argument ($withval)." 1>&2; echo "configure: error: Option, pthreads, does not take an argument ($withval)." 1>&5; exit 1; }
  fi
fi


if test "$MOZ_USE_PTHREADS"x != x
then
                rm -f conftest*
    ac_cv_have_dash_pthread=no
    echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
echo "configure:11427: checking whether ${CC-cc} accepts -pthread" >&5
    echo 'int main() { return 0; }' | cat > conftest.c
    ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
    if test $? -eq 0; then
        if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" -a -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
            ac_cv_have_dash_pthread=yes
            case "$target_os" in
            freebsd*)
# Freebsd doesn't use -pthread for compiles, it uses them for linking
                ;;
            *)
                CFLAGS="$CFLAGS -pthread"
                CXXFLAGS="$CXXFLAGS -pthread"
                ;;
            esac
        fi
    fi
    rm -f conftest*
    echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6

                ac_cv_have_dash_pthreads=no
    if test "$ac_cv_have_dash_pthread" = "no"; then
        echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
echo "configure:11450: checking whether ${CC-cc} accepts -pthreads" >&5
        echo 'int main() { return 0; }' | cat > conftest.c
        ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
        if test $? -eq 0; then
            if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" -a -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
                ac_cv_have_dash_pthreads=yes
                CFLAGS="$CFLAGS -pthreads"
                CXXFLAGS="$CXXFLAGS -pthreads"
            fi
        fi
        rm -f conftest*
        echo "$ac_t""$ac_cv_have_dash_pthreads" 1>&6
    fi

    case "$target" in
        *-*-freebsd*)
            cat >> confdefs.pytmp <<\EOF
    (''' _REENTRANT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _REENTRANT 1
EOF

            cat >> confdefs.pytmp <<\EOF
    (''' _THREAD_SAFE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _THREAD_SAFE 1
EOF

                        if test "$ac_cv_have_dash_pthread" = "yes"; then
                _PTHREAD_LDFLAGS="-pthread"
            fi
            ;;

        *-*-openbsd*|*-*-bsdi*)
            cat >> confdefs.pytmp <<\EOF
    (''' _REENTRANT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _REENTRANT 1
EOF

            cat >> confdefs.pytmp <<\EOF
    (''' _THREAD_SAFE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _THREAD_SAFE 1
EOF

                        if test "$ac_cv_have_dash_pthread" = "yes"; then
                _PTHREAD_LDFLAGS="-pthread"
            fi
            ;;

        *-*-linux*|*-*-kfreebsd*-gnu|*-*-gnu*)
            cat >> confdefs.pytmp <<\EOF
    (''' _REENTRANT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define _REENTRANT 1
EOF

            ;;

    esac
    LDFLAGS="${_PTHREAD_LDFLAGS} ${LDFLAGS}"
    
     for ac_hdr in pthread.h
  do
       ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:11522: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 11527 "configure"
#include "confdefs.h"

#include <$ac_hdr>
int main() {

; return 0; }
EOF
if { (eval echo configure:11535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
                       cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
  else
    echo "$ac_t""no" 1>&6
    
  fi

  done

fi


if test $ac_cv_prog_gcc = yes; then
    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
echo "configure:11569: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    ac_pattern="Autoconf.*'x'"
  cat > conftest.$ac_ext <<EOF
#line 11575 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "$ac_pattern" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_prog_gcc_traditional=yes
else
  rm -rf conftest*
  ac_cv_prog_gcc_traditional=no
fi
rm -f conftest*


  if test $ac_cv_prog_gcc_traditional = no; then
    cat > conftest.$ac_ext <<EOF
#line 11593 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "$ac_pattern" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_prog_gcc_traditional=yes
fi
rm -f conftest*

  fi
fi

echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
  if test $ac_cv_prog_gcc_traditional = yes; then
    CC="$CC -traditional"
  fi
fi

echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
echo "configure:11615: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_memcmp_clean=no
else
  cat > conftest.$ac_ext <<EOF
#line 11623 "configure"
#include "confdefs.h"

main()
{
  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
  exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
}

EOF
if { (eval echo configure:11633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_func_memcmp_clean=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_memcmp_clean=no
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"

for ac_func in stat64 lstat64 truncate64 statvfs64 statvfs statfs64 statfs getpagesize gmtime_r localtime_r arc4random arc4random_buf mallinfo gettid lchown setpriority strerror syscall
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:11653: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 11658 "configure"
#define $ac_func innocuous_$ac_func
#include "confdefs.h"
#undef $ac_func
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#define $ac_func innocuous_$ac_func
#include <assert.h>
#undef $ac_func
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:11685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_func ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


echo $ac_n "checking for clock_gettime(CLOCK_MONOTONIC)""... $ac_c" 1>&6
echo "configure:11714: checking for clock_gettime(CLOCK_MONOTONIC)" >&5
if eval "test \"`echo '$''{'ac_cv_clock_monotonic'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  for libs in "" -lrt; do
                    _SAVE_LIBS="$LIBS"
                    LIBS="$LIBS $libs"
                    cat > conftest.$ac_ext <<EOF
#line 11722 "configure"
#include "confdefs.h"
#include <time.h>
int main() {
 struct timespec ts;
                                   clock_gettime(CLOCK_MONOTONIC, &ts); 
; return 0; }
EOF
if { (eval echo configure:11730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_clock_monotonic=$libs
                                 LIBS="$_SAVE_LIBS"
                                 break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_clock_monotonic=no
fi
rm -f conftest*
                    LIBS="$_SAVE_LIBS"
                done
fi

echo "$ac_t""$ac_cv_clock_monotonic" 1>&6
if test "$ac_cv_clock_monotonic" != "no"; then
    HAVE_CLOCK_MONOTONIC=1
    REALTIME_LIBS=$ac_cv_clock_monotonic
    cat >> confdefs.pytmp <<\EOF
    (''' HAVE_CLOCK_MONOTONIC ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_CLOCK_MONOTONIC 1
EOF

    
    
fi

if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "100300"; then

ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

echo $ac_n "checking for wcrtomb""... $ac_c" 1>&6
echo "configure:11771: checking for wcrtomb" >&5
if eval "test \"`echo '$''{'ac_cv_have_wcrtomb'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 11776 "configure"
#include "confdefs.h"
#include <wchar.h>
int main() {
mbstate_t ps={0};wcrtomb(0,'f',&ps);
; return 0; }
EOF
if { (eval echo configure:11783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_have_wcrtomb="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_have_wcrtomb="no"
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_have_wcrtomb" 1>&6
if test "$ac_cv_have_wcrtomb" = "yes"; then
    cat >> confdefs.pytmp <<\EOF
    (''' HAVE_WCRTOMB ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_WCRTOMB 1
EOF

fi
echo $ac_n "checking for mbrtowc""... $ac_c" 1>&6
echo "configure:11806: checking for mbrtowc" >&5
if eval "test \"`echo '$''{'ac_cv_have_mbrtowc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 11811 "configure"
#include "confdefs.h"
#include <wchar.h>
int main() {
mbstate_t ps={0};mbrtowc(0,0,0,&ps);
; return 0; }
EOF
if { (eval echo configure:11818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_have_mbrtowc="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_have_mbrtowc="no"
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_have_mbrtowc" 1>&6
if test "$ac_cv_have_mbrtowc" = "yes"; then
    cat >> confdefs.pytmp <<\EOF
    (''' HAVE_MBRTOWC ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_MBRTOWC 1
EOF

fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

fi

echo $ac_n "checking for res_ninit()""... $ac_c" 1>&6
echo "configure:11850: checking for res_ninit()" >&5
if eval "test \"`echo '$''{'ac_cv_func_res_ninit'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$OS_TARGET" = NetBSD -o "$OS_TARGET" = OpenBSD; then
                ac_cv_func_res_ninit=no
     else
        cat > conftest.$ac_ext <<EOF
#line 11858 "configure"
#include "confdefs.h"

            #ifdef linux
            #define _BSD_SOURCE 1
            #endif
            #include <sys/types.h>
            #include <netinet/in.h>
            #include <arpa/nameser.h>
            #include <resolv.h>
            
int main() {
int foo = res_ninit(&_res);
; return 0; }
EOF
if { (eval echo configure:11873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_func_res_ninit=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_res_ninit=no
fi
rm -f conftest*
     fi
    
fi

echo "$ac_t""$ac_cv_func_res_ninit" 1>&6

if test "$ac_cv_func_res_ninit" = "yes"; then
    cat >> confdefs.pytmp <<\EOF
    (''' HAVE_RES_NINIT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_RES_NINIT 1
EOF

fi

ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross


ICONV_LIBS=

case $target_os in
    darwin*|mingw*)
        ;;
    *)

echo $ac_n "checking for iconv in -lc""... $ac_c" 1>&6
echo "configure:11915: checking for iconv in -lc" >&5
ac_lib_var=`echo c'_'iconv | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lc  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11923 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char iconv();

int main() {
iconv()
; return 0; }
EOF
if { (eval echo configure:11937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  ICONV_LIBS=
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
echo "configure:11956: checking for iconv in -liconv" >&5
ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-liconv  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11964 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char iconv();

int main() {
iconv()
; return 0; }
EOF
if { (eval echo configure:11978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  ICONV_LIBS="-liconv"
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for libiconv in -liconv""... $ac_c" 1>&6
echo "configure:11997: checking for libiconv in -liconv" >&5
ac_lib_var=`echo iconv'_'libiconv | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-liconv  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 12005 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char libiconv();

int main() {
libiconv()
; return 0; }
EOF
if { (eval echo configure:12019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  ICONV_LIBS="-liconv"
else
  echo "$ac_t""no" 1>&6
fi

fi

fi

_SAVE_LIBS=$LIBS
LIBS="$LIBS $ICONV_LIBS"
echo $ac_n "checking for iconv()""... $ac_c" 1>&6
echo "configure:12046: checking for iconv()" >&5
if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12051 "configure"
#include "confdefs.h"

        #include <stdlib.h>
        #include <iconv.h>
        
int main() {

            iconv_t h = iconv_open("", "");
            iconv(h, NULL, NULL, NULL, NULL);
            iconv_close(h);
        
; return 0; }
EOF
if { (eval echo configure:12065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_func_iconv=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_iconv=no
        
fi
rm -f conftest*
    
fi

echo "$ac_t""$ac_cv_func_iconv" 1>&6
if test "$ac_cv_func_iconv" = "yes"; then
    cat >> confdefs.pytmp <<\EOF
    (''' HAVE_ICONV ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_ICONV 1
EOF

    LIBICONV="$ICONV_LIBS"
    echo $ac_n "checking for iconv() with const input""... $ac_c" 1>&6
echo "configure:12090: checking for iconv() with const input" >&5
if eval "test \"`echo '$''{'ac_cv_func_const_iconv'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12095 "configure"
#include "confdefs.h"

            #include <stdlib.h>
            #include <iconv.h>
            
int main() {

                const char *input = "testing";
                iconv_t h = iconv_open("", "");
                iconv(h, &input, NULL, NULL, NULL);
                iconv_close(h);
            
; return 0; }
EOF
if { (eval echo configure:12110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_func_const_iconv=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_const_iconv=no
            
fi
rm -f conftest*
        
fi

echo "$ac_t""$ac_cv_func_const_iconv" 1>&6
    if test "$ac_cv_func_const_iconv" = "yes"; then
        cat >> confdefs.pytmp <<\EOF
    (''' HAVE_ICONV_WITH_CONST_INPUT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_ICONV_WITH_CONST_INPUT 1
EOF

    fi
fi
LIBS=$_SAVE_LIBS

    ;;
esac




  echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
echo "configure:12144: checking for nl_langinfo and CODESET" >&5
if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12149 "configure"
#include "confdefs.h"
#include <langinfo.h>
int main() {
char* cs = nl_langinfo(CODESET);
; return 0; }
EOF
if { (eval echo configure:12156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  am_cv_langinfo_codeset=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  am_cv_langinfo_codeset=no
fi
rm -f conftest*
    
fi

echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
  if test $am_cv_langinfo_codeset = yes; then
    cat >> confdefs.pytmp <<\EOF
    (''' HAVE_LANGINFO_CODESET ''', r''' 1 ''')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_LANGINFO_CODESET 1
EOF

      HAVE_LANGINFO_CODESET=1
  fi
  


ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross


echo $ac_n "checking for an implementation of va_copy()""... $ac_c" 1>&6
echo "configure:12192: checking for an implementation of va_copy()" >&5
if eval "test \"`echo '$''{'ac_cv_va_copy'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12197 "configure"
#include "confdefs.h"
#include <stdarg.h>
                     #include <stdlib.h>
        void f (int i, ...) {
            va_list args1, args2;
            va_start (args1, i);
            va_copy (args2, args1);
            if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
                exit (1);
            va_end (args1); va_end (args2);
        }
int main() {
f(0, 42); return 0
; return 0; }
EOF
if { (eval echo configure:12213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_va_copy=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_va_copy=no
    
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_va_copy" 1>&6
echo $ac_n "checking whether va_list can be copied by value""... $ac_c" 1>&6
echo "configure:12229: checking whether va_list can be copied by value" >&5
if eval "test \"`echo '$''{'ac_cv_va_val_copy'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12234 "configure"
#include "confdefs.h"
#include <stdarg.h>
                     #include <stdlib.h>
        void f (int i, ...) {
            va_list args1, args2;
            va_start (args1, i);
            args2 = args1;
            if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
                exit (1);
            va_end (args1); va_end (args2);
        }
int main() {
f(0, 42); return 0
; return 0; }
EOF
if { (eval echo configure:12250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_va_val_copy=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_va_val_copy=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_va_val_copy" 1>&6
if test "x$ac_cv_va_copy" = "xyes"; then
    cat >> confdefs.pytmp <<\EOF
    (''' VA_COPY ''', r''' va_copy ''')
EOF
cat >> confdefs.h <<\EOF
#define VA_COPY va_copy
EOF

    cat >> confdefs.pytmp <<\EOF
    (''' HAVE_VA_COPY ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_VA_COPY 1
EOF

fi

if test "x$ac_cv_va_val_copy" = "xno"; then
   cat >> confdefs.pytmp <<\EOF
    (''' HAVE_VA_LIST_AS_ARRAY ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_VA_LIST_AS_ARRAY 1
EOF

fi

ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross


ARM_ABI_PREFIX=
if test "$GNU_CC"; then
  if test "$CPU_ARCH" = "arm" ; then
    echo $ac_n "checking for ARM EABI""... $ac_c" 1>&6
echo "configure:12303: checking for ARM EABI" >&5
if eval "test \"`echo '$''{'ac_cv_gcc_arm_eabi'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12308 "configure"
#include "confdefs.h"

int main() {

#if defined(__ARM_EABI__)
  return 0;
#else
#error Not ARM EABI.
#endif
                        
; return 0; }
EOF
if { (eval echo configure:12321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_gcc_arm_eabi="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_gcc_arm_eabi="no"
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_gcc_arm_eabi" 1>&6
    if test "$ac_cv_gcc_arm_eabi" = "yes"; then
        HAVE_ARM_EABI=1
        ARM_ABI_PREFIX=eabi-
    else
        ARM_ABI_PREFIX=oabi-
    fi
  fi

  TARGET_COMPILER_ABI="${TARGET_COMPILER_ABI-${ARM_ABI_PREFIX}gcc3}"
fi

echo $ac_n "checking whether the C++ \"using\" keyword resolves ambiguity""... $ac_c" 1>&6
echo "configure:12346: checking whether the C++ \"using\" keyword resolves ambiguity" >&5
if eval "test \"`echo '$''{'ac_cv_cpp_ambiguity_resolving_using'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12351 "configure"
#include "confdefs.h"
class X {
                                 public: int go(const X&) {return 3;}
                                         int jo(const X&) {return 3;}
                               };
                               class Y : public X {
                                 public:  int go(int) {return 2;}
                                          int jo(int) {return 2;}
                                          using X::jo;
                                 private: using X::go;
                               };
int main() {
X x; Y y; y.jo(x);
; return 0; }
EOF
if { (eval echo configure:12367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_cpp_ambiguity_resolving_using=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_cpp_ambiguity_resolving_using=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_cpp_ambiguity_resolving_using" 1>&6
if test "$ac_cv_cpp_ambiguity_resolving_using" = yes ; then
   cat >> confdefs.pytmp <<\EOF
    (''' HAVE_CPP_AMBIGUITY_RESOLVING_USING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_CPP_AMBIGUITY_RESOLVING_USING 1
EOF

fi

echo $ac_n "checking for C++ dynamic_cast to void*""... $ac_c" 1>&6
echo "configure:12391: checking for C++ dynamic_cast to void*" >&5
if eval "test \"`echo '$''{'ac_cv_cpp_dynamic_cast_void_ptr'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_cpp_dynamic_cast_void_ptr=no
else
  cat > conftest.$ac_ext <<EOF
#line 12399 "configure"
#include "confdefs.h"
class X { int i; public: virtual ~X() { } };
                            class Y { int j; public: virtual ~Y() { } };
                            class Z : public X, public Y { int k; };

                            int main() {
                                 Z mdo;
                                 X *subx = (X*)&mdo;
                                 Y *suby = (Y*)&mdo;
                                 return !((((void*)&mdo != (void*)subx) &&
                                           ((void*)&mdo == dynamic_cast<void*>(subx))) ||
                                          (((void*)&mdo != (void*)suby) &&
                                           ((void*)&mdo == dynamic_cast<void*>(suby))));
                            }
EOF
if { (eval echo configure:12415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_cpp_dynamic_cast_void_ptr=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_cpp_dynamic_cast_void_ptr=no
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$ac_cv_cpp_dynamic_cast_void_ptr" 1>&6
if test "$ac_cv_cpp_dynamic_cast_void_ptr" = yes ; then
   cat >> confdefs.pytmp <<\EOF
    (''' HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR 1
EOF

fi


# try harder, when checking for __thread support, see bug 521750 comment #33 and below
# We pass MOZ_OPTIMIZE_LDFLAGS to the linker because if dead_strip is
# enabled, the linker in xcode 4.1 will crash. Without this it would crash when
# linking XUL.
_SAVE_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS $DSO_PIC_CFLAGS $DSO_LDOPTS $MOZ_OPTIMIZE_LDFLAGS"
echo $ac_n "checking for __thread keyword for TLS variables""... $ac_c" 1>&6
echo "configure:12448: checking for __thread keyword for TLS variables" >&5
if eval "test \"`echo '$''{'ac_cv_thread_keyword'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12453 "configure"
#include "confdefs.h"
__thread bool tlsIsMainThread = false;
int main() {
return tlsIsMainThread;
; return 0; }
EOF
if { (eval echo configure:12460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_thread_keyword=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_thread_keyword=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_thread_keyword" 1>&6
LDFLAGS=$_SAVE_LDFLAGS
# The custom dynamic linker doesn't support TLS variables
MOZ_TLS=
if test "$ac_cv_thread_keyword" = yes -a "$MOZ_LINKER" != 1; then
  # mips builds fail with TLS variables because of a binutils bug.
  # See bug 528687
  # OpenBSD doesn't have TLS support, and the test succeeds with clang++
  case "${target}" in
    mips*-*)
      :
      ;;
    *-android*|*-linuxandroid*)
      :
      ;;
    *-openbsd*)
      :
      ;;
    *)
      cat >> confdefs.pytmp <<\EOF
    (''' HAVE_THREAD_TLS_KEYWORD ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_THREAD_TLS_KEYWORD 1
EOF

      MOZ_TLS=1
      ;;
  esac
fi

if test -n "$MOZ_LINKER"; then
  if test "$CPU_ARCH" = arm; then
        if test -n "$ARM_ARCH" && test "$ARM_ARCH" -lt 7; then
      LDFLAGS="$LDFLAGS -Wl,-z,max-page-size=0x4000 -Wl,-z,common-page-size=0x4000"
      _SUBDIR_LDFLAGS="$_SUBDIR_LDFLAGS -Wl,-z,max-page-size=0x4000 -Wl,-z,common-page-size=0x4000"
    fi
  fi

  LDFLAGS="$LDFLAGS -Wl,--hash-style=sysv"
fi

if test -n "$MOZ_LINKER" -a "$OS_TARGET" = "Android"; then
  echo $ac_n "checking whether the CRT objects have text relocations""... $ac_c" 1>&6
echo "configure:12516: checking whether the CRT objects have text relocations" >&5
if eval "test \"`echo '$''{'ac_cv_crt_has_text_relocations'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'int foo() { return 0; }' > conftest.cpp
     if { ac_try='${CXX-g++} -o conftest${DLL_SUFFIX} $CXXFLAGS $DSO_LDOPTS $LDFLAGS conftest.cpp $LIBS 1>&5'; { (eval echo configure:12521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } &&
        test -s conftest${DLL_SUFFIX}; then
       if ${TOOLCHAIN_PREFIX}readelf -d conftest${DLL_SUFFIX} | grep TEXTREL > /dev/null; then
         ac_cv_crt_has_text_relocations=yes
       else
         ac_cv_crt_has_text_relocations=no
       fi
     else
       { echo "configure: error: couldn't compile a simple C file" 1>&2; echo "configure: error: couldn't compile a simple C file" 1>&5; exit 1; }
     fi
     rm -rf conftest*
fi

echo "$ac_t""$ac_cv_crt_has_text_relocations" 1>&6
  if test "$ac_cv_crt_has_text_relocations" = yes; then
                            DSO_LDOPTS="$DSO_LDOPTS -nostartfiles"
    NSPR_LDFLAGS="$NSPR_LDFLAGS -nostartfiles"
  fi
fi


echo $ac_n "checking for __attribute__((always_inline))""... $ac_c" 1>&6
echo "configure:12543: checking for __attribute__((always_inline))" >&5
if eval "test \"`echo '$''{'ac_cv_attribute_always_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12548 "configure"
#include "confdefs.h"
inline void f(void) __attribute__((always_inline));
int main() {

; return 0; }
EOF
if { (eval echo configure:12555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_attribute_always_inline=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_attribute_always_inline=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_attribute_always_inline" 1>&6

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross



echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
echo "configure:12579: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'ac_cv_i18n_lc_messages'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12584 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
int category = LC_MESSAGES;
; return 0; }
EOF
if { (eval echo configure:12591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_i18n_lc_messages=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_i18n_lc_messages=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_i18n_lc_messages" 1>&6
if test "$ac_cv_i18n_lc_messages" = yes; then
   cat >> confdefs.pytmp <<\EOF
    (''' HAVE_I18N_LC_MESSAGES ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_I18N_LC_MESSAGES 1
EOF

fi

for ac_func in localeconv
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12617: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12622 "configure"
#define $ac_func innocuous_$ac_func
#include "confdefs.h"
#undef $ac_func
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#define $ac_func innocuous_$ac_func
#include <assert.h>
#undef $ac_func
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:12649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_func ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

fi # ! SKIP_COMPILER_CHECKS



MALLOC_HEADERS="malloc.h malloc_np.h malloc/malloc.h sys/malloc.h"
MALLOC_H=

for file in $MALLOC_HEADERS; do
     ac_safe=`echo "$file" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $file""... $ac_c" 1>&6
echo "configure:12686: checking for $file" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 12691 "configure"
#include "confdefs.h"

#include <$file>
int main() {

; return 0; }
EOF
if { (eval echo configure:12699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    MALLOC_H=$file
  else
    echo "$ac_t""no" 1>&6
    
  fi

  if test "$MALLOC_H" != ""; then
    cat >> confdefs.pytmp <<EOF
    (''' MALLOC_H ''', r''' <$MALLOC_H> ''')
EOF
cat >> confdefs.h <<EOF
#define MALLOC_H <$MALLOC_H>
EOF

    break
  fi
done

 for ac_hdr in alloca.h
  do
       ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:12735: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 12740 "configure"
#include "confdefs.h"

#include <$ac_hdr>
int main() {

; return 0; }
EOF
if { (eval echo configure:12748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
                       cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
  else
    echo "$ac_t""no" 1>&6
    
  fi

  done


for ac_func in strndup posix_memalign memalign
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12781: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12786 "configure"
#define $ac_func innocuous_$ac_func
#include "confdefs.h"
#undef $ac_func
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#define $ac_func innocuous_$ac_func
#include <assert.h>
#undef $ac_func
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:12813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_func ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


for ac_func in malloc_usable_size
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:12844: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 12849 "configure"
#define $ac_func innocuous_$ac_func
#include "confdefs.h"
#undef $ac_func
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#define $ac_func innocuous_$ac_func
#include <assert.h>
#undef $ac_func
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:12876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_func ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

MALLOC_USABLE_SIZE_CONST_PTR=const
 for ac_hdr in malloc.h
  do
       ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:12908: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 12913 "configure"
#include "confdefs.h"

#include <$ac_hdr>
int main() {

; return 0; }
EOF
if { (eval echo configure:12921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
                       cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
  echo $ac_n "checking whether malloc_usable_size definition can use const argument""... $ac_c" 1>&6
echo "configure:12944: checking whether malloc_usable_size definition can use const argument" >&5
  cat > conftest.$ac_ext <<EOF
#line 12946 "configure"
#include "confdefs.h"
#include <malloc.h>
                  #include <stddef.h>
                  size_t malloc_usable_size(const void *ptr);
int main() {
return malloc_usable_size(0);
; return 0; }
EOF
if { (eval echo configure:12955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
                  MALLOC_USABLE_SIZE_CONST_PTR=
fi
rm -f conftest*

  else
    echo "$ac_t""no" 1>&6
    
  fi

  done

cat >> confdefs.pytmp <<EOF
    (''' MALLOC_USABLE_SIZE_CONST_PTR ''', r''' $MALLOC_USABLE_SIZE_CONST_PTR ''')
EOF
cat >> confdefs.h <<EOF
#define MALLOC_USABLE_SIZE_CONST_PTR $MALLOC_USABLE_SIZE_CONST_PTR
EOF



echo $ac_n "checking for valloc in malloc.h""... $ac_c" 1>&6
echo "configure:12984: checking for valloc in malloc.h" >&5
cat > conftest.$ac_ext <<EOF
#line 12986 "configure"
#include "confdefs.h"
#include <malloc.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "valloc" >/dev/null 2>&1; then
  rm -rf conftest*
  cat >> confdefs.pytmp <<\EOF
    (''' HAVE_VALLOC ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_VALLOC 1
EOF

                echo "$ac_t""yes" 1>&6
else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*


echo $ac_n "checking for valloc in unistd.h""... $ac_c" 1>&6
echo "configure:13009: checking for valloc in unistd.h" >&5
cat > conftest.$ac_ext <<EOF
#line 13011 "configure"
#include "confdefs.h"
#include <unistd.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "valloc" >/dev/null 2>&1; then
  rm -rf conftest*
  cat >> confdefs.pytmp <<\EOF
    (''' HAVE_VALLOC ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_VALLOC 1
EOF

                echo "$ac_t""yes" 1>&6
else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*





TARGET_XPCOM_ABI=
if test -n "${CPU_ARCH}" -a -n "${TARGET_COMPILER_ABI}"; then
    TARGET_XPCOM_ABI="${CPU_ARCH}-${TARGET_COMPILER_ABI}"
    cat >> confdefs.pytmp <<EOF
    (''' TARGET_XPCOM_ABI ''', r''' "${TARGET_XPCOM_ABI}" ''')
EOF
cat >> confdefs.h <<EOF
#define TARGET_XPCOM_ABI "${TARGET_XPCOM_ABI}"
EOF

fi


if test -n "$SKIP_COMPILER_CHECKS"; then
      cat >> confdefs.pytmp <<\EOF
    (''' MALLOC_H ''', r''' <malloc.h> ''')
EOF
cat >> confdefs.h <<\EOF
#define MALLOC_H <malloc.h>
EOF

   cat >> confdefs.pytmp <<\EOF
    (''' HAVE_FORCEINLINE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_FORCEINLINE 1
EOF

   cat >> confdefs.pytmp <<\EOF
    (''' HAVE_LOCALECONV ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_LOCALECONV 1
EOF

fi # SKIP_COMPILER_CHECKS


# External Packages

case "$OS_TARGET" in
WINNT|Darwin|Android)
  MOZ_FOLD_LIBS=1
  ;;
*)
  MOZ_FOLD_LIBS=
  ;;
esac






# Check whether --with-nspr-cflags or --without-nspr-cflags was given.
if test "${with_nspr_cflags+set}" = set; then
  withval="$with_nspr_cflags"
  NSPR_CFLAGS=$withval
fi

# Check whether --with-nspr-libs or --without-nspr-libs was given.
if test "${with_nspr_libs+set}" = set; then
  withval="$with_nspr_libs"
  NSPR_LIBS=$withval
fi



    # Check whether --enable-nspr-build or --disable-nspr-build was given.
if test "${enable_nspr_build+set}" = set; then
  enableval="$enable_nspr_build"
  if test "$enableval" = "yes"; then
    MOZ_BUILD_NSPR=1
  elif test "$enableval" = "no"; then
    MOZ_BUILD_NSPR=
  else
    { echo "configure: error: Option, nspr-build, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, nspr-build, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi



if test "$MOZ_BUILD_APP" != js || test -n "$JS_STANDALONE"; then
  _IS_OUTER_CONFIGURE=1
fi

# Check whether --with-system-nspr or --without-system-nspr was given.
if test "${with_system_nspr+set}" = set; then
  withval="$with_system_nspr"
  if test "$withval" = "yes"; then
    _USE_SYSTEM_NSPR=1 
  elif test "$withval" = "no"; then
    :
  else
    { echo "configure: error: Option, system-nspr, does not take an argument ($withval)." 1>&2; echo "configure: error: Option, system-nspr, does not take an argument ($withval)." 1>&5; exit 1; }
  fi
fi


JS_POSIX_NSPR=unset

    if test -n "$JS_STANDALONE"; then
      case "$target" in
        *linux*|*darwin*|*dragonfly*|*freebsd*|*netbsd*|*openbsd*)
          if test -z "$_HAS_NSPR"; then
            JS_POSIX_NSPR_DEFAULT=1
          fi
          ;;
      esac
    fi

    # Check whether --enable-posix-nspr-emulation or --disable-posix-nspr-emulation was given.
if test "${enable_posix_nspr_emulation+set}" = set; then
  enableval="$enable_posix_nspr_emulation"
  if test "$enableval" = "yes"; then
    JS_POSIX_NSPR=1
  elif test "$enableval" = "no"; then
    JS_POSIX_NSPR=
  else
    { echo "configure: error: Option, posix-nspr-emulation, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, posix-nspr-emulation, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi




echo $ac_n "checking NSPR selection""... $ac_c" 1>&6
echo "configure:13163: checking NSPR selection" >&5
nspr_opts=
which_nspr=default
if test -n "$_USE_SYSTEM_NSPR"; then
    nspr_opts="x$nspr_opts"
    which_nspr="system"
fi
if test -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then
    nspr_opts="x$nspr_opts"
    which_nspr="command-line"
fi
if test -n "$MOZ_BUILD_NSPR"; then
    nspr_opts="x$nspr_opts"
    which_nspr="source-tree"
fi
if test "$JS_POSIX_NSPR" = unset; then
    JS_POSIX_NSPR=
else
    nspr_opts="x$nspr_opts"
    which_nspr="posix-wrapper"
fi

if test -z "$nspr_opts"; then
    if test "$MOZ_BUILD_APP" != js; then
            MOZ_BUILD_NSPR=1
      which_nspr="source-tree"
    else
                  JS_POSIX_NSPR="$JS_POSIX_NSPR_DEFAULT"
      if test -z "$JS_POSIX_NSPR"; then
        MOZ_BUILD_NSPR=1
        which_nspr="source-tree"
      else
        which_nspr="posix-wrapper"
      fi
   fi
fi

if test -z "$nspr_opts" || test "$nspr_opts" = x; then
    echo "$ac_t""$which_nspr" 1>&6
else
    { echo "configure: error: only one way of using NSPR may be selected. See 'configure --help'." 1>&2; echo "configure: error: only one way of using NSPR may be selected. See 'configure --help'." 1>&5; exit 1; }
fi



if test "$MOZ_BUILD_APP" = js; then
  if test "$JS_POSIX_NSPR" = 1; then
    cat >> confdefs.pytmp <<\EOF
    (''' JS_POSIX_NSPR ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define JS_POSIX_NSPR 1
EOF

  fi
  
fi

# A (sub)configure invoked by the toplevel configure will always receive
# --with-nspr-libs on the command line. It will never need to figure out
# anything itself.
if test -n "$_IS_OUTER_CONFIGURE"; then

if test -n "$_USE_SYSTEM_NSPR"; then
    
# Check whether --with-nspr-prefix or --without-nspr-prefix was given.
if test "${with_nspr_prefix+set}" = set; then
  withval="$with_nspr_prefix"
  nspr_config_prefix="$withval"
else
  nspr_config_prefix=""
fi


# Check whether --with-nspr-exec-prefix or --without-nspr-exec-prefix was given.
if test "${with_nspr_exec_prefix+set}" = set; then
  withval="$with_nspr_exec_prefix"
  nspr_config_exec_prefix="$withval"
else
  nspr_config_exec_prefix=""
fi


	if test -n "$nspr_config_exec_prefix"; then
		nspr_config_args="$nspr_config_args --exec-prefix=$nspr_config_exec_prefix"
		if test -z "$NSPR_CONFIG"; then
			NSPR_CONFIG=$nspr_config_exec_prefix/bin/nspr-config
		fi
	fi
	if test -n "$nspr_config_prefix"; then
		nspr_config_args="$nspr_config_args --prefix=$nspr_config_prefix"
		if test -z "$NSPR_CONFIG"; then
			NSPR_CONFIG=$nspr_config_prefix/bin/nspr-config
		fi
	fi

	unset ac_cv_path_NSPR_CONFIG
	# Extract the first word of "nspr-config", so it can be a program name with args.
set dummy nspr-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:13263: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_NSPR_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$NSPR_CONFIG" in
  /*)
  ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_NSPR_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_NSPR_CONFIG" && ac_cv_path_NSPR_CONFIG="no"
  ;;
esac
fi
NSPR_CONFIG="$ac_cv_path_NSPR_CONFIG"
if test -n "$NSPR_CONFIG"; then
  echo "$ac_t""$NSPR_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

	min_nspr_version=$NSPR_MINVER
	echo $ac_n "checking for NSPR - version >= $min_nspr_version""... $ac_c" 1>&6
echo "configure:13298: checking for NSPR - version >= $min_nspr_version" >&5

	no_nspr=""
	if test "$NSPR_CONFIG" != "no"; then
		NSPR_CFLAGS=`$NSPR_CONFIG $nspr_config_args --cflags`
		NSPR_LIBS=`$NSPR_CONFIG $nspr_config_args --libs`
		NSPR_VERSION_STRING=`$NSPR_CONFIG $nspr_config_args --version`	
	elif test -n "${NO_NSPR_CONFIG_SYSTEM_VERSION}"; then
	    NSPR_CFLAGS="${NO_NSPR_CONFIG_SYSTEM_CFLAGS}"
		NSPR_LIBS="${NO_NSPR_CONFIG_SYSTEM_LDFLAGS}"
		NSPR_VERSION_STRING="$NO_NSPR_CONFIG_SYSTEM_VERSION"
	else
	    no_nspr="yes"
	fi

	if test -z "$no_nspr"; then
		nspr_config_major_version=`echo $NSPR_VERSION_STRING | \
			sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\1/'`
		nspr_config_minor_version=`echo $NSPR_VERSION_STRING | \
			sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\2/'`
		nspr_config_micro_version=`echo $NSPR_VERSION_STRING | \
			sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\4/'`
		if test -z "$nspr_config_micro_version"; then
			nspr_config_micro_version="0"
		fi

		min_nspr_major_version=`echo $min_nspr_version | \
			sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\1/'`
		min_nspr_minor_version=`echo $min_nspr_version | \
			sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\2/'`
		min_nspr_micro_version=`echo $min_nspr_version | \
			sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\4/'`
		if test -z "$min_nspr_micro_version"; then
			min_nspr_micro_version="0"
		fi

		if test "$nspr_config_major_version" -ne "$min_nspr_major_version"; then
			no_nspr="yes"
		elif test "$nspr_config_major_version" -eq "$min_nspr_major_version" &&
		     test "$nspr_config_minor_version" -lt "$min_nspr_minor_version"; then
			no_nspr="yes"
		elif test "$nspr_config_major_version" -eq "$min_nspr_major_version" &&
		     test "$nspr_config_minor_version" -eq "$min_nspr_minor_version" &&
		     test "$nspr_config_micro_version" -lt "$min_nspr_micro_version"; then
			no_nspr="yes"
		fi
	fi

	if test -z "$no_nspr"; then
		echo "$ac_t""yes" 1>&6
		MOZ_SYSTEM_NSPR=1     
	else
		echo "$ac_t""no" 1>&6
		{ echo "configure: error: you do not have NSPR installed or your version is older than $NSPR_MINVER." 1>&2; echo "configure: error: you do not have NSPR installed or your version is older than $NSPR_MINVER." 1>&5; exit 1; }
	fi


	
	


fi

if test -n "$MOZ_SYSTEM_NSPR" -o -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then
    _SAVE_CFLAGS=$CFLAGS
    CFLAGS="$CFLAGS $NSPR_CFLAGS"
    cat > conftest.$ac_ext <<EOF
#line 13365 "configure"
#include "confdefs.h"
#include "prtypes.h"
int main() {
#ifndef PR_STATIC_ASSERT
                 #error PR_STATIC_ASSERT not defined or requires including prtypes.h
                 #endif
; return 0; }
EOF
if { (eval echo configure:13374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  { echo "configure: error: system NSPR does not support PR_STATIC_ASSERT or including prtypes.h does not provide it" 1>&2; echo "configure: error: system NSPR does not support PR_STATIC_ASSERT or including prtypes.h does not provide it" 1>&5; exit 1; }
fi
rm -f conftest*
    cat > conftest.$ac_ext <<EOF
#line 13384 "configure"
#include "confdefs.h"
#include "prtypes.h"
int main() {
#ifndef PR_UINT64
                 #error PR_UINT64 not defined or requires including prtypes.h
                 #endif
; return 0; }
EOF
if { (eval echo configure:13393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  { echo "configure: error: system NSPR does not support PR_UINT64 or including prtypes.h does not provide it" 1>&2; echo "configure: error: system NSPR does not support PR_UINT64 or including prtypes.h does not provide it" 1>&5; exit 1; }
fi
rm -f conftest*
    CFLAGS=$_SAVE_CFLAGS
elif test -z "$JS_POSIX_NSPR"; then
    NSPR_INCLUDE_DIR="${DIST}/include/nspr"
    NSPR_CFLAGS="-I${NSPR_INCLUDE_DIR}"
    if test -n "$GNU_CC"; then
        if test -n "$MOZ_FOLD_LIBS"; then
           NSPR_LIB_DIR=${DIST}/lib
        else
           NSPR_LIB_DIR=${DIST}/bin
        fi
        NSPR_LIBS="-L${NSPR_LIB_DIR} -lnspr${NSPR_VERSION} -lplc${NSPR_VERSION} -lplds${NSPR_VERSION}"
    else
        # NSS needs actual static libs to link to, and this is where they are.
        NSPR_LIBS="${DIST}/lib/nspr${NSPR_VERSION}.lib ${DIST}/lib/plc${NSPR_VERSION}.lib ${DIST}/lib/plds${NSPR_VERSION}.lib "
        NSPR_LIB_DIR="${DIST}/lib"
    fi
fi





NSPR_PKGCONF_CHECK="nspr"
if test -n "$MOZ_SYSTEM_NSPR"; then
    # piggy back on $MOZ_SYSTEM_NSPR to set a variable for the nspr check for js.pc
    NSPR_PKGCONF_CHECK="nspr >= $NSPR_MINVER"

    _SAVE_CFLAGS=$CFLAGS
    CFLAGS="$CFLAGS $NSPR_CFLAGS"
    cat > conftest.$ac_ext <<EOF
#line 13432 "configure"
#include "confdefs.h"
#include "prlog.h"
int main() {
#ifndef PR_STATIC_ASSERT
                 #error PR_STATIC_ASSERT not defined
                 #endif
; return 0; }
EOF
if { (eval echo configure:13441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  { echo "configure: error: system NSPR does not support PR_STATIC_ASSERT" 1>&2; echo "configure: error: system NSPR does not support PR_STATIC_ASSERT" 1>&5; exit 1; }
fi
rm -f conftest*
    CFLAGS=$_SAVE_CFLAGS
fi


fi # _IS_OUTER_CONFIGURE



# Check whether --with-system-libevent or --without-system-libevent was given.
if test "${with_system_libevent+set}" = set; then
  withval="$with_system_libevent"
  LIBEVENT_DIR=$withval
fi


_SAVE_CFLAGS=$CFLAGS
_SAVE_LDFLAGS=$LDFLAGS
_SAVE_LIBS=$LIBS
if test "$LIBEVENT_DIR" = yes; then
    succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for libevent""... $ac_c" 1>&6
echo "configure:13480: checking for libevent" >&5

        if $PKG_CONFIG --exists "libevent" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_LIBEVENT_CFLAGS""... $ac_c" 1>&6
echo "configure:13487: checking MOZ_LIBEVENT_CFLAGS" >&5
            MOZ_LIBEVENT_CFLAGS=`$PKG_CONFIG --cflags "libevent"`
            echo "$ac_t""$MOZ_LIBEVENT_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_LIBEVENT_LIBS""... $ac_c" 1>&6
echo "configure:13492: checking MOZ_LIBEVENT_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            MOZ_LIBEVENT_LIBS="`$PKG_CONFIG --libs \"libevent\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$MOZ_LIBEVENT_LIBS" 1>&6
        else
            MOZ_LIBEVENT_CFLAGS=""
            MOZ_LIBEVENT_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            MOZ_LIBEVENT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libevent"`
            
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     MOZ_SYSTEM_LIBEVENT=1
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       LIBEVENT_DIR=/usr
     fi
  fi

fi
if test -z "$LIBEVENT_DIR" -o "$LIBEVENT_DIR" = no; then
    MOZ_SYSTEM_LIBEVENT=
elif test -z "$MOZ_SYSTEM_LIBEVENT"; then
    CFLAGS="-I${LIBEVENT_DIR}/include $CFLAGS"
    LDFLAGS="-L${LIBEVENT_DIR}/lib $LDFLAGS"
       ac_safe=`echo "event.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for event.h""... $ac_c" 1>&6
echo "configure:13529: checking for event.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 13534 "configure"
#include "confdefs.h"

#include <event.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:13542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    if test ! -f "${LIBEVENT_DIR}/include/event.h"; then
             { echo "configure: error: event.h found, but is not in ${LIBEVENT_DIR}/include" 1>&2; echo "configure: error: event.h found, but is not in ${LIBEVENT_DIR}/include" 1>&5; exit 1; }
         fi
  else
    echo "$ac_t""no" 1>&6
    { echo "configure: error: --with-system-libevent requested but event.h not found" 1>&2; echo "configure: error: --with-system-libevent requested but event.h not found" 1>&5; exit 1; }
  fi

    echo $ac_n "checking for event_init in -levent""... $ac_c" 1>&6
echo "configure:13565: checking for event_init in -levent" >&5
ac_lib_var=`echo event'_'event_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-levent  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 13573 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char event_init();

int main() {
event_init()
; return 0; }
EOF
if { (eval echo configure:13584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  MOZ_SYSTEM_LIBEVENT=1
                  MOZ_LIBEVENT_CFLAGS="-I${LIBEVENT_DIR}/include"
                  MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"
else
  echo "$ac_t""no" 1>&6
MOZ_SYSTEM_LIBEVENT= MOZ_LIBEVENT_CFLAGS= MOZ_LIBEVENT_LIBS=
fi

fi
CFLAGS=$_SAVE_CFLAGS
LDFLAGS=$_SAVE_LDFLAGS
LIBS=$_SAVE_LIBS




# Check whether --with-system-nss or --without-system-nss was given.
if test "${with_system_nss+set}" = set; then
  withval="$with_system_nss"
  if test "$withval" = "yes"; then
    _USE_SYSTEM_NSS=1 
  elif test "$withval" = "no"; then
    :
  else
    { echo "configure: error: Option, system-nss, does not take an argument ($withval)." 1>&2; echo "configure: error: Option, system-nss, does not take an argument ($withval)." 1>&5; exit 1; }
  fi
fi


if test -n "$_USE_SYSTEM_NSS"; then
    
# Check whether --with-nss-prefix or --without-nss-prefix was given.
if test "${with_nss_prefix+set}" = set; then
  withval="$with_nss_prefix"
  nss_config_prefix="$withval"
else
  nss_config_prefix=""
fi


# Check whether --with-nss-exec-prefix or --without-nss-exec-prefix was given.
if test "${with_nss_exec_prefix+set}" = set; then
  withval="$with_nss_exec_prefix"
  nss_config_exec_prefix="$withval"
else
  nss_config_exec_prefix=""
fi


	if test -n "$nss_config_exec_prefix"; then
		nss_config_args="$nss_config_args --exec-prefix=$nss_config_exec_prefix"
		if test -z "$NSS_CONFIG"; then
			NSS_CONFIG=$nss_config_exec_prefix/bin/nss-config
		fi
	fi
	if test -n "$nss_config_prefix"; then
		nss_config_args="$nss_config_args --prefix=$nss_config_prefix"
		if test -z "$NSS_CONFIG"; then
			NSS_CONFIG=$nss_config_prefix/bin/nss-config
		fi
	fi

	unset ac_cv_path_NSS_CONFIG
	# Extract the first word of "nss-config", so it can be a program name with args.
set dummy nss-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:13665: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_NSS_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$NSS_CONFIG" in
  /*)
  ac_cv_path_NSS_CONFIG="$NSS_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_NSS_CONFIG="$NSS_CONFIG" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_NSS_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_NSS_CONFIG" && ac_cv_path_NSS_CONFIG="no"
  ;;
esac
fi
NSS_CONFIG="$ac_cv_path_NSS_CONFIG"
if test -n "$NSS_CONFIG"; then
  echo "$ac_t""$NSS_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

	min_nss_version=3.25
	echo $ac_n "checking for NSS - version >= $min_nss_version""... $ac_c" 1>&6
echo "configure:13700: checking for NSS - version >= $min_nss_version" >&5

	no_nss=""
	if test "$NSS_CONFIG" = "no"; then
		no_nss="yes"
	else
		NSS_CFLAGS=`$NSS_CONFIG $nss_config_args --cflags`
		NSS_LIBS=`$NSS_CONFIG $nss_config_args --libs`

		nss_config_major_version=`$NSS_CONFIG $nss_config_args --version | \
			sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\1/'`
		nss_config_minor_version=`$NSS_CONFIG $nss_config_args --version | \
			sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\2/'`
		nss_config_micro_version=`$NSS_CONFIG $nss_config_args --version | \
			sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\4/'`
		if test -z "$nss_config_micro_version"; then
			nss_config_micro_version="0"
		fi

		min_nss_major_version=`echo $min_nss_version | \
			sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\1/'`
		min_nss_minor_version=`echo $min_nss_version | \
			sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\2/'`
		min_nss_micro_version=`echo $min_nss_version | \
			sed 's/\([0-9]*\)\.\([0-9]*\)\(\.\([0-9]*\)\)\{0,1\}/\4/'`
		if test -z "$min_nss_micro_version"; then
			min_nss_micro_version="0"
		fi

		if test "$nss_config_major_version" -lt "$min_nss_major_version"; then
			no_nss="yes"
		elif test "$nss_config_major_version" -eq "$min_nss_major_version" &&
		     test "$nss_config_minor_version" -lt "$min_nss_minor_version"; then
			no_nss="yes"
		elif test "$nss_config_major_version" -eq "$min_nss_major_version" &&
		     test "$nss_config_minor_version" -eq "$min_nss_minor_version" &&
		     test "$nss_config_micro_version" -lt "$min_nss_micro_version"; then
			no_nss="yes"
		fi
	fi

	if test -z "$no_nss"; then
		echo "$ac_t""yes" 1>&6
		MOZ_SYSTEM_NSS=1     
	else
		echo "$ac_t""no" 1>&6
		{ echo "configure: error: you don't have NSS installed or your version is too old" 1>&2; echo "configure: error: you don't have NSS installed or your version is too old" 1>&5; exit 1; }
	fi


	
	


fi

if test -n "$MOZ_SYSTEM_NSS"; then
   NSS_LIBS="$NSS_LIBS -lcrmf"
else
   NSS_CFLAGS="-I${DIST}/include/nss"
fi

if test -z "$SKIP_LIBRARY_CHECKS"; then
# Check whether --with-system-jpeg or --without-system-jpeg was given.
if test "${with_system_jpeg+set}" = set; then
  withval="$with_system_jpeg"
  JPEG_DIR=$withval
fi


_SAVE_CFLAGS=$CFLAGS
_SAVE_LDFLAGS=$LDFLAGS
_SAVE_LIBS=$LIBS
if test -n "${JPEG_DIR}" -a "${JPEG_DIR}" != "yes"; then
    CFLAGS="-I${JPEG_DIR}/include $CFLAGS"
    LDFLAGS="-L${JPEG_DIR}/lib $LDFLAGS"
fi
if test -z "$JPEG_DIR" -o "$JPEG_DIR" = no; then
    MOZ_SYSTEM_JPEG=
else
    echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6
echo "configure:13781: checking for jpeg_destroy_compress in -ljpeg" >&5
ac_lib_var=`echo jpeg'_'jpeg_destroy_compress | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ljpeg  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 13789 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char jpeg_destroy_compress();

int main() {
jpeg_destroy_compress()
; return 0; }
EOF
if { (eval echo configure:13800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  MOZ_SYSTEM_JPEG=1 MOZ_JPEG_LIBS="-ljpeg"
else
  echo "$ac_t""no" 1>&6
MOZ_SYSTEM_JPEG=
fi

fi

if test "$MOZ_SYSTEM_JPEG" = 1; then
    cat > conftest.$ac_ext <<EOF
#line 13825 "configure"
#include "confdefs.h"
 #include <stdio.h>
                     #include <sys/types.h>
                     #include <jpeglib.h> 
int main() {
 #if JPEG_LIB_VERSION < $MOZJPEG
                     #error "Insufficient JPEG library version ($MOZJPEG required)."
                     #endif
                     #ifndef JCS_EXTENSIONS
                     #error "libjpeg-turbo JCS_EXTENSIONS required"
                     #endif
                     
; return 0; }
EOF
if { (eval echo configure:13840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  MOZ_SYSTEM_JPEG=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  { echo "configure: error: Insufficient JPEG library version for --with-system-jpeg" 1>&2; echo "configure: error: Insufficient JPEG library version for --with-system-jpeg" 1>&5; exit 1; }
fi
rm -f conftest*
fi
CFLAGS=$_SAVE_CFLAGS
LDFLAGS=$_SAVE_LDFLAGS
LIBS=$_SAVE_LIBS

if test -n "${JPEG_DIR}" -a -d "${JPEG_DIR}" -a "$MOZ_SYSTEM_JPEG" = 1; then
    MOZ_JPEG_CFLAGS="-I${JPEG_DIR}/include"
    MOZ_JPEG_LIBS="-L${JPEG_DIR}/lib ${MOZ_JPEG_LIBS}"
fi
fi # SKIP_LIBRARY_CHECKS



MOZZLIB=1.2.3

# Check whether --with-system-zlib or --without-system-zlib was given.
if test "${with_system_zlib+set}" = set; then
  withval="$with_system_zlib"
  ZLIB_DIR=$withval
fi


if test -z "$MOZ_ZLIB_LIBS$MOZ_ZLIB_CFLAGS$SKIP_LIBRARY_CHECKS"; then
    _SAVE_CFLAGS=$CFLAGS
    _SAVE_LDFLAGS=$LDFLAGS
    _SAVE_LIBS=$LIBS

    if test -n "${ZLIB_DIR}" -a "${ZLIB_DIR}" != "yes"; then
        MOZ_ZLIB_CFLAGS="-I${ZLIB_DIR}/include"
        MOZ_ZLIB_LIBS="-L${ZLIB_DIR}/lib"
        CFLAGS="$MOZ_ZLIB_CFLAGS $CFLAGS"
        LDFLAGS="$MOZ_ZLIB_LIBS $LDFLAGS"
    fi
    if test -z "$ZLIB_DIR" -o "$ZLIB_DIR" = no; then
        MOZ_SYSTEM_ZLIB=
    else
        echo $ac_n "checking for gzread in -lz""... $ac_c" 1>&6
echo "configure:13887: checking for gzread in -lz" >&5
ac_lib_var=`echo z'_'gzread | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lz  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 13895 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gzread();

int main() {
gzread()
; return 0; }
EOF
if { (eval echo configure:13906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  MOZ_SYSTEM_ZLIB=1 MOZ_ZLIB_LIBS="$MOZ_ZLIB_LIBS -lz"
else
  echo "$ac_t""no" 1>&6
MOZ_SYSTEM_ZLIB=
fi

        if test "$MOZ_SYSTEM_ZLIB" = 1; then
            MOZZLIBNUM=`echo $MOZZLIB | awk -F. '{printf "0x%x\n", ((($1 * 16 + $2) * 16) + $3) * 16 + $4}'`
            cat > conftest.$ac_ext <<EOF
#line 13930 "configure"
#include "confdefs.h"
 #include <stdio.h>
                             #include <string.h>
                             #include <zlib.h> 
int main() {
 #if ZLIB_VERNUM < $MOZZLIBNUM
                             #error "Insufficient zlib version ($MOZZLIBNUM required)."
                             #endif 
; return 0; }
EOF
if { (eval echo configure:13941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  MOZ_SYSTEM_ZLIB=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  { echo "configure: error: Insufficient zlib version for --with-system-zlib ($MOZZLIB required)" 1>&2; echo "configure: error: Insufficient zlib version for --with-system-zlib ($MOZZLIB required)" 1>&5; exit 1; }
fi
rm -f conftest*
        fi
    fi
    CFLAGS=$_SAVE_CFLAGS
    LDFLAGS=$_SAVE_LDFLAGS
    LIBS=$_SAVE_LIBS
fi







if test "$MOZ_LINKER" = 1 -a "$MOZ_SYSTEM_ZLIB" != 1; then
    { echo "configure: error: Custom dynamic linker requires --with-system-zlib" 1>&2; echo "configure: error: Custom dynamic linker requires --with-system-zlib" 1>&5; exit 1; }
fi

MOZ_PNG_ARM_NEON=

if test -z "$SKIP_LIBRARY_CHECKS"; then
# Check whether --with-system-bz2 or --without-system-bz2 was given.
if test "${with_system_bz2+set}" = set; then
  withval="$with_system_bz2"
  BZ2_DIR=$withval
fi


_SAVE_CFLAGS=$CFLAGS
_SAVE_LDFLAGS=$LDFLAGS
_SAVE_LIBS=$LIBS
if test -n "${BZ2_DIR}" -a "${BZ2_DIR}" != "yes"; then
    CFLAGS="-I${BZ2_DIR}/include $CFLAGS"
    LDFLAGS="-L${BZ2_DIR}/lib $LDFLAGS"
fi
if test -z "$BZ2_DIR" -o "$BZ2_DIR" = no; then
    MOZ_SYSTEM_BZ2=
else
    echo $ac_n "checking for BZ2_bzread in -lbz2""... $ac_c" 1>&6
echo "configure:13989: checking for BZ2_bzread in -lbz2" >&5
ac_lib_var=`echo bz2'_'BZ2_bzread | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lbz2  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 13997 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char BZ2_bzread();

int main() {
BZ2_bzread()
; return 0; }
EOF
if { (eval echo configure:14008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  MOZ_SYSTEM_BZ2=1 MOZ_BZ2_LIBS="-lbz2"
else
  echo "$ac_t""no" 1>&6
MOZ_SYSTEM_BZ2= MOZ_BZ2_CFLAGS= MOZ_BZ2_LIBS=
fi

fi
CFLAGS=$_SAVE_CFLAGS
LDFLAGS=$_SAVE_LDFLAGS
LIBS=$_SAVE_LIBS

if test "${BZ2_DIR}" -a -d "${BZ2_DIR}" -a "$MOZ_SYSTEM_BZ2" = 1; then
    MOZ_BZ2_CFLAGS="-I${BZ2_DIR}/include"
    MOZ_BZ2_LIBS="-L${BZ2_DIR}/lib ${MOZ_BZ2_LIBS}"
fi

# Check whether --with-system-png or --without-system-png was given.
if test "${with_system_png+set}" = set; then
  withval="$with_system_png"
  PNG_DIR=$withval
fi


_SAVE_CFLAGS=$CFLAGS
_SAVE_LDFLAGS=$LDFLAGS
_SAVE_LIBS=$LIBS
if test -n "${PNG_DIR}" -a "${PNG_DIR}" != "yes"; then
    CFLAGS="-I${PNG_DIR}/include $CFLAGS"
    LDFLAGS="-L${PNG_DIR}/lib $LDFLAGS"
fi
if test -z "$PNG_DIR" -o "$PNG_DIR" = no; then
    MOZ_SYSTEM_PNG=
else
    echo $ac_n "checking for png_get_valid in -lpng""... $ac_c" 1>&6
echo "configure:14057: checking for png_get_valid in -lpng" >&5
ac_lib_var=`echo png'_'png_get_valid | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lpng  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 14065 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char png_get_valid();

int main() {
png_get_valid()
; return 0; }
EOF
if { (eval echo configure:14076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  MOZ_SYSTEM_PNG=1 MOZ_PNG_LIBS="-lpng"
else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: --with-system-png requested but no working libpng found" 1>&2; echo "configure: error: --with-system-png requested but no working libpng found" 1>&5; exit 1; }
fi

    echo $ac_n "checking for png_get_acTL in -lpng""... $ac_c" 1>&6
echo "configure:14098: checking for png_get_acTL in -lpng" >&5
ac_lib_var=`echo png'_'png_get_acTL | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lpng  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 14106 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char png_get_acTL();

int main() {
png_get_acTL()
; return 0; }
EOF
if { (eval echo configure:14117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo png | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_lib ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lpng $LIBS"

else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: --with-system-png won't work because the system's libpng doesn't have APNG support" 1>&2; echo "configure: error: --with-system-png won't work because the system's libpng doesn't have APNG support" 1>&5; exit 1; }
fi

fi
if test "$MOZ_SYSTEM_PNG" = 1; then
    cat > conftest.$ac_ext <<EOF
#line 14151 "configure"
#include "confdefs.h"
 #include <stdio.h>
                     #include <sys/types.h>
                     #include <png.h> 
int main() {
 #if PNG_LIBPNG_VER < $MOZPNG
                     #error "Insufficient libpng version ($MOZPNG required)."
                     #endif
                     #ifndef PNG_UINT_31_MAX
                     #error "Insufficient libpng version."
                     #endif 
; return 0; }
EOF
if { (eval echo configure:14165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  MOZ_SYSTEM_PNG=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  { echo "configure: error: --with-system-png requested but no working libpng found" 1>&2; echo "configure: error: --with-system-png requested but no working libpng found" 1>&5; exit 1; }
fi
rm -f conftest*
fi
CFLAGS=$_SAVE_CFLAGS
LDFLAGS=$_SAVE_LDFLAGS
LIBS=$_SAVE_LIBS

if test "${PNG_DIR}" -a -d "${PNG_DIR}" -a "$MOZ_SYSTEM_PNG" = 1; then
    MOZ_PNG_CFLAGS="-I${PNG_DIR}/include"
    MOZ_PNG_LIBS="-L${PNG_DIR}/lib ${MOZ_PNG_LIBS}"
fi

if test "$MOZ_SYSTEM_PNG" != 1 -a "$CPU_ARCH" = "arm" ; then
    # Check whether --enable-png-arm-neon-support or --disable-png-arm-neon-support was given.
if test "${enable_png_arm_neon_support+set}" = set; then
  enableval="$enable_png_arm_neon_support"
  MOZ_PNG_ARM_NEON_SUPPORT=$enableval  
fi

    case "$MOZ_PNG_ARM_NEON_SUPPORT" in
        no)
            # enable-png-arm-neon-support = no
            ;;
        nocheck)
            # enable-png-arm-neon-support = nocheck
            MOZ_PNG_ARM_NEON=1
            ;;
        *)
            MOZ_PNG_ARM_NEON=1
            ;;
    esac
fi

fi # SKIP_LIBRARY_CHECKS





# Check whether --enable-system-ffi or --disable-system-ffi was given.
if test "${enable_system_ffi+set}" = set; then
  enableval="$enable_system_ffi"
  if test "$enableval" = "yes"; then
    MOZ_SYSTEM_FFI=1 
  elif test "$enableval" = "no"; then
    :
  else
    { echo "configure: error: Option, system-ffi, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, system-ffi, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_SYSTEM_FFI"; then
    # Vanilla libffi 3.0.9 needs a few patches from upcoming version 3.0.10
    # for non-GCC compilers.
    if test -z "$GNU_CC"; then
        succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for libffi > 3.0.9""... $ac_c" 1>&6
echo "configure:14240: checking for libffi > 3.0.9" >&5

        if $PKG_CONFIG --exists "libffi > 3.0.9" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_FFI_CFLAGS""... $ac_c" 1>&6
echo "configure:14247: checking MOZ_FFI_CFLAGS" >&5
            MOZ_FFI_CFLAGS=`$PKG_CONFIG --cflags "libffi > 3.0.9"`
            echo "$ac_t""$MOZ_FFI_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_FFI_LIBS""... $ac_c" 1>&6
echo "configure:14252: checking MOZ_FFI_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            MOZ_FFI_LIBS="`$PKG_CONFIG --libs \"libffi > 3.0.9\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$MOZ_FFI_LIBS" 1>&6
        else
            MOZ_FFI_CFLAGS=""
            MOZ_FFI_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            MOZ_FFI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libffi > 3.0.9"`
            echo $MOZ_FFI_PKG_ERRORS
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       { echo "configure: error: Library requirements (libffi > 3.0.9) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (libffi > 3.0.9) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; }
     fi
  fi

    else
        succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for libffi >= 3.0.9""... $ac_c" 1>&6
echo "configure:14293: checking for libffi >= 3.0.9" >&5

        if $PKG_CONFIG --exists "libffi >= 3.0.9" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_FFI_CFLAGS""... $ac_c" 1>&6
echo "configure:14300: checking MOZ_FFI_CFLAGS" >&5
            MOZ_FFI_CFLAGS=`$PKG_CONFIG --cflags "libffi >= 3.0.9"`
            echo "$ac_t""$MOZ_FFI_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_FFI_LIBS""... $ac_c" 1>&6
echo "configure:14305: checking MOZ_FFI_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            MOZ_FFI_LIBS="`$PKG_CONFIG --libs \"libffi >= 3.0.9\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$MOZ_FFI_LIBS" 1>&6
        else
            MOZ_FFI_CFLAGS=""
            MOZ_FFI_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            MOZ_FFI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libffi >= 3.0.9"`
            echo $MOZ_FFI_PKG_ERRORS
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       { echo "configure: error: Library requirements (libffi >= 3.0.9) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (libffi >= 3.0.9) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; }
     fi
  fi

    fi
fi






# Application

ENABLE_SYSTEM_EXTENSION_DIRS=1
MOZ_BRANDING_DIRECTORY=
MOZ_OFFICIAL_BRANDING=
MOZ_FEEDS=1
MOZ_AUTH_EXTENSION=1
if test "$MOZ_IOS"; then
   MOZ_AUTH_EXTENSION=
fi
MOZ_RAW=
MOZ_VORBIS=
MOZ_TREMOR=
MOZ_SAMPLE_TYPE_FLOAT32=
MOZ_SAMPLE_TYPE_S16=
MOZ_DIRECTSHOW=
MOZ_WEBRTC=1
MOZ_PEERCONNECTION=
MOZ_SRTP=
MOZ_WEBRTC_SIGNALING=
MOZ_WEBRTC_ASSERT_ALWAYS=1
MOZ_WEBRTC_HARDWARE_AEC_NS=
MOZ_SCTP=
MOZ_ANDROID_OMX=
MOZ_OMX_PLUGIN=
MOZ_VPX_ERROR_CONCEALMENT=
MOZ_WEBSPEECH=1
MOZ_WEBSPEECH_MODELS=
MOZ_WEBSPEECH_POCKETSPHINX=
MOZ_WEBSPEECH_TEST_BACKEND=1
VPX_USE_YASM=
VPX_ASFLAGS=
VPX_AS_CONVERSION=
VPX_X86_ASM=
VPX_ARM_ASM=
LIBJPEG_TURBO_AS=
LIBJPEG_TURBO_ASFLAGS=
MOZ_PERMISSIONS=1
MOZ_PREF_EXTENSIONS=1
MOZ_REFLOW_PERF=
MOZ_SAFE_BROWSING=
MOZ_HELP_VIEWER=
MOZ_SPELLCHECK=1
MOZ_TOOLKIT_SEARCH=1
MOZ_UI_LOCALE=en-US
MOZ_UNIVERSALCHARDET=1
MOZ_URL_CLASSIFIER=
MOZ_XUL=1
MOZ_ZIPWRITER=1
NS_PRINTING=1
if test "$MOZ_IOS"; then
   NS_PRINTING=
fi
MOZ_NO_SMART_CARDS=
NSS_DISABLE_DBM=
NECKO_COOKIES=1
NECKO_PROTOCOLS_DEFAULT="about app data file ftp http res viewsource websocket wyciwyg device"
if test -n "$MOZ_RTSP"; then
  NECKO_PROTOCOLS_DEFAULT="$NECKO_PROTOCOLS_DEFAULT rtsp"
fi
BUILD_CTYPES=1
MOZ_USE_NATIVE_POPUP_WINDOWS=
MOZ_WEBSMS_BACKEND=
MOZ_EXCLUDE_HYPHENATION_DICTIONARIES=
MOZ_INSTALL_TRACKING=
ACCESSIBILITY=1
MOZ_TIME_MANAGER=
MOZ_SIMPLEPUSH=
MOZ_PAY=
MOZ_AUDIO_CHANNEL_MANAGER=
MOZ_CONTENT_SANDBOX=
MOZ_GMP_SANDBOX=
MOZ_SANDBOX=1
MOZ_BINARY_EXTENSIONS=
MOZ_DEVTOOLS=server

case "$target_os" in
    mingw*)
        NS_ENABLE_TSF=1
        cat >> confdefs.pytmp <<\EOF
    (''' NS_ENABLE_TSF ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define NS_ENABLE_TSF 1
EOF

        ;;
esac

case "${target}" in
    *-android*|*-linuxandroid*)
        NSS_DISABLE_DBM=1
        MOZ_THEME_FASTSTRIPE=1
        MOZ_TREE_FREETYPE=1
        MOZ_RAW=1
        ;;

esac

# Allow to specify a Mozilla API key file that contains the secret key to be
# used for various Mozilla API requests.
# Check whether --with-mozilla-api-keyfile or --without-mozilla-api-keyfile was given.
if test "${with_mozilla_api_keyfile+set}" = set; then
  withval="$with_mozilla_api_keyfile"
  MOZ_MOZILLA_API_KEY=`cat $withval`
fi

if test -z "$MOZ_MOZILLA_API_KEY"; then
    MOZ_MOZILLA_API_KEY=no-mozilla-api-key
fi


# Allow to specify a Google API key file that contains the secret key to be
# used for various Google API requests.
# Check whether --with-google-api-keyfile or --without-google-api-keyfile was given.
if test "${with_google_api_keyfile+set}" = set; then
  withval="$with_google_api_keyfile"
  MOZ_GOOGLE_API_KEY=`cat $withval`
fi

if test -z "$MOZ_GOOGLE_API_KEY"; then
    MOZ_GOOGLE_API_KEY=no-google-api-key
fi


# Allow to specify a Google OAuth API key file that contains the client ID and
# the secret key to be used for various Google OAuth API requests.
# Check whether --with-google-oauth-api-keyfile or --without-google-oauth-api-keyfile was given.
if test "${with_google_oauth_api_keyfile+set}" = set; then
  withval="$with_google_oauth_api_keyfile"
  MOZ_GOOGLE_OAUTH_API_CLIENTID=`cat $withval | cut -f 1 -d " "`
  MOZ_GOOGLE_OAUTH_API_KEY=`cat $withval | cut -f 2 -d " "`
fi

if test -z "$MOZ_GOOGLE_OAUTH_API_CLIENTID"; then
    MOZ_GOOGLE_OAUTH_API_CLIENTID=no-google-oauth-api-clientid
    MOZ_GOOGLE_OAUTH_API_KEY=no-google-oauth-api-key
fi



# Allow specifying a Bing API key file that contains the client ID and the
# secret key to be used for the Bing Translation API requests.
# Check whether --with-bing-api-keyfile or --without-bing-api-keyfile was given.
if test "${with_bing_api_keyfile+set}" = set; then
  withval="$with_bing_api_keyfile"
  MOZ_BING_API_CLIENTID=`cat $withval | cut -f 1 -d " "`
  MOZ_BING_API_KEY=`cat $withval | cut -f 2 -d " "`
fi

if test -z "$MOZ_BING_API_CLIENTID"; then
    MOZ_BING_API_CLIENTID=no-bing-api-clientid
    MOZ_BING_API_KEY=no-bing-api-key
fi



# Allow specifying an Adjust SDK key file that contains the app token used for
# Adjust SDK requests.
# Check whether --with-adjust-sdk-keyfile or --without-adjust-sdk-keyfile was given.
if test "${with_adjust_sdk_keyfile+set}" = set; then
  withval="$with_adjust_sdk_keyfile"
  MOZ_INSTALL_TRACKING_ADJUST_SDK_APP_TOKEN=`cat $withval`
fi



# Optional Firefox for Android partner distribution directory.
# Check whether --with-android-distribution-directory or --without-android-distribution-directory was given.
if test "${with_android_distribution_directory+set}" = set; then
  withval="$with_android_distribution_directory"
  MOZ_ANDROID_DISTRIBUTION_DIRECTORY=$withval
fi


if test -n "$MOZ_ANDROID_DISTRIBUTION_DIRECTORY"; then
  # A distribution directory must have an assets/distribution directory.
  # See https://wiki.mozilla.org/Mobile/Distribution_Files.
  if test ! -d "$MOZ_ANDROID_DISTRIBUTION_DIRECTORY/assets/distribution" ; then
    { echo "configure: error: --with-android-distribution-directory does not contain assets/distribution;
                  (looked for ${MOZ_ANDROID_DISTRIBUTION_DIRECTORY}/assets/distribution)." 1>&2; echo "configure: error: --with-android-distribution-directory does not contain assets/distribution;
                  (looked for ${MOZ_ANDROID_DISTRIBUTION_DIRECTORY}/assets/distribution)." 1>&5; exit 1; }
  fi
fi


# Check whether --enable-official-branding or --disable-official-branding was given.
if test "${enable_official_branding+set}" = set; then
  enableval="$enable_official_branding"
  if test "$enableval" = "yes"; then
    MOZ_OFFICIAL_BRANDING=1
  elif test "$enableval" = "no"; then
    MOZ_OFFICIAL_BRANDING=
  else
    { echo "configure: error: Option, official-branding, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, official-branding, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


# Allow the application to influence configure with a confvars.sh script.
echo $ac_n "checking if app-specific confvars.sh exists""... $ac_c" 1>&6
echo "configure:14543: checking if app-specific confvars.sh exists" >&5
if test -f "${srcdir}/${MOZ_BUILD_APP}/confvars.sh" ; then
  echo "$ac_t""${srcdir}/${MOZ_BUILD_APP}/confvars.sh" 1>&6
  . "${srcdir}/${MOZ_BUILD_APP}/confvars.sh"
else
  echo "$ac_t""no" 1>&6
fi

# Allow influencing configure with a defines.sh script.
. "${srcdir}/build/defines.sh"

# If we're not building a release build, define EARLY_BETA_OR_EARLIER if it is
# set in defines.sh
if test "$BUILDING_RELEASE"; then
  # Override value in defines.sh, if any
  EARLY_BETA_OR_EARLIER=
elif test "$EARLY_BETA_OR_EARLIER"; then
  cat >> confdefs.pytmp <<\EOF
    (''' EARLY_BETA_OR_EARLIER ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define EARLY_BETA_OR_EARLIER 1
EOF

fi


# Allow someone to change MOZ_APP_NAME and MOZ_APP_BASENAME in mozconfig
# Check whether --with-app-name or --without-app-name was given.
if test "${with_app_name+set}" = set; then
  withval="$with_app_name"
  WITH_APP_NAME=$withval
fi


if test -n "$WITH_APP_NAME" ; then
    MOZ_APP_NAME="$WITH_APP_NAME"
fi

# Check whether --with-app-basename or --without-app-basename was given.
if test "${with_app_basename+set}" = set; then
  withval="$with_app_basename"
  WITH_APP_BASENAME=$withval
fi


if test -n "$WITH_APP_BASENAME" ; then
    MOZ_APP_BASENAME="$WITH_APP_BASENAME"
fi

# Special cases where we need to AC_DEFINE something. Also a holdover for apps
# that haven't made a confvars.sh yet. Don't add new stuff here, use
# MOZ_BUILD_APP.
case "$MOZ_BUILD_APP" in
browser)
  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_PHOENIX ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_PHOENIX 1
EOF

  ;;

xulrunner)
  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_XULRUNNER ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_XULRUNNER 1
EOF

  ;;
esac

if test -n "$MOZ_B2G"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_B2G ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_B2G 1
EOF

fi

# Graphene is a desktop runtime for running applications with a HTML UI.
if test -n "$MOZ_GRAPHENE"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_GRAPHENE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_GRAPHENE 1
EOF

fi

if test -n "$MOZ_MULET"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_MULET ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_MULET 1
EOF

fi

# Propagate feature switches for code written in rust from confvars.sh
if test -n "$MOZ_RUST"; then
    if test -n "$MOZ_RUST_MP4PARSE"; then
        cat >> confdefs.pytmp <<\EOF
    (''' MOZ_RUST_MP4PARSE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_RUST_MP4PARSE 1
EOF

    fi
fi








if test -z "$gonkdir" ; then
    case "$MOZ_BUILD_APP" in
    mobile/android)
        

# Check whether --with-android-sdk or --without-android-sdk was given.
if test "${with_android_sdk+set}" = set; then
  withval="$with_android_sdk"
  android_sdk_root=$withval
fi


android_sdk_root=${withval%/platforms/android-*}

case "$target" in
*-android*|*-linuxandroid*)
    if test -z "$android_sdk_root" ; then
        { echo "configure: error: You must specify --with-android-sdk=/path/to/sdk when targeting Android." 1>&2; echo "configure: error: You must specify --with-android-sdk=/path/to/sdk when targeting Android." 1>&5; exit 1; }
    fi

    # We were given an old-style
    # --with-android-sdk=/path/to/sdk/platforms/android-*.  We could warn, but
    # we'll get compliance by forcing the issue.
    if test -e "$withval"/source.properties ; then
        { echo "configure: error: Including platforms/android-* in --with-android-sdk arguments is deprecated.  Use --with-android-sdk=$android_sdk_root." 1>&2; echo "configure: error: Including platforms/android-* in --with-android-sdk arguments is deprecated.  Use --with-android-sdk=$android_sdk_root." 1>&5; exit 1; }
    fi

    android_target_sdk=23
    echo $ac_n "checking for Android SDK platform version $android_target_sdk""... $ac_c" 1>&6
echo "configure:14698: checking for Android SDK platform version $android_target_sdk" >&5
    android_sdk=$android_sdk_root/platforms/android-$android_target_sdk
    if ! test -e "$android_sdk/source.properties" ; then
        { echo "configure: error: You must download Android SDK platform version $android_target_sdk.  Try |mach bootstrap|.  (Looked for $android_sdk)" 1>&2; echo "configure: error: You must download Android SDK platform version $android_target_sdk.  Try |mach bootstrap|.  (Looked for $android_sdk)" 1>&5; exit 1; }
    fi
    echo "$ac_t""$android_sdk" 1>&6

    android_build_tools="$android_sdk_root"/build-tools/23.0.3
    echo $ac_n "checking for Android build-tools version 23.0.3""... $ac_c" 1>&6
echo "configure:14707: checking for Android build-tools version 23.0.3" >&5
    if test -d "$android_build_tools" -a -f "$android_build_tools/aapt"; then
        echo "$ac_t""$android_build_tools" 1>&6
    else
        { echo "configure: error: You must install the Android build-tools version 23.0.3.  Try |mach bootstrap|.  (Looked for $android_build_tools)" 1>&2; echo "configure: error: You must install the Android build-tools version 23.0.3.  Try |mach bootstrap|.  (Looked for $android_build_tools)" 1>&5; exit 1; }
    fi

     # Extract the first word of "zipalign", so it can be a program name with args.
set dummy zipalign; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:14717: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_ZIPALIGN'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$ZIPALIGN" in
  /*)
  ac_cv_path_ZIPALIGN="$ZIPALIGN" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_ZIPALIGN="$ZIPALIGN" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$android_build_tools"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_ZIPALIGN="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_ZIPALIGN" && ac_cv_path_ZIPALIGN=":"
  ;;
esac
fi
ZIPALIGN="$ac_cv_path_ZIPALIGN"
if test -n "$ZIPALIGN"; then
  echo "$ac_t""$ZIPALIGN" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test "$msyshost"; then
    case "$ZIPALIGN" in
    /*)
      tmp_DIRNAME=`dirname "$ZIPALIGN"`
      tmp_BASENAME=`basename "$ZIPALIGN"`
      tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
      ZIPALIGN="$tmp_PWD/$tmp_BASENAME"
      if test -e "$ZIPALIGN.exe"; then
        ZIPALIGN="$ZIPALIGN.exe"
      fi
    esac
  fi

     # Extract the first word of "dx", so it can be a program name with args.
set dummy dx; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:14766: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_DX'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$DX" in
  /*)
  ac_cv_path_DX="$DX" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_DX="$DX" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$android_build_tools"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_DX="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_DX" && ac_cv_path_DX=":"
  ;;
esac
fi
DX="$ac_cv_path_DX"
if test -n "$DX"; then
  echo "$ac_t""$DX" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test "$msyshost"; then
    case "$DX" in
    /*)
      tmp_DIRNAME=`dirname "$DX"`
      tmp_BASENAME=`basename "$DX"`
      tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
      DX="$tmp_PWD/$tmp_BASENAME"
      if test -e "$DX.exe"; then
        DX="$DX.exe"
      fi
    esac
  fi

     # Extract the first word of "aapt", so it can be a program name with args.
set dummy aapt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:14815: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AAPT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$AAPT" in
  /*)
  ac_cv_path_AAPT="$AAPT" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_AAPT="$AAPT" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$android_build_tools"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_AAPT="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_AAPT" && ac_cv_path_AAPT=":"
  ;;
esac
fi
AAPT="$ac_cv_path_AAPT"
if test -n "$AAPT"; then
  echo "$ac_t""$AAPT" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test "$msyshost"; then
    case "$AAPT" in
    /*)
      tmp_DIRNAME=`dirname "$AAPT"`
      tmp_BASENAME=`basename "$AAPT"`
      tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
      AAPT="$tmp_PWD/$tmp_BASENAME"
      if test -e "$AAPT.exe"; then
        AAPT="$AAPT.exe"
      fi
    esac
  fi

     # Extract the first word of "aidl", so it can be a program name with args.
set dummy aidl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:14864: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AIDL'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$AIDL" in
  /*)
  ac_cv_path_AIDL="$AIDL" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_AIDL="$AIDL" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$android_build_tools"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_AIDL="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_AIDL" && ac_cv_path_AIDL=":"
  ;;
esac
fi
AIDL="$ac_cv_path_AIDL"
if test -n "$AIDL"; then
  echo "$ac_t""$AIDL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test "$msyshost"; then
    case "$AIDL" in
    /*)
      tmp_DIRNAME=`dirname "$AIDL"`
      tmp_BASENAME=`basename "$AIDL"`
      tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
      AIDL="$tmp_PWD/$tmp_BASENAME"
      if test -e "$AIDL.exe"; then
        AIDL="$AIDL.exe"
      fi
    esac
  fi

    if test -z "$ZIPALIGN" -o "$ZIPALIGN" = ":"; then
      { echo "configure: error: The program zipalign was not found.  Try |mach bootstrap|." 1>&2; echo "configure: error: The program zipalign was not found.  Try |mach bootstrap|." 1>&5; exit 1; }
    fi
    if test -z "$DX" -o "$DX" = ":"; then
      { echo "configure: error: The program dx was not found.  Try |mach bootstrap|." 1>&2; echo "configure: error: The program dx was not found.  Try |mach bootstrap|." 1>&5; exit 1; }
    fi
    if test -z "$AAPT" -o "$AAPT" = ":"; then
      { echo "configure: error: The program aapt was not found.  Try |mach bootstrap|." 1>&2; echo "configure: error: The program aapt was not found.  Try |mach bootstrap|." 1>&5; exit 1; }
    fi
    if test -z "$AIDL" -o "$AIDL" = ":"; then
      { echo "configure: error: The program aidl was not found.  Try |mach bootstrap|." 1>&2; echo "configure: error: The program aidl was not found.  Try |mach bootstrap|." 1>&5; exit 1; }
    fi

    android_platform_tools="$android_sdk_root"/platform-tools
    echo $ac_n "checking for Android platform-tools""... $ac_c" 1>&6
echo "configure:14925: checking for Android platform-tools" >&5
    if test -d "$android_platform_tools" -a -f "$android_platform_tools/adb"; then
        echo "$ac_t""$android_platform_tools" 1>&6
    else
        { echo "configure: error: You must install the Android platform-tools.  Try |mach bootstrap|.  (Looked for $android_platform_tools)" 1>&2; echo "configure: error: You must install the Android platform-tools.  Try |mach bootstrap|.  (Looked for $android_platform_tools)" 1>&5; exit 1; }
    fi

     # Extract the first word of "adb", so it can be a program name with args.
set dummy adb; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:14935: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_ADB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$ADB" in
  /*)
  ac_cv_path_ADB="$ADB" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_ADB="$ADB" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$android_platform_tools"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_ADB="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_ADB" && ac_cv_path_ADB=":"
  ;;
esac
fi
ADB="$ac_cv_path_ADB"
if test -n "$ADB"; then
  echo "$ac_t""$ADB" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test "$msyshost"; then
    case "$ADB" in
    /*)
      tmp_DIRNAME=`dirname "$ADB"`
      tmp_BASENAME=`basename "$ADB"`
      tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
      ADB="$tmp_PWD/$tmp_BASENAME"
      if test -e "$ADB.exe"; then
        ADB="$ADB.exe"
      fi
    esac
  fi

    if test -z "$ADB" -o "$ADB" = ":"; then
      { echo "configure: error: The program adb was not found.  Try |mach bootstrap|." 1>&2; echo "configure: error: The program adb was not found.  Try |mach bootstrap|." 1>&5; exit 1; }
    fi

    android_tools="$android_sdk_root"/tools
    echo $ac_n "checking for Android tools""... $ac_c" 1>&6
echo "configure:14987: checking for Android tools" >&5
    if test -d "$android_tools" -a -f "$android_tools/emulator"; then
        echo "$ac_t""$android_tools" 1>&6
    else
        { echo "configure: error: You must install the Android tools.  Try |mach bootstrap|.  (Looked for $android_tools)" 1>&2; echo "configure: error: You must install the Android tools.  Try |mach bootstrap|.  (Looked for $android_tools)" 1>&5; exit 1; }
    fi

     # Extract the first word of "emulator", so it can be a program name with args.
set dummy emulator; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:14997: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_EMULATOR'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$EMULATOR" in
  /*)
  ac_cv_path_EMULATOR="$EMULATOR" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_EMULATOR="$EMULATOR" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$android_tools"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_EMULATOR="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_EMULATOR" && ac_cv_path_EMULATOR=":"
  ;;
esac
fi
EMULATOR="$ac_cv_path_EMULATOR"
if test -n "$EMULATOR"; then
  echo "$ac_t""$EMULATOR" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test "$msyshost"; then
    case "$EMULATOR" in
    /*)
      tmp_DIRNAME=`dirname "$EMULATOR"`
      tmp_BASENAME=`basename "$EMULATOR"`
      tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
      EMULATOR="$tmp_PWD/$tmp_BASENAME"
      if test -e "$EMULATOR.exe"; then
        EMULATOR="$EMULATOR.exe"
      fi
    esac
  fi

    if test -z "$EMULATOR" -o "$EMULATOR" = ":"; then
      { echo "configure: error: The program emulator was not found.  Try |mach bootstrap|." 1>&2; echo "configure: error: The program emulator was not found.  Try |mach bootstrap|." 1>&5; exit 1; }
    fi

    ANDROID_TARGET_SDK="${android_target_sdk}"
    ANDROID_SDK="${android_sdk}"
    ANDROID_SDK_ROOT="${android_sdk_root}"
    ANDROID_TOOLS="${android_tools}"
    ANDROID_BUILD_TOOLS_VERSION="23.0.3"
    cat >> confdefs.pytmp <<EOF
    (''' ANDROID_TARGET_SDK ''', r''' $ANDROID_TARGET_SDK ''')
EOF
cat >> confdefs.h <<EOF
#define ANDROID_TARGET_SDK $ANDROID_TARGET_SDK
EOF

    
    
    
    
    

    
  
  
  ANDROID_APPCOMPAT_V7_AAR="$ANDROID_SDK_ROOT/extras/android/m2repository/com/android/support/appcompat-v7/$ANDROID_SUPPORT_LIBRARY_VERSION/appcompat-v7-$ANDROID_SUPPORT_LIBRARY_VERSION.aar"
  echo $ac_n "checking for appcompat-v7 AAR""... $ac_c" 1>&6
echo "configure:15070: checking for appcompat-v7 AAR" >&5
  if ! test -e "$ANDROID_APPCOMPAT_V7_AAR" ; then
    { echo "configure: error: You must download the appcompat-v7 AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_APPCOMPAT_V7_AAR)" 1>&2; echo "configure: error: You must download the appcompat-v7 AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_APPCOMPAT_V7_AAR)" 1>&5; exit 1; }
  fi
  
  echo "$ac_t""$ANDROID_APPCOMPAT_V7_AAR" 1>&6

  if ! $PYTHON -m mozbuild.action.explode_aar --destdir=$MOZ_BUILD_ROOT/dist/exploded-aar $ANDROID_APPCOMPAT_V7_AAR ; then
    { echo "configure: error: Could not explode $ANDROID_APPCOMPAT_V7_AAR!" 1>&2; echo "configure: error: Could not explode $ANDROID_APPCOMPAT_V7_AAR!" 1>&5; exit 1; }
  fi

  
  
  
    echo $ac_n "checking for ANDROID_APPCOMPAT_V7_AAR_LIB""... $ac_c" 1>&6
echo "configure:15085: checking for ANDROID_APPCOMPAT_V7_AAR_LIB" >&5
    ANDROID_APPCOMPAT_V7_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/appcompat-v7-$ANDROID_SUPPORT_LIBRARY_VERSION/appcompat-v7-$ANDROID_SUPPORT_LIBRARY_VERSION-classes.jar"
    if ! test -e "$ANDROID_APPCOMPAT_V7_AAR_LIB" ; then
      { echo "configure: error: Could not find required exploded ANDROID_APPCOMPAT_V7_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_APPCOMPAT_V7_AAR_LIB!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_APPCOMPAT_V7_AAR_LIB" 1>&6
    
  

  
  
    echo $ac_n "checking for ANDROID_APPCOMPAT_V7_AAR_RES""... $ac_c" 1>&6
echo "configure:15097: checking for ANDROID_APPCOMPAT_V7_AAR_RES" >&5
    ANDROID_APPCOMPAT_V7_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/appcompat-v7-$ANDROID_SUPPORT_LIBRARY_VERSION/res"
    if ! test -e "$ANDROID_APPCOMPAT_V7_AAR_RES" ; then
      { echo "configure: error: Could not find required exploded ANDROID_APPCOMPAT_V7_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_APPCOMPAT_V7_AAR_RES!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_APPCOMPAT_V7_AAR_RES" 1>&6
    
  

  
  
    if test -e "$ANDROID_APPCOMPAT_V7_AAR_INTERNAL_LIB" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_APPCOMPAT_V7_AAR_INTERNAL_LIB!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_APPCOMPAT_V7_AAR_INTERNAL_LIB!" 1>&5; exit 1; }
    fi
  

  
  
    if test -e "$ANDROID_APPCOMPAT_V7_AAR_ASSETS" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_APPCOMPAT_V7_AAR_ASSETS!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_APPCOMPAT_V7_AAR_ASSETS!" 1>&5; exit 1; }
    fi
  


    
  
  
  ANDROID_CARDVIEW_V7_AAR="$ANDROID_SDK_ROOT/extras/android/m2repository/com/android/support/cardview-v7/$ANDROID_SUPPORT_LIBRARY_VERSION/cardview-v7-$ANDROID_SUPPORT_LIBRARY_VERSION.aar"
  echo $ac_n "checking for cardview-v7 AAR""... $ac_c" 1>&6
echo "configure:15126: checking for cardview-v7 AAR" >&5
  if ! test -e "$ANDROID_CARDVIEW_V7_AAR" ; then
    { echo "configure: error: You must download the cardview-v7 AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_CARDVIEW_V7_AAR)" 1>&2; echo "configure: error: You must download the cardview-v7 AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_CARDVIEW_V7_AAR)" 1>&5; exit 1; }
  fi
  
  echo "$ac_t""$ANDROID_CARDVIEW_V7_AAR" 1>&6

  if ! $PYTHON -m mozbuild.action.explode_aar --destdir=$MOZ_BUILD_ROOT/dist/exploded-aar $ANDROID_CARDVIEW_V7_AAR ; then
    { echo "configure: error: Could not explode $ANDROID_CARDVIEW_V7_AAR!" 1>&2; echo "configure: error: Could not explode $ANDROID_CARDVIEW_V7_AAR!" 1>&5; exit 1; }
  fi

  
  
  
    echo $ac_n "checking for ANDROID_CARDVIEW_V7_AAR_LIB""... $ac_c" 1>&6
echo "configure:15141: checking for ANDROID_CARDVIEW_V7_AAR_LIB" >&5
    ANDROID_CARDVIEW_V7_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/cardview-v7-$ANDROID_SUPPORT_LIBRARY_VERSION/cardview-v7-$ANDROID_SUPPORT_LIBRARY_VERSION-classes.jar"
    if ! test -e "$ANDROID_CARDVIEW_V7_AAR_LIB" ; then
      { echo "configure: error: Could not find required exploded ANDROID_CARDVIEW_V7_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_CARDVIEW_V7_AAR_LIB!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_CARDVIEW_V7_AAR_LIB" 1>&6
    
  

  
  
    echo $ac_n "checking for ANDROID_CARDVIEW_V7_AAR_RES""... $ac_c" 1>&6
echo "configure:15153: checking for ANDROID_CARDVIEW_V7_AAR_RES" >&5
    ANDROID_CARDVIEW_V7_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/cardview-v7-$ANDROID_SUPPORT_LIBRARY_VERSION/res"
    if ! test -e "$ANDROID_CARDVIEW_V7_AAR_RES" ; then
      { echo "configure: error: Could not find required exploded ANDROID_CARDVIEW_V7_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_CARDVIEW_V7_AAR_RES!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_CARDVIEW_V7_AAR_RES" 1>&6
    
  

  
  
    if test -e "$ANDROID_CARDVIEW_V7_AAR_INTERNAL_LIB" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_CARDVIEW_V7_AAR_INTERNAL_LIB!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_CARDVIEW_V7_AAR_INTERNAL_LIB!" 1>&5; exit 1; }
    fi
  

  
  
    if test -e "$ANDROID_CARDVIEW_V7_AAR_ASSETS" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_CARDVIEW_V7_AAR_ASSETS!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_CARDVIEW_V7_AAR_ASSETS!" 1>&5; exit 1; }
    fi
  


    
  
  
  ANDROID_DESIGN_AAR="$ANDROID_SDK_ROOT/extras/android/m2repository/com/android/support/design/$ANDROID_SUPPORT_LIBRARY_VERSION/design-$ANDROID_SUPPORT_LIBRARY_VERSION.aar"
  echo $ac_n "checking for design AAR""... $ac_c" 1>&6
echo "configure:15182: checking for design AAR" >&5
  if ! test -e "$ANDROID_DESIGN_AAR" ; then
    { echo "configure: error: You must download the design AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_DESIGN_AAR)" 1>&2; echo "configure: error: You must download the design AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_DESIGN_AAR)" 1>&5; exit 1; }
  fi
  
  echo "$ac_t""$ANDROID_DESIGN_AAR" 1>&6

  if ! $PYTHON -m mozbuild.action.explode_aar --destdir=$MOZ_BUILD_ROOT/dist/exploded-aar $ANDROID_DESIGN_AAR ; then
    { echo "configure: error: Could not explode $ANDROID_DESIGN_AAR!" 1>&2; echo "configure: error: Could not explode $ANDROID_DESIGN_AAR!" 1>&5; exit 1; }
  fi

  
  
  
    echo $ac_n "checking for ANDROID_DESIGN_AAR_LIB""... $ac_c" 1>&6
echo "configure:15197: checking for ANDROID_DESIGN_AAR_LIB" >&5
    ANDROID_DESIGN_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/design-$ANDROID_SUPPORT_LIBRARY_VERSION/design-$ANDROID_SUPPORT_LIBRARY_VERSION-classes.jar"
    if ! test -e "$ANDROID_DESIGN_AAR_LIB" ; then
      { echo "configure: error: Could not find required exploded ANDROID_DESIGN_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_DESIGN_AAR_LIB!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_DESIGN_AAR_LIB" 1>&6
    
  

  
  
    echo $ac_n "checking for ANDROID_DESIGN_AAR_RES""... $ac_c" 1>&6
echo "configure:15209: checking for ANDROID_DESIGN_AAR_RES" >&5
    ANDROID_DESIGN_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/design-$ANDROID_SUPPORT_LIBRARY_VERSION/res"
    if ! test -e "$ANDROID_DESIGN_AAR_RES" ; then
      { echo "configure: error: Could not find required exploded ANDROID_DESIGN_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_DESIGN_AAR_RES!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_DESIGN_AAR_RES" 1>&6
    
  

  
  
    if test -e "$ANDROID_DESIGN_AAR_INTERNAL_LIB" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_DESIGN_AAR_INTERNAL_LIB!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_DESIGN_AAR_INTERNAL_LIB!" 1>&5; exit 1; }
    fi
  

  
  
    if test -e "$ANDROID_DESIGN_AAR_ASSETS" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_DESIGN_AAR_ASSETS!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_DESIGN_AAR_ASSETS!" 1>&5; exit 1; }
    fi
  


    
  
  
  ANDROID_RECYCLERVIEW_V7_AAR="$ANDROID_SDK_ROOT/extras/android/m2repository/com/android/support/recyclerview-v7/$ANDROID_SUPPORT_LIBRARY_VERSION/recyclerview-v7-$ANDROID_SUPPORT_LIBRARY_VERSION.aar"
  echo $ac_n "checking for recyclerview-v7 AAR""... $ac_c" 1>&6
echo "configure:15238: checking for recyclerview-v7 AAR" >&5
  if ! test -e "$ANDROID_RECYCLERVIEW_V7_AAR" ; then
    { echo "configure: error: You must download the recyclerview-v7 AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_RECYCLERVIEW_V7_AAR)" 1>&2; echo "configure: error: You must download the recyclerview-v7 AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_RECYCLERVIEW_V7_AAR)" 1>&5; exit 1; }
  fi
  
  echo "$ac_t""$ANDROID_RECYCLERVIEW_V7_AAR" 1>&6

  if ! $PYTHON -m mozbuild.action.explode_aar --destdir=$MOZ_BUILD_ROOT/dist/exploded-aar $ANDROID_RECYCLERVIEW_V7_AAR ; then
    { echo "configure: error: Could not explode $ANDROID_RECYCLERVIEW_V7_AAR!" 1>&2; echo "configure: error: Could not explode $ANDROID_RECYCLERVIEW_V7_AAR!" 1>&5; exit 1; }
  fi

  
  
  
    echo $ac_n "checking for ANDROID_RECYCLERVIEW_V7_AAR_LIB""... $ac_c" 1>&6
echo "configure:15253: checking for ANDROID_RECYCLERVIEW_V7_AAR_LIB" >&5
    ANDROID_RECYCLERVIEW_V7_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/recyclerview-v7-$ANDROID_SUPPORT_LIBRARY_VERSION/recyclerview-v7-$ANDROID_SUPPORT_LIBRARY_VERSION-classes.jar"
    if ! test -e "$ANDROID_RECYCLERVIEW_V7_AAR_LIB" ; then
      { echo "configure: error: Could not find required exploded ANDROID_RECYCLERVIEW_V7_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_RECYCLERVIEW_V7_AAR_LIB!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_RECYCLERVIEW_V7_AAR_LIB" 1>&6
    
  

  
  
    echo $ac_n "checking for ANDROID_RECYCLERVIEW_V7_AAR_RES""... $ac_c" 1>&6
echo "configure:15265: checking for ANDROID_RECYCLERVIEW_V7_AAR_RES" >&5
    ANDROID_RECYCLERVIEW_V7_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/recyclerview-v7-$ANDROID_SUPPORT_LIBRARY_VERSION/res"
    if ! test -e "$ANDROID_RECYCLERVIEW_V7_AAR_RES" ; then
      { echo "configure: error: Could not find required exploded ANDROID_RECYCLERVIEW_V7_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_RECYCLERVIEW_V7_AAR_RES!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_RECYCLERVIEW_V7_AAR_RES" 1>&6
    
  

  
  
    if test -e "$ANDROID_RECYCLERVIEW_V7_AAR_INTERNAL_LIB" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_RECYCLERVIEW_V7_AAR_INTERNAL_LIB!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_RECYCLERVIEW_V7_AAR_INTERNAL_LIB!" 1>&5; exit 1; }
    fi
  

  
  
    if test -e "$ANDROID_RECYCLERVIEW_V7_AAR_ASSETS" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_RECYCLERVIEW_V7_AAR_ASSETS!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_RECYCLERVIEW_V7_AAR_ASSETS!" 1>&5; exit 1; }
    fi
  


    
  
  
  ANDROID_SUPPORT_V4_AAR="$ANDROID_SDK_ROOT/extras/android/m2repository/com/android/support/support-v4/$ANDROID_SUPPORT_LIBRARY_VERSION/support-v4-$ANDROID_SUPPORT_LIBRARY_VERSION.aar"
  echo $ac_n "checking for support-v4 AAR""... $ac_c" 1>&6
echo "configure:15294: checking for support-v4 AAR" >&5
  if ! test -e "$ANDROID_SUPPORT_V4_AAR" ; then
    { echo "configure: error: You must download the support-v4 AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_SUPPORT_V4_AAR)" 1>&2; echo "configure: error: You must download the support-v4 AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_SUPPORT_V4_AAR)" 1>&5; exit 1; }
  fi
  
  echo "$ac_t""$ANDROID_SUPPORT_V4_AAR" 1>&6

  if ! $PYTHON -m mozbuild.action.explode_aar --destdir=$MOZ_BUILD_ROOT/dist/exploded-aar $ANDROID_SUPPORT_V4_AAR ; then
    { echo "configure: error: Could not explode $ANDROID_SUPPORT_V4_AAR!" 1>&2; echo "configure: error: Could not explode $ANDROID_SUPPORT_V4_AAR!" 1>&5; exit 1; }
  fi

  
  
  
    echo $ac_n "checking for ANDROID_SUPPORT_V4_AAR_LIB""... $ac_c" 1>&6
echo "configure:15309: checking for ANDROID_SUPPORT_V4_AAR_LIB" >&5
    ANDROID_SUPPORT_V4_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/support-v4-$ANDROID_SUPPORT_LIBRARY_VERSION/support-v4-$ANDROID_SUPPORT_LIBRARY_VERSION-classes.jar"
    if ! test -e "$ANDROID_SUPPORT_V4_AAR_LIB" ; then
      { echo "configure: error: Could not find required exploded ANDROID_SUPPORT_V4_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_SUPPORT_V4_AAR_LIB!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_SUPPORT_V4_AAR_LIB" 1>&6
    
  

  
  
    echo $ac_n "checking for ANDROID_SUPPORT_V4_AAR_RES""... $ac_c" 1>&6
echo "configure:15321: checking for ANDROID_SUPPORT_V4_AAR_RES" >&5
    ANDROID_SUPPORT_V4_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/support-v4-$ANDROID_SUPPORT_LIBRARY_VERSION/res"
    if ! test -e "$ANDROID_SUPPORT_V4_AAR_RES" ; then
      { echo "configure: error: Could not find required exploded ANDROID_SUPPORT_V4_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_SUPPORT_V4_AAR_RES!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_SUPPORT_V4_AAR_RES" 1>&6
    
  

  
  
    echo $ac_n "checking for ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB""... $ac_c" 1>&6
echo "configure:15333: checking for ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB" >&5
    ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/support-v4-$ANDROID_SUPPORT_LIBRARY_VERSION/libs/support-v4-$ANDROID_SUPPORT_LIBRARY_VERSION-internal_impl-$ANDROID_SUPPORT_LIBRARY_VERSION.jar"
    if ! test -e "$ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB" ; then
      { echo "configure: error: Could not find required exploded ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB" 1>&6
    
  

  
  
    if test -e "$ANDROID_SUPPORT_V4_AAR_ASSETS" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_SUPPORT_V4_AAR_ASSETS!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_SUPPORT_V4_AAR_ASSETS!" 1>&5; exit 1; }
    fi
  



    ANDROID_SUPPORT_ANNOTATIONS_JAR="$ANDROID_SDK_ROOT/extras/android/m2repository/com/android/support/support-annotations/$ANDROID_SUPPORT_LIBRARY_VERSION/support-annotations-$ANDROID_SUPPORT_LIBRARY_VERSION.jar"
    echo $ac_n "checking for support-annotations JAR""... $ac_c" 1>&6
echo "configure:15353: checking for support-annotations JAR" >&5
    if ! test -e $ANDROID_SUPPORT_ANNOTATIONS_JAR ; then
        { echo "configure: error: You must download the support-annotations lib.  Run the Android SDK tool and install the Android Support Repository under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (looked for $ANDROID_SUPPORT_ANNOTATIONS_JAR)" 1>&2; echo "configure: error: You must download the support-annotations lib.  Run the Android SDK tool and install the Android Support Repository under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (looked for $ANDROID_SUPPORT_ANNOTATIONS_JAR)" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_SUPPORT_ANNOTATIONS_JAR" 1>&6
    
    ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB=$ANDROID_SUPPORT_ANNOTATIONS_JAR
    
    ;;
esac

# Check whether --with-android-min-sdk or --without-android-min-sdk was given.
if test "${with_android_min_sdk+set}" = set; then
  withval="$with_android_min_sdk"
   MOZ_ANDROID_MIN_SDK_VERSION=$withval 
fi


# Check whether --with-android-max-sdk or --without-android-max-sdk was given.
if test "${with_android_max_sdk+set}" = set; then
  withval="$with_android_max_sdk"
   MOZ_ANDROID_MAX_SDK_VERSION=$withval 
fi


if test -n "$MOZ_ANDROID_MIN_SDK_VERSION"; then
    if test -n "$MOZ_ANDROID_MAX_SDK_VERSION"; then
        if test $MOZ_ANDROID_MAX_SDK_VERSION -lt $MOZ_ANDROID_MIN_SDK_VERSION ; then
            { echo "configure: error: --with-android-max-sdk must be at least the value of --with-android-min-sdk." 1>&2; echo "configure: error: --with-android-max-sdk must be at least the value of --with-android-min-sdk." 1>&5; exit 1; }
        fi
    fi

    if test $MOZ_ANDROID_MIN_SDK_VERSION -gt $ANDROID_TARGET_SDK ; then
        { echo "configure: error: --with-android-min-sdk is expected to be less than $ANDROID_TARGET_SDK" 1>&2; echo "configure: error: --with-android-min-sdk is expected to be less than $ANDROID_TARGET_SDK" 1>&5; exit 1; }
    fi

    cat >> confdefs.pytmp <<EOF
    (''' MOZ_ANDROID_MIN_SDK_VERSION ''', r''' $MOZ_ANDROID_MIN_SDK_VERSION ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_ANDROID_MIN_SDK_VERSION $MOZ_ANDROID_MIN_SDK_VERSION
EOF

    
fi

if test -n "$MOZ_ANDROID_MAX_SDK_VERSION"; then
    cat >> confdefs.pytmp <<EOF
    (''' MOZ_ANDROID_MAX_SDK_VERSION ''', r''' $MOZ_ANDROID_MAX_SDK_VERSION ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_ANDROID_MAX_SDK_VERSION $MOZ_ANDROID_MAX_SDK_VERSION
EOF

    
fi


        ;;
    esac
fi

# Toolkit Options


case "$MOZ_WIDGET_TOOLKIT" in

qt)
    MOZ_ENABLE_QT=1

    cat >> confdefs.pytmp <<\EOF
    (''' QT_NO_KEYWORDS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define QT_NO_KEYWORDS 1
EOF

    ;;

cocoa)
    LDFLAGS="$LDFLAGS -framework Cocoa -lobjc"
    # Use -Wl as a trick to avoid -framework and framework names from
    # being separated by AC_SUBST_LIST.
    TK_LIBS='-Wl,-framework,CoreLocation -Wl,-framework,QuartzCore -Wl,-framework,Carbon -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,AddressBook -Wl,-framework,OpenGL -Wl,-framework,Security -Wl,-framework,ServiceManagement'
    TK_CFLAGS=""
    CFLAGS="$CFLAGS $TK_CFLAGS"
    CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
    MOZ_USER_DIR="Mozilla"
    MOZ_FS_LAYOUT=bundle
    ;;

uikit)
    LDFLAGS="$LDFLAGS -framework UIKit -lobjc"
    TK_CFLAGS=""
    TK_LIBS='-Wl,-framework,Foundation -Wl,-framework,CoreFoundation -Wl,-framework,CoreGraphics -Wl,-framework,CoreText -Wl,-framework,AVFoundation -Wl,-framework,AudioToolbox -Wl,-framework,CoreMedia -Wl,-framework,CoreVideo -Wl,-framework,OpenGLES -Wl,-framework,QuartzCore'
    CFLAGS="$CFLAGS $TK_CFLAGS"
    CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
    MOZ_USER_DIR="Mozilla"
    MOZ_FS_LAYOUT=bundle
    ;;

esac

case "$MOZ_WIDGET_TOOLKIT" in
gtk*)
    MOZ_ENABLE_GTK=1
    ;;
esac

if test "$COMPILE_ENVIRONMENT"; then
  if test "$MOZ_WIDGET_TOOLKIT" = gtk3; then
    succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES""... $ac_c" 1>&6
echo "configure:15475: checking for gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES" >&5

        if $PKG_CONFIG --exists "gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_GTK3_CFLAGS""... $ac_c" 1>&6
echo "configure:15482: checking MOZ_GTK3_CFLAGS" >&5
            MOZ_GTK3_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES"`
            echo "$ac_t""$MOZ_GTK3_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_GTK3_LIBS""... $ac_c" 1>&6
echo "configure:15487: checking MOZ_GTK3_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            MOZ_GTK3_LIBS="`$PKG_CONFIG --libs \"gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$MOZ_GTK3_LIBS" 1>&6
        else
            MOZ_GTK3_CFLAGS=""
            MOZ_GTK3_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            MOZ_GTK3_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES"`
            echo $MOZ_GTK3_PKG_ERRORS
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       { echo "configure: error: Library requirements (gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; }
     fi
  fi

    MOZ_GTK3_CFLAGS="-I${_topsrcdir}/widget/gtk/compat-gtk3 $MOZ_GTK3_CFLAGS"
    TK_CFLAGS=$MOZ_GTK3_CFLAGS
    TK_LIBS=$MOZ_GTK3_LIBS
    cat >> confdefs.pytmp <<EOF
    (''' GDK_VERSION_MIN_REQUIRED ''', r''' $GDK_VERSION_MIN_REQUIRED ''')
EOF
cat >> confdefs.h <<EOF
#define GDK_VERSION_MIN_REQUIRED $GDK_VERSION_MIN_REQUIRED
EOF

    cat >> confdefs.pytmp <<EOF
    (''' GDK_VERSION_MAX_ALLOWED ''', r''' $GDK_VERSION_MIN_REQUIRED ''')
EOF
cat >> confdefs.h <<EOF
#define GDK_VERSION_MAX_ALLOWED $GDK_VERSION_MIN_REQUIRED
EOF

    GLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32
  fi
  if test "$MOZ_WIDGET_TOOLKIT" = gtk2; then
    GLIB_VERSION_MAX_ALLOWED=$GLIB_VERSION_MIN_REQUIRED
  fi
  if test "$MOZ_ENABLE_GTK"; then
    if test "$MOZ_X11"; then
      GDK_PACKAGES=gdk-x11-2.0
    fi
    cat >> confdefs.pytmp <<EOF
    (''' GLIB_VERSION_MIN_REQUIRED ''', r''' $GLIB_VERSION_MIN_REQUIRED ''')
EOF
cat >> confdefs.h <<EOF
#define GLIB_VERSION_MIN_REQUIRED $GLIB_VERSION_MIN_REQUIRED
EOF

    cat >> confdefs.pytmp <<EOF
    (''' GLIB_VERSION_MAX_ALLOWED ''', r''' $GLIB_VERSION_MAX_ALLOWED ''')
EOF
cat >> confdefs.h <<EOF
#define GLIB_VERSION_MAX_ALLOWED $GLIB_VERSION_MAX_ALLOWED
EOF


    succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 $GDK_PACKAGES""... $ac_c" 1>&6
echo "configure:15568: checking for gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 $GDK_PACKAGES" >&5

        if $PKG_CONFIG --exists "gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 $GDK_PACKAGES" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_GTK2_CFLAGS""... $ac_c" 1>&6
echo "configure:15575: checking MOZ_GTK2_CFLAGS" >&5
            MOZ_GTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 $GDK_PACKAGES"`
            echo "$ac_t""$MOZ_GTK2_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_GTK2_LIBS""... $ac_c" 1>&6
echo "configure:15580: checking MOZ_GTK2_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            MOZ_GTK2_LIBS="`$PKG_CONFIG --libs \"gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 $GDK_PACKAGES\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$MOZ_GTK2_LIBS" 1>&6
        else
            MOZ_GTK2_CFLAGS=""
            MOZ_GTK2_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            MOZ_GTK2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 $GDK_PACKAGES"`
            echo $MOZ_GTK2_PKG_ERRORS
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       { echo "configure: error: Library requirements (gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 $GDK_PACKAGES) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (gtk+-2.0 >= $GTK2_VERSION gtk+-unix-print-2.0 glib-2.0 >= $GLIB_VERSION gobject-2.0 $GDK_PACKAGES) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; }
     fi
  fi

    MOZ_GTK2_CFLAGS="-I${_topsrcdir}/widget/gtk/compat $MOZ_GTK2_CFLAGS"
  fi
  if test "$MOZ_WIDGET_TOOLKIT" = gtk2; then
    TK_CFLAGS=$MOZ_GTK2_CFLAGS
    TK_LIBS=$MOZ_GTK2_LIBS
  fi
fi # COMPILE_ENVIRONMENT




if test "$MOZ_ENABLE_GTK"
then
    MOZ_ENABLE_STARTUP_NOTIFICATION=

    # Check whether --enable-startup-notification or --disable-startup-notification was given.
if test "${enable_startup_notification+set}" = set; then
  enableval="$enable_startup_notification"
  if test "$enableval" = "yes"; then
    MOZ_ENABLE_STARTUP_NOTIFICATION=force
  elif test "$enableval" = "no"; then
    MOZ_ENABLE_STARTUP_NOTIFICATION=
  else
    { echo "configure: error: Option, startup-notification, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, startup-notification, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

    if test "$MOZ_ENABLE_STARTUP_NOTIFICATION"
    then
        succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION""... $ac_c" 1>&6
echo "configure:15649: checking for libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION" >&5

        if $PKG_CONFIG --exists "libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_STARTUP_NOTIFICATION_CFLAGS""... $ac_c" 1>&6
echo "configure:15656: checking MOZ_STARTUP_NOTIFICATION_CFLAGS" >&5
            MOZ_STARTUP_NOTIFICATION_CFLAGS=`$PKG_CONFIG --cflags "libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION"`
            echo "$ac_t""$MOZ_STARTUP_NOTIFICATION_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_STARTUP_NOTIFICATION_LIBS""... $ac_c" 1>&6
echo "configure:15661: checking MOZ_STARTUP_NOTIFICATION_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            MOZ_STARTUP_NOTIFICATION_LIBS="`$PKG_CONFIG --libs \"libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$MOZ_STARTUP_NOTIFICATION_LIBS" 1>&6
        else
            MOZ_STARTUP_NOTIFICATION_CFLAGS=""
            MOZ_STARTUP_NOTIFICATION_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            MOZ_STARTUP_NOTIFICATION_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION"`
            
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     MOZ_ENABLE_STARTUP_NOTIFICATION=1
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       
            if test "$MOZ_ENABLE_STARTUP_NOTIFICATION" = "force"
            then
                { echo "configure: error: * * * Could not find startup-notification >= $STARTUP_NOTIFICATION_VERSION" 1>&2; echo "configure: error: * * * Could not find startup-notification >= $STARTUP_NOTIFICATION_VERSION" 1>&5; exit 1; }
            fi
            MOZ_ENABLE_STARTUP_NOTIFICATION=
        
     fi
  fi

    fi

    if test "$MOZ_ENABLE_STARTUP_NOTIFICATION"; then
        cat >> confdefs.pytmp <<\EOF
    (''' MOZ_ENABLE_STARTUP_NOTIFICATION ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ENABLE_STARTUP_NOTIFICATION 1
EOF

    fi

    TK_LIBS="$TK_LIBS $MOZ_STARTUP_NOTIFICATION_LIBS"
fi


# Check whether --enable-printing or --disable-printing was given.
if test "${enable_printing+set}" = set; then
  enableval="$enable_printing"
  if test "$enableval" = "no"; then
    NS_PRINTING=
  elif test "$enableval" = "yes"; then
    NS_PRINTING=1
  else
    { echo "configure: error: Option, printing, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, printing, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_IOS" -a -n "$NS_PRINTING"; then
   { echo "configure: error: Printing is not supported on iOS." 1>&2; echo "configure: error: Printing is not supported on iOS." 1>&5; exit 1; }
fi

if test "$NS_PRINTING"; then
    cat >> confdefs.pytmp <<\EOF
    (''' NS_PRINTING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define NS_PRINTING 1
EOF

    cat >> confdefs.pytmp <<\EOF
    (''' NS_PRINT_PREVIEW ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define NS_PRINT_PREVIEW 1
EOF

fi

if test "$MOZ_ENABLE_QT"
then
    # Check whether --with-qtdir or --without-qtdir was given.
if test "${with_qtdir+set}" = set; then
  withval="$with_qtdir"
   QTDIR=$withval
fi


    if test -z "$QTDIR"; then
        for ac_prog in $HOST_QMAKE qmake
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:15761: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_HOST_QMAKE'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$HOST_QMAKE"; then
  ac_cv_prog_HOST_QMAKE="$HOST_QMAKE" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_HOST_QMAKE="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
HOST_QMAKE="$ac_cv_prog_HOST_QMAKE"
if test -n "$HOST_QMAKE"; then
  echo "$ac_t""$HOST_QMAKE" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$HOST_QMAKE" && break
done
test -n "$HOST_QMAKE" || HOST_QMAKE=""""

    else
        HOST_QMAKE="$QTDIR/bin/qmake"
    fi
    QT_VERSION=`$HOST_QMAKE -v | grep 'Using Qt version' | egrep -o '[0-9]+\.[0-9]+\.[0-9]+'`

    if test -z "$QTDIR"; then
        case $QT_VERSION in
        5.*)
            echo "$ac_t"""Using qt5: $QT_VERSION"" 1>&6
            succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for Qt5Gui Qt5Network Qt5Core Qt5Quick""... $ac_c" 1>&6
echo "configure:15811: checking for Qt5Gui Qt5Network Qt5Core Qt5Quick" >&5

        if $PKG_CONFIG --exists "Qt5Gui Qt5Network Qt5Core Qt5Quick" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_QT_CFLAGS""... $ac_c" 1>&6
echo "configure:15818: checking MOZ_QT_CFLAGS" >&5
            MOZ_QT_CFLAGS=`$PKG_CONFIG --cflags "Qt5Gui Qt5Network Qt5Core Qt5Quick"`
            echo "$ac_t""$MOZ_QT_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_QT_LIBS""... $ac_c" 1>&6
echo "configure:15823: checking MOZ_QT_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            MOZ_QT_LIBS="`$PKG_CONFIG --libs \"Qt5Gui Qt5Network Qt5Core Qt5Quick\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$MOZ_QT_LIBS" 1>&6
        else
            MOZ_QT_CFLAGS=""
            MOZ_QT_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            MOZ_QT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "Qt5Gui Qt5Network Qt5Core Qt5Quick"`
            
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       
              { echo "configure: error: $MOZ_QT_PKG_ERRORS Need qtbase development packages, (On Ubuntu, you might try installing the packages qtbase5-dev libqt5opengl5-dev.)" 1>&2; echo "configure: error: $MOZ_QT_PKG_ERRORS Need qtbase development packages, (On Ubuntu, you might try installing the packages qtbase5-dev libqt5opengl5-dev.)" 1>&5; exit 1; }
            
     fi
  fi

            QT5INCDIR=`pkg-config --variable=includedir Qt5Gui`
            MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QT5INCDIR/QtGui/$QT_VERSION/QtGui"
            if test "$NS_PRINTING"; then
                succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for Qt5PrintSupport""... $ac_c" 1>&6
echo "configure:15868: checking for Qt5PrintSupport" >&5

        if $PKG_CONFIG --exists "Qt5PrintSupport" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_QT_WIDGETS_CFLAGS""... $ac_c" 1>&6
echo "configure:15875: checking MOZ_QT_WIDGETS_CFLAGS" >&5
            MOZ_QT_WIDGETS_CFLAGS=`$PKG_CONFIG --cflags "Qt5PrintSupport"`
            echo "$ac_t""$MOZ_QT_WIDGETS_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_QT_WIDGETS_LIBS""... $ac_c" 1>&6
echo "configure:15880: checking MOZ_QT_WIDGETS_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            MOZ_QT_WIDGETS_LIBS="`$PKG_CONFIG --libs \"Qt5PrintSupport\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$MOZ_QT_WIDGETS_LIBS" 1>&6
        else
            MOZ_QT_WIDGETS_CFLAGS=""
            MOZ_QT_WIDGETS_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            MOZ_QT_WIDGETS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "Qt5PrintSupport"`
            
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       
                  { echo "configure: error: $MOZ_QT_PKG_ERRORS Need qt5 printsupport development package" 1>&2; echo "configure: error: $MOZ_QT_PKG_ERRORS Need qt5 printsupport development package" 1>&5; exit 1; }
                
     fi
  fi

                MOZ_QT_LIBS="$MOZ_QT_LIBS $MOZ_QT_WIDGETS_LIBS"
                MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS $MOZ_QT_WIDGETS_CFLAGS"
            fi
            ;;
        *)
            { echo "configure: error: * * * Unsupported Qt Version: $QT_VERSION" 1>&2; echo "configure: error: * * * Unsupported Qt Version: $QT_VERSION" 1>&5; exit 1; }
            ;;
        esac

        for ac_prog in $MOC moc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:15925: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_HOST_MOC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$HOST_MOC"; then
  ac_cv_prog_HOST_MOC="$HOST_MOC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_HOST_MOC="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
HOST_MOC="$ac_cv_prog_HOST_MOC"
if test -n "$HOST_MOC"; then
  echo "$ac_t""$HOST_MOC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$HOST_MOC" && break
done
test -n "$HOST_MOC" || HOST_MOC=""""

        for ac_prog in $RCC rcc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:15960: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_HOST_RCC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$HOST_RCC"; then
  ac_cv_prog_HOST_RCC="$HOST_RCC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_HOST_RCC="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
HOST_RCC="$ac_cv_prog_HOST_RCC"
if test -n "$HOST_RCC"; then
  echo "$ac_t""$HOST_RCC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$HOST_RCC" && break
done
test -n "$HOST_RCC" || HOST_RCC=""""

    else
        MOZ_QT_CFLAGS="-DQT_SHARED"
        MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include"
        MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtGui"
        MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtCore"
        MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtNetwork"
        MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtXml"
        MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtDeclarative"
        case $QT_VERSION in
        5.*)
            echo "$ac_t"""Using qt5: $QT_VERSION"" 1>&6
            MOZ_QT_LIBS="$MOZ_QT_LIBS -L$QTDIR/lib/ -lQt5Gui -lQt5Network -lQt5Core -lQt5Xml"
            MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtGui/$QT_VERSION/QtGui"
            if test "$NS_PRINTING"; then
                MOZ_QT_LIBS="$MOZ_QT_LIBS -lQt5Widgets -lQt5PrintSupport"
                MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtPrintSupport"
            fi
            ;;
        *)
            { echo "configure: error: * * * Unsupported Qt Version: $QT_VERSION" 1>&2; echo "configure: error: * * * Unsupported Qt Version: $QT_VERSION" 1>&5; exit 1; }
            ;;
        esac

        HOST_MOC="$QTDIR/bin/moc"
        HOST_RCC="$QTDIR/bin/rcc"
    fi
    if test -z "$HOST_MOC"; then
        { echo "configure: error: No acceptable moc preprocessor found. Qt SDK is not installed or --with-qt is incorrect" 1>&2; echo "configure: error: No acceptable moc preprocessor found. Qt SDK is not installed or --with-qt is incorrect" 1>&5; exit 1; }
    fi
    if test -z "$HOST_RCC"; then
        { echo "configure: error: No acceptable rcc preprocessor found. Qt SDK is not installed or --with-qt is incorrect" 1>&2; echo "configure: error: No acceptable rcc preprocessor found. Qt SDK is not installed or --with-qt is incorrect" 1>&5; exit 1; }
    fi

    MOC=$HOST_MOC
    RCC=$HOST_RCC

    MOZ_ENABLE_QMSYSTEM2=
    succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for qmsystem2""... $ac_c" 1>&6
echo "configure:16038: checking for qmsystem2" >&5

        if $PKG_CONFIG --exists "qmsystem2" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking _QMSYSTEM2_CFLAGS""... $ac_c" 1>&6
echo "configure:16045: checking _QMSYSTEM2_CFLAGS" >&5
            _QMSYSTEM2_CFLAGS=`$PKG_CONFIG --cflags "qmsystem2"`
            echo "$ac_t""$_QMSYSTEM2_CFLAGS" 1>&6

            echo $ac_n "checking _QMSYSTEM2_LIBS""... $ac_c" 1>&6
echo "configure:16050: checking _QMSYSTEM2_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            _QMSYSTEM2_LIBS="`$PKG_CONFIG --libs \"qmsystem2\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$_QMSYSTEM2_LIBS" 1>&6
        else
            _QMSYSTEM2_CFLAGS=""
            _QMSYSTEM2_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            _QMSYSTEM2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "qmsystem2"`
            
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     MOZ_ENABLE_QMSYSTEM2=1
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       MOZ_ENABLE_QMSYSTEM2=
     fi
  fi


    if test "$MOZ_ENABLE_QMSYSTEM2"; then
      MOZ_ENABLE_QMSYSTEM2=1
      MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS $_QMSYSTEM2_CFLAGS"
      MOZ_QT_LIBS="$MOZ_QT_LIBS $_QMSYSTEM2_LIBS"
      cat >> confdefs.pytmp <<\EOF
    (''' MOZ_ENABLE_QMSYSTEM2 ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ENABLE_QMSYSTEM2 1
EOF

    fi

    MOZ_ENABLE_QTNETWORK=
    succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for QtNetwork >= 4.7""... $ac_c" 1>&6
echo "configure:16105: checking for QtNetwork >= 4.7" >&5

        if $PKG_CONFIG --exists "QtNetwork >= 4.7" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking _QTNETWORK_CFLAGS""... $ac_c" 1>&6
echo "configure:16112: checking _QTNETWORK_CFLAGS" >&5
            _QTNETWORK_CFLAGS=`$PKG_CONFIG --cflags "QtNetwork >= 4.7"`
            echo "$ac_t""$_QTNETWORK_CFLAGS" 1>&6

            echo $ac_n "checking _QTNETWORK_LIBS""... $ac_c" 1>&6
echo "configure:16117: checking _QTNETWORK_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            _QTNETWORK_LIBS="`$PKG_CONFIG --libs \"QtNetwork >= 4.7\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$_QTNETWORK_LIBS" 1>&6
        else
            _QTNETWORK_CFLAGS=""
            _QTNETWORK_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            _QTNETWORK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "QtNetwork >= 4.7"`
            
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     MOZ_ENABLE_QTNETWORK=1
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       MOZ_ENABLE_QTNETWORK=
     fi
  fi


    if test "$MOZ_ENABLE_QTNETWORK"; then
      MOZ_ENABLE_QTNETWORK=1
      cat >> confdefs.pytmp <<\EOF
    (''' MOZ_ENABLE_QTNETWORK ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ENABLE_QTNETWORK 1
EOF

    fi

    MOZ_ENABLE_QTMOBILITY=
    succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for QtSensors QtFeedback QtLocation""... $ac_c" 1>&6
echo "configure:16170: checking for QtSensors QtFeedback QtLocation" >&5

        if $PKG_CONFIG --exists "QtSensors QtFeedback QtLocation" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking _QTMOBILITY_CFLAGS""... $ac_c" 1>&6
echo "configure:16177: checking _QTMOBILITY_CFLAGS" >&5
            _QTMOBILITY_CFLAGS=`$PKG_CONFIG --cflags "QtSensors QtFeedback QtLocation"`
            echo "$ac_t""$_QTMOBILITY_CFLAGS" 1>&6

            echo $ac_n "checking _QTMOBILITY_LIBS""... $ac_c" 1>&6
echo "configure:16182: checking _QTMOBILITY_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            _QTMOBILITY_LIBS="`$PKG_CONFIG --libs \"QtSensors QtFeedback QtLocation\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$_QTMOBILITY_LIBS" 1>&6
        else
            _QTMOBILITY_CFLAGS=""
            _QTMOBILITY_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            _QTMOBILITY_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "QtSensors QtFeedback QtLocation"`
            
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     MOZ_ENABLE_QTMOBILITY=1
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       MOZ_ENABLE_QTMOBILITY=
     fi
  fi

    if test "$MOZ_ENABLE_QTMOBILITY"; then
       MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS $_QTMOBILITY_CFLAGS"
       MOZ_QT_LIBS="$MOZ_QT_LIBS $_QTMOBILITY_LIBS"
    else
       echo $ac_n "checking for main in -lQtSensors""... $ac_c" 1>&6
echo "configure:16216: checking for main in -lQtSensors" >&5
ac_lib_var=`echo QtSensors'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lQtSensors  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 16224 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:16231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
          MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtMobility"
          MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtSensors"
          MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtFeedback"
          MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtLocation"
          MOZ_QT_LIBS="$MOZ_QT_LIBS -lQtSensors -lQtFeedback -lQtLocation"
       
else
  echo "$ac_t""no" 1>&6
fi

    fi

    MOZ_ENABLE_QT5FEEDBACK=
    succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for Qt0Feedback""... $ac_c" 1>&6
echo "configure:16271: checking for Qt0Feedback" >&5

        if $PKG_CONFIG --exists "Qt0Feedback" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking _QT5FEEDBACK_CFLAGS""... $ac_c" 1>&6
echo "configure:16278: checking _QT5FEEDBACK_CFLAGS" >&5
            _QT5FEEDBACK_CFLAGS=`$PKG_CONFIG --cflags "Qt0Feedback"`
            echo "$ac_t""$_QT5FEEDBACK_CFLAGS" 1>&6

            echo $ac_n "checking _QT5FEEDBACK_LIBS""... $ac_c" 1>&6
echo "configure:16283: checking _QT5FEEDBACK_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            _QT5FEEDBACK_LIBS="`$PKG_CONFIG --libs \"Qt0Feedback\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$_QT5FEEDBACK_LIBS" 1>&6
        else
            _QT5FEEDBACK_CFLAGS=""
            _QT5FEEDBACK_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            _QT5FEEDBACK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "Qt0Feedback"`
            
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     MOZ_ENABLE_QT5FEEDBACK=1
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       MOZ_ENABLE_QT5FEEDBACK=
     fi
  fi

    if test "$MOZ_ENABLE_QT5FEEDBACK"; then
       MOZ_ENABLE_QT5FEEDBACK=1
       MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS $_QT5FEEDBACK_CFLAGS"
       MOZ_QT_LIBS="$MOZ_QT_LIBS $_QT5FEEDBACK_LIBS"
       cat >> confdefs.pytmp <<\EOF
    (''' MOZ_ENABLE_QT5FEEDBACK ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ENABLE_QT5FEEDBACK 1
EOF

       
    fi

    MOZ_ENABLE_QT5GEOPOSITION=
    succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for Qt5Positioning""... $ac_c" 1>&6
echo "configure:16338: checking for Qt5Positioning" >&5

        if $PKG_CONFIG --exists "Qt5Positioning" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking _QT5GEOPOSITION_CFLAGS""... $ac_c" 1>&6
echo "configure:16345: checking _QT5GEOPOSITION_CFLAGS" >&5
            _QT5GEOPOSITION_CFLAGS=`$PKG_CONFIG --cflags "Qt5Positioning"`
            echo "$ac_t""$_QT5GEOPOSITION_CFLAGS" 1>&6

            echo $ac_n "checking _QT5GEOPOSITION_LIBS""... $ac_c" 1>&6
echo "configure:16350: checking _QT5GEOPOSITION_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            _QT5GEOPOSITION_LIBS="`$PKG_CONFIG --libs \"Qt5Positioning\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$_QT5GEOPOSITION_LIBS" 1>&6
        else
            _QT5GEOPOSITION_CFLAGS=""
            _QT5GEOPOSITION_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            _QT5GEOPOSITION_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "Qt5Positioning"`
            
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     MOZ_ENABLE_QT5GEOPOSITION=1
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       MOZ_ENABLE_QT5GEOPOSITION=
     fi
  fi

    if test "$MOZ_ENABLE_QT5GEOPOSITION"; then
       MOZ_ENABLE_QT5GEOPOSITION=1
       MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS $_QT5GEOPOSITION_CFLAGS"
       MOZ_QT_LIBS="$MOZ_QT_LIBS $_QT5GEOPOSITION_LIBS"
       cat >> confdefs.pytmp <<\EOF
    (''' MOZ_ENABLE_QT5GEOPOSITION ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ENABLE_QT5GEOPOSITION 1
EOF

       
    fi

    if test "$MOZ_ENABLE_CONTENTACTION"; then
      MOZ_ENABLE_CONTENTACTION=1
      cat >> confdefs.pytmp <<\EOF
    (''' MOZ_ENABLE_CONTENTACTION ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ENABLE_CONTENTACTION 1
EOF

    fi

    MOZ_ENABLE_CONTENTACTION=
    succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for contentaction-0.1""... $ac_c" 1>&6
echo "configure:16416: checking for contentaction-0.1" >&5

        if $PKG_CONFIG --exists "contentaction-0.1" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking LIBCONTENTACTION_CFLAGS""... $ac_c" 1>&6
echo "configure:16423: checking LIBCONTENTACTION_CFLAGS" >&5
            LIBCONTENTACTION_CFLAGS=`$PKG_CONFIG --cflags "contentaction-0.1"`
            echo "$ac_t""$LIBCONTENTACTION_CFLAGS" 1>&6

            echo $ac_n "checking LIBCONTENTACTION_LIBS""... $ac_c" 1>&6
echo "configure:16428: checking LIBCONTENTACTION_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            LIBCONTENTACTION_LIBS="`$PKG_CONFIG --libs \"contentaction-0.1\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$LIBCONTENTACTION_LIBS" 1>&6
        else
            LIBCONTENTACTION_CFLAGS=""
            LIBCONTENTACTION_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            LIBCONTENTACTION_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "contentaction-0.1"`
            
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     _LIB_FOUND=1
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       _LIB_FOUND=
     fi
  fi

    if test "$MOZ_ENABLE_CONTENTACTION"; then
       MOZ_ENABLE_CONTENTACTION=1
       MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS $_CONTENTACTION_CFLAGS"
       MOZ_QT_LIBS="$MOZ_QT_LIBS $_CONTENTACTION_LIBS"
       cat >> confdefs.pytmp <<\EOF
    (''' MOZ_ENABLE_CONTENTACTION ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ENABLE_CONTENTACTION 1
EOF

       
    fi
    TK_CFLAGS=$MOZ_QT_CFLAGS
    TK_LIBS=$MOZ_QT_LIBS
fi













# Components and Features

# Check whether --enable-ui-locale or --disable-ui-locale was given.
if test "${enable_ui_locale+set}" = set; then
  enableval="$enable_ui_locale"
  MOZ_UI_LOCALE=$enableval 
fi




if test -n "$MOZ_OFFICIAL_BRANDING"; then
  if test -z "$MOZ_OFFICIAL_BRANDING_DIRECTORY"; then
    { echo "configure: error: You must specify MOZ_OFFICIAL_BRANDING_DIRECTORY to use --enable-official-branding." 1>&2; echo "configure: error: You must specify MOZ_OFFICIAL_BRANDING_DIRECTORY to use --enable-official-branding." 1>&5; exit 1; }
  else
    MOZ_BRANDING_DIRECTORY=${MOZ_OFFICIAL_BRANDING_DIRECTORY}
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_OFFICIAL_BRANDING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_OFFICIAL_BRANDING 1
EOF

  fi
fi

# Check whether --with-branding or --without-branding was given.
if test "${with_branding+set}" = set; then
  withval="$with_branding"
  MOZ_BRANDING_DIRECTORY=$withval
fi


REAL_BRANDING_DIRECTORY="${MOZ_BRANDING_DIRECTORY}"
if test -z "$REAL_BRANDING_DIRECTORY"; then
  REAL_BRANDING_DIRECTORY=${MOZ_BUILD_APP}/branding/nightly
fi

if test -f "${_topsrcdir}/$REAL_BRANDING_DIRECTORY/configure.sh"; then
  . "${_topsrcdir}/$REAL_BRANDING_DIRECTORY/configure.sh"
elif test -f "${EXTERNAL_SOURCE_DIR}/$REAL_BRANDING_DIRECTORY/configure.sh"; then
  . "${EXTERNAL_SOURCE_DIR}/$REAL_BRANDING_DIRECTORY/configure.sh"
fi



# Check whether --with-distribution-id or --without-distribution-id was given.
if test "${with_distribution_id+set}" = set; then
  withval="$with_distribution_id"
   val=`echo $withval`
    MOZ_DISTRIBUTION_ID="$val"
fi


if test -z "$MOZ_DISTRIBUTION_ID"; then
   MOZ_DISTRIBUTION_ID="org.mozilla"
fi

cat >> confdefs.pytmp <<EOF
    (''' MOZ_DISTRIBUTION_ID ''', r''' "$MOZ_DISTRIBUTION_ID" ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_DISTRIBUTION_ID "$MOZ_DISTRIBUTION_ID"
EOF







if test -n "$MOZ_NATIVE_DEVICES" ; then
    

    
  
  
  ANDROID_PLAY_SERVICES_BASE_AAR="$ANDROID_SDK_ROOT/extras/google/m2repository/com/google/android/gms/play-services-base/$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-base-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION.aar"
  echo $ac_n "checking for play-services-base AAR""... $ac_c" 1>&6
echo "configure:16565: checking for play-services-base AAR" >&5
  if ! test -e "$ANDROID_PLAY_SERVICES_BASE_AAR" ; then
    { echo "configure: error: You must download the play-services-base AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_BASE_AAR)" 1>&2; echo "configure: error: You must download the play-services-base AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_BASE_AAR)" 1>&5; exit 1; }
  fi
  
  echo "$ac_t""$ANDROID_PLAY_SERVICES_BASE_AAR" 1>&6

  if ! $PYTHON -m mozbuild.action.explode_aar --destdir=$MOZ_BUILD_ROOT/dist/exploded-aar $ANDROID_PLAY_SERVICES_BASE_AAR ; then
    { echo "configure: error: Could not explode $ANDROID_PLAY_SERVICES_BASE_AAR!" 1>&2; echo "configure: error: Could not explode $ANDROID_PLAY_SERVICES_BASE_AAR!" 1>&5; exit 1; }
  fi

  
  
  
    echo $ac_n "checking for ANDROID_PLAY_SERVICES_BASE_AAR_LIB""... $ac_c" 1>&6
echo "configure:16580: checking for ANDROID_PLAY_SERVICES_BASE_AAR_LIB" >&5
    ANDROID_PLAY_SERVICES_BASE_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-base-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-base-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION-classes.jar"
    if ! test -e "$ANDROID_PLAY_SERVICES_BASE_AAR_LIB" ; then
      { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASE_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASE_AAR_LIB!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_PLAY_SERVICES_BASE_AAR_LIB" 1>&6
    
  

  
  
    echo $ac_n "checking for ANDROID_PLAY_SERVICES_BASE_AAR_RES""... $ac_c" 1>&6
echo "configure:16592: checking for ANDROID_PLAY_SERVICES_BASE_AAR_RES" >&5
    ANDROID_PLAY_SERVICES_BASE_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-base-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/res"
    if ! test -e "$ANDROID_PLAY_SERVICES_BASE_AAR_RES" ; then
      { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASE_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASE_AAR_RES!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_PLAY_SERVICES_BASE_AAR_RES" 1>&6
    
  

  
  
    if test -e "$ANDROID_PLAY_SERVICES_BASE_AAR_INTERNAL_LIB" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_BASE_AAR_INTERNAL_LIB!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_BASE_AAR_INTERNAL_LIB!" 1>&5; exit 1; }
    fi
  

  
  
    if test -e "$ANDROID_PLAY_SERVICES_BASE_AAR_ASSETS" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_BASE_AAR_ASSETS!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_BASE_AAR_ASSETS!" 1>&5; exit 1; }
    fi
  


    
  
  
  ANDROID_PLAY_SERVICES_BASEMENT_AAR="$ANDROID_SDK_ROOT/extras/google/m2repository/com/google/android/gms/play-services-basement/$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION.aar"
  echo $ac_n "checking for play-services-basement AAR""... $ac_c" 1>&6
echo "configure:16621: checking for play-services-basement AAR" >&5
  if ! test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR" ; then
    { echo "configure: error: You must download the play-services-basement AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_BASEMENT_AAR)" 1>&2; echo "configure: error: You must download the play-services-basement AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_BASEMENT_AAR)" 1>&5; exit 1; }
  fi
  
  echo "$ac_t""$ANDROID_PLAY_SERVICES_BASEMENT_AAR" 1>&6

  if ! $PYTHON -m mozbuild.action.explode_aar --destdir=$MOZ_BUILD_ROOT/dist/exploded-aar $ANDROID_PLAY_SERVICES_BASEMENT_AAR ; then
    { echo "configure: error: Could not explode $ANDROID_PLAY_SERVICES_BASEMENT_AAR!" 1>&2; echo "configure: error: Could not explode $ANDROID_PLAY_SERVICES_BASEMENT_AAR!" 1>&5; exit 1; }
  fi

  
  
  
    echo $ac_n "checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB""... $ac_c" 1>&6
echo "configure:16636: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB" >&5
    ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION-classes.jar"
    if ! test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB" ; then
      { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB" 1>&6
    
  

  
  
    echo $ac_n "checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES""... $ac_c" 1>&6
echo "configure:16648: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES" >&5
    ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/res"
    if ! test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES" ; then
      { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES" 1>&6
    
  

  
  
    if test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR_INTERNAL_LIB" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_INTERNAL_LIB!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_INTERNAL_LIB!" 1>&5; exit 1; }
    fi
  

  
  
    if test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR_ASSETS" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_ASSETS!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_ASSETS!" 1>&5; exit 1; }
    fi
  


    
  
  
  ANDROID_PLAY_SERVICES_CAST_AAR="$ANDROID_SDK_ROOT/extras/google/m2repository/com/google/android/gms/play-services-cast/$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-cast-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION.aar"
  echo $ac_n "checking for play-services-cast AAR""... $ac_c" 1>&6
echo "configure:16677: checking for play-services-cast AAR" >&5
  if ! test -e "$ANDROID_PLAY_SERVICES_CAST_AAR" ; then
    { echo "configure: error: You must download the play-services-cast AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_CAST_AAR)" 1>&2; echo "configure: error: You must download the play-services-cast AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_CAST_AAR)" 1>&5; exit 1; }
  fi
  
  echo "$ac_t""$ANDROID_PLAY_SERVICES_CAST_AAR" 1>&6

  if ! $PYTHON -m mozbuild.action.explode_aar --destdir=$MOZ_BUILD_ROOT/dist/exploded-aar $ANDROID_PLAY_SERVICES_CAST_AAR ; then
    { echo "configure: error: Could not explode $ANDROID_PLAY_SERVICES_CAST_AAR!" 1>&2; echo "configure: error: Could not explode $ANDROID_PLAY_SERVICES_CAST_AAR!" 1>&5; exit 1; }
  fi

  
  
  
    echo $ac_n "checking for ANDROID_PLAY_SERVICES_CAST_AAR_LIB""... $ac_c" 1>&6
echo "configure:16692: checking for ANDROID_PLAY_SERVICES_CAST_AAR_LIB" >&5
    ANDROID_PLAY_SERVICES_CAST_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-cast-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-cast-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION-classes.jar"
    if ! test -e "$ANDROID_PLAY_SERVICES_CAST_AAR_LIB" ; then
      { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_CAST_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_CAST_AAR_LIB!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_PLAY_SERVICES_CAST_AAR_LIB" 1>&6
    
  

  
  
    echo $ac_n "checking for ANDROID_PLAY_SERVICES_CAST_AAR_RES""... $ac_c" 1>&6
echo "configure:16704: checking for ANDROID_PLAY_SERVICES_CAST_AAR_RES" >&5
    ANDROID_PLAY_SERVICES_CAST_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-cast-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/res"
    if ! test -e "$ANDROID_PLAY_SERVICES_CAST_AAR_RES" ; then
      { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_CAST_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_CAST_AAR_RES!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_PLAY_SERVICES_CAST_AAR_RES" 1>&6
    
  

  
  
    if test -e "$ANDROID_PLAY_SERVICES_CAST_AAR_INTERNAL_LIB" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_CAST_AAR_INTERNAL_LIB!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_CAST_AAR_INTERNAL_LIB!" 1>&5; exit 1; }
    fi
  

  
  
    if test -e "$ANDROID_PLAY_SERVICES_CAST_AAR_ASSETS" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_CAST_AAR_ASSETS!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_CAST_AAR_ASSETS!" 1>&5; exit 1; }
    fi
  


    
  
  
  ANDROID_MEDIAROUTER_V7_AAR="$ANDROID_SDK_ROOT/extras/android/m2repository/com/android/support/mediarouter-v7/$ANDROID_SUPPORT_LIBRARY_VERSION/mediarouter-v7-$ANDROID_SUPPORT_LIBRARY_VERSION.aar"
  echo $ac_n "checking for mediarouter-v7 AAR""... $ac_c" 1>&6
echo "configure:16733: checking for mediarouter-v7 AAR" >&5
  if ! test -e "$ANDROID_MEDIAROUTER_V7_AAR" ; then
    { echo "configure: error: You must download the mediarouter-v7 AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_MEDIAROUTER_V7_AAR)" 1>&2; echo "configure: error: You must download the mediarouter-v7 AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_MEDIAROUTER_V7_AAR)" 1>&5; exit 1; }
  fi
  
  echo "$ac_t""$ANDROID_MEDIAROUTER_V7_AAR" 1>&6

  if ! $PYTHON -m mozbuild.action.explode_aar --destdir=$MOZ_BUILD_ROOT/dist/exploded-aar $ANDROID_MEDIAROUTER_V7_AAR ; then
    { echo "configure: error: Could not explode $ANDROID_MEDIAROUTER_V7_AAR!" 1>&2; echo "configure: error: Could not explode $ANDROID_MEDIAROUTER_V7_AAR!" 1>&5; exit 1; }
  fi

  
  
  
    echo $ac_n "checking for ANDROID_MEDIAROUTER_V7_AAR_LIB""... $ac_c" 1>&6
echo "configure:16748: checking for ANDROID_MEDIAROUTER_V7_AAR_LIB" >&5
    ANDROID_MEDIAROUTER_V7_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/mediarouter-v7-$ANDROID_SUPPORT_LIBRARY_VERSION/mediarouter-v7-$ANDROID_SUPPORT_LIBRARY_VERSION-classes.jar"
    if ! test -e "$ANDROID_MEDIAROUTER_V7_AAR_LIB" ; then
      { echo "configure: error: Could not find required exploded ANDROID_MEDIAROUTER_V7_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_MEDIAROUTER_V7_AAR_LIB!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_MEDIAROUTER_V7_AAR_LIB" 1>&6
    
  

  
  
    echo $ac_n "checking for ANDROID_MEDIAROUTER_V7_AAR_RES""... $ac_c" 1>&6
echo "configure:16760: checking for ANDROID_MEDIAROUTER_V7_AAR_RES" >&5
    ANDROID_MEDIAROUTER_V7_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/mediarouter-v7-$ANDROID_SUPPORT_LIBRARY_VERSION/res"
    if ! test -e "$ANDROID_MEDIAROUTER_V7_AAR_RES" ; then
      { echo "configure: error: Could not find required exploded ANDROID_MEDIAROUTER_V7_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_MEDIAROUTER_V7_AAR_RES!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_MEDIAROUTER_V7_AAR_RES" 1>&6
    
  

  
  
    echo $ac_n "checking for ANDROID_MEDIAROUTER_V7_AAR_INTERNAL_LIB""... $ac_c" 1>&6
echo "configure:16772: checking for ANDROID_MEDIAROUTER_V7_AAR_INTERNAL_LIB" >&5
    ANDROID_MEDIAROUTER_V7_AAR_INTERNAL_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/mediarouter-v7-$ANDROID_SUPPORT_LIBRARY_VERSION/libs/mediarouter-v7-$ANDROID_SUPPORT_LIBRARY_VERSION-internal_impl-$ANDROID_SUPPORT_LIBRARY_VERSION.jar"
    if ! test -e "$ANDROID_MEDIAROUTER_V7_AAR_INTERNAL_LIB" ; then
      { echo "configure: error: Could not find required exploded ANDROID_MEDIAROUTER_V7_AAR_INTERNAL_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_MEDIAROUTER_V7_AAR_INTERNAL_LIB!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_MEDIAROUTER_V7_AAR_INTERNAL_LIB" 1>&6
    
  

  
  
    if test -e "$ANDROID_MEDIAROUTER_V7_AAR_ASSETS" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_MEDIAROUTER_V7_AAR_ASSETS!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_MEDIAROUTER_V7_AAR_ASSETS!" 1>&5; exit 1; }
    fi
  


fi




if test -n "$MOZ_ANDROID_GCM" ; then
    
  
  
  ANDROID_PLAY_SERVICES_BASE_AAR="$ANDROID_SDK_ROOT/extras/google/m2repository/com/google/android/gms/play-services-base/$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-base-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION.aar"
  echo $ac_n "checking for play-services-base AAR""... $ac_c" 1>&6
echo "configure:16800: checking for play-services-base AAR" >&5
  if ! test -e "$ANDROID_PLAY_SERVICES_BASE_AAR" ; then
    { echo "configure: error: You must download the play-services-base AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_BASE_AAR)" 1>&2; echo "configure: error: You must download the play-services-base AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_BASE_AAR)" 1>&5; exit 1; }
  fi
  
  echo "$ac_t""$ANDROID_PLAY_SERVICES_BASE_AAR" 1>&6

  if ! $PYTHON -m mozbuild.action.explode_aar --destdir=$MOZ_BUILD_ROOT/dist/exploded-aar $ANDROID_PLAY_SERVICES_BASE_AAR ; then
    { echo "configure: error: Could not explode $ANDROID_PLAY_SERVICES_BASE_AAR!" 1>&2; echo "configure: error: Could not explode $ANDROID_PLAY_SERVICES_BASE_AAR!" 1>&5; exit 1; }
  fi

  
  
  
    echo $ac_n "checking for ANDROID_PLAY_SERVICES_BASE_AAR_LIB""... $ac_c" 1>&6
echo "configure:16815: checking for ANDROID_PLAY_SERVICES_BASE_AAR_LIB" >&5
    ANDROID_PLAY_SERVICES_BASE_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-base-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-base-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION-classes.jar"
    if ! test -e "$ANDROID_PLAY_SERVICES_BASE_AAR_LIB" ; then
      { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASE_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASE_AAR_LIB!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_PLAY_SERVICES_BASE_AAR_LIB" 1>&6
    
  

  
  
    echo $ac_n "checking for ANDROID_PLAY_SERVICES_BASE_AAR_RES""... $ac_c" 1>&6
echo "configure:16827: checking for ANDROID_PLAY_SERVICES_BASE_AAR_RES" >&5
    ANDROID_PLAY_SERVICES_BASE_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-base-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/res"
    if ! test -e "$ANDROID_PLAY_SERVICES_BASE_AAR_RES" ; then
      { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASE_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASE_AAR_RES!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_PLAY_SERVICES_BASE_AAR_RES" 1>&6
    
  

  
  
    if test -e "$ANDROID_PLAY_SERVICES_BASE_AAR_INTERNAL_LIB" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_BASE_AAR_INTERNAL_LIB!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_BASE_AAR_INTERNAL_LIB!" 1>&5; exit 1; }
    fi
  

  
  
    if test -e "$ANDROID_PLAY_SERVICES_BASE_AAR_ASSETS" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_BASE_AAR_ASSETS!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_BASE_AAR_ASSETS!" 1>&5; exit 1; }
    fi
  


    
  
  
  ANDROID_PLAY_SERVICES_BASEMENT_AAR="$ANDROID_SDK_ROOT/extras/google/m2repository/com/google/android/gms/play-services-basement/$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION.aar"
  echo $ac_n "checking for play-services-basement AAR""... $ac_c" 1>&6
echo "configure:16856: checking for play-services-basement AAR" >&5
  if ! test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR" ; then
    { echo "configure: error: You must download the play-services-basement AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_BASEMENT_AAR)" 1>&2; echo "configure: error: You must download the play-services-basement AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_BASEMENT_AAR)" 1>&5; exit 1; }
  fi
  
  echo "$ac_t""$ANDROID_PLAY_SERVICES_BASEMENT_AAR" 1>&6

  if ! $PYTHON -m mozbuild.action.explode_aar --destdir=$MOZ_BUILD_ROOT/dist/exploded-aar $ANDROID_PLAY_SERVICES_BASEMENT_AAR ; then
    { echo "configure: error: Could not explode $ANDROID_PLAY_SERVICES_BASEMENT_AAR!" 1>&2; echo "configure: error: Could not explode $ANDROID_PLAY_SERVICES_BASEMENT_AAR!" 1>&5; exit 1; }
  fi

  
  
  
    echo $ac_n "checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB""... $ac_c" 1>&6
echo "configure:16871: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB" >&5
    ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION-classes.jar"
    if ! test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB" ; then
      { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB" 1>&6
    
  

  
  
    echo $ac_n "checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES""... $ac_c" 1>&6
echo "configure:16883: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES" >&5
    ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/res"
    if ! test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES" ; then
      { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES" 1>&6
    
  

  
  
    if test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR_INTERNAL_LIB" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_INTERNAL_LIB!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_INTERNAL_LIB!" 1>&5; exit 1; }
    fi
  

  
  
    if test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR_ASSETS" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_ASSETS!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_ASSETS!" 1>&5; exit 1; }
    fi
  


    
  
  
  ANDROID_PLAY_SERVICES_GCM_AAR="$ANDROID_SDK_ROOT/extras/google/m2repository/com/google/android/gms/play-services-gcm/$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-gcm-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION.aar"
  echo $ac_n "checking for play-services-gcm AAR""... $ac_c" 1>&6
echo "configure:16912: checking for play-services-gcm AAR" >&5
  if ! test -e "$ANDROID_PLAY_SERVICES_GCM_AAR" ; then
    { echo "configure: error: You must download the play-services-gcm AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_GCM_AAR)" 1>&2; echo "configure: error: You must download the play-services-gcm AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_GCM_AAR)" 1>&5; exit 1; }
  fi
  
  echo "$ac_t""$ANDROID_PLAY_SERVICES_GCM_AAR" 1>&6

  if ! $PYTHON -m mozbuild.action.explode_aar --destdir=$MOZ_BUILD_ROOT/dist/exploded-aar $ANDROID_PLAY_SERVICES_GCM_AAR ; then
    { echo "configure: error: Could not explode $ANDROID_PLAY_SERVICES_GCM_AAR!" 1>&2; echo "configure: error: Could not explode $ANDROID_PLAY_SERVICES_GCM_AAR!" 1>&5; exit 1; }
  fi

  
  
  
    echo $ac_n "checking for ANDROID_PLAY_SERVICES_GCM_AAR_LIB""... $ac_c" 1>&6
echo "configure:16927: checking for ANDROID_PLAY_SERVICES_GCM_AAR_LIB" >&5
    ANDROID_PLAY_SERVICES_GCM_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-gcm-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-gcm-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION-classes.jar"
    if ! test -e "$ANDROID_PLAY_SERVICES_GCM_AAR_LIB" ; then
      { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_GCM_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_GCM_AAR_LIB!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_PLAY_SERVICES_GCM_AAR_LIB" 1>&6
    
  

  
  
    echo $ac_n "checking for ANDROID_PLAY_SERVICES_GCM_AAR_RES""... $ac_c" 1>&6
echo "configure:16939: checking for ANDROID_PLAY_SERVICES_GCM_AAR_RES" >&5
    ANDROID_PLAY_SERVICES_GCM_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-gcm-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/res"
    if ! test -e "$ANDROID_PLAY_SERVICES_GCM_AAR_RES" ; then
      { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_GCM_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_GCM_AAR_RES!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_PLAY_SERVICES_GCM_AAR_RES" 1>&6
    
  

  
  
    if test -e "$ANDROID_PLAY_SERVICES_GCM_AAR_INTERNAL_LIB" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_GCM_AAR_INTERNAL_LIB!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_GCM_AAR_INTERNAL_LIB!" 1>&5; exit 1; }
    fi
  

  
  
    if test -e "$ANDROID_PLAY_SERVICES_GCM_AAR_ASSETS" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_GCM_AAR_ASSETS!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_GCM_AAR_ASSETS!" 1>&5; exit 1; }
    fi
  


    
  
  
  ANDROID_PLAY_SERVICES_MEASUREMENT_AAR="$ANDROID_SDK_ROOT/extras/google/m2repository/com/google/android/gms/play-services-measurement/$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-measurement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION.aar"
  echo $ac_n "checking for play-services-measurement AAR""... $ac_c" 1>&6
echo "configure:16968: checking for play-services-measurement AAR" >&5
  if ! test -e "$ANDROID_PLAY_SERVICES_MEASUREMENT_AAR" ; then
    { echo "configure: error: You must download the play-services-measurement AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_MEASUREMENT_AAR)" 1>&2; echo "configure: error: You must download the play-services-measurement AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_MEASUREMENT_AAR)" 1>&5; exit 1; }
  fi
  
  echo "$ac_t""$ANDROID_PLAY_SERVICES_MEASUREMENT_AAR" 1>&6

  if ! $PYTHON -m mozbuild.action.explode_aar --destdir=$MOZ_BUILD_ROOT/dist/exploded-aar $ANDROID_PLAY_SERVICES_MEASUREMENT_AAR ; then
    { echo "configure: error: Could not explode $ANDROID_PLAY_SERVICES_MEASUREMENT_AAR!" 1>&2; echo "configure: error: Could not explode $ANDROID_PLAY_SERVICES_MEASUREMENT_AAR!" 1>&5; exit 1; }
  fi

  
  
  
    echo $ac_n "checking for ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_LIB""... $ac_c" 1>&6
echo "configure:16983: checking for ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_LIB" >&5
    ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-measurement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-measurement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION-classes.jar"
    if ! test -e "$ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_LIB" ; then
      { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_LIB!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_LIB" 1>&6
    
  

  
  
    echo $ac_n "checking for ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_RES""... $ac_c" 1>&6
echo "configure:16995: checking for ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_RES" >&5
    ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-measurement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/res"
    if ! test -e "$ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_RES" ; then
      { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_RES!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_RES" 1>&6
    
  

  
  
    if test -e "$ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_INTERNAL_LIB" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_INTERNAL_LIB!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_INTERNAL_LIB!" 1>&5; exit 1; }
    fi
  

  
  
    if test -e "$ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_ASSETS" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_ASSETS!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_ASSETS!" 1>&5; exit 1; }
    fi
  


fi




if test -n "$MOZ_INSTALL_TRACKING"; then
    
    
  
  
  ANDROID_PLAY_SERVICES_ADS_AAR="$ANDROID_SDK_ROOT/extras/google/m2repository/com/google/android/gms/play-services-ads/$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-ads-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION.aar"
  echo $ac_n "checking for play-services-ads AAR""... $ac_c" 1>&6
echo "configure:17031: checking for play-services-ads AAR" >&5
  if ! test -e "$ANDROID_PLAY_SERVICES_ADS_AAR" ; then
    { echo "configure: error: You must download the play-services-ads AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_ADS_AAR)" 1>&2; echo "configure: error: You must download the play-services-ads AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_ADS_AAR)" 1>&5; exit 1; }
  fi
  
  echo "$ac_t""$ANDROID_PLAY_SERVICES_ADS_AAR" 1>&6

  if ! $PYTHON -m mozbuild.action.explode_aar --destdir=$MOZ_BUILD_ROOT/dist/exploded-aar $ANDROID_PLAY_SERVICES_ADS_AAR ; then
    { echo "configure: error: Could not explode $ANDROID_PLAY_SERVICES_ADS_AAR!" 1>&2; echo "configure: error: Could not explode $ANDROID_PLAY_SERVICES_ADS_AAR!" 1>&5; exit 1; }
  fi

  
  
  
    echo $ac_n "checking for ANDROID_PLAY_SERVICES_ADS_AAR_LIB""... $ac_c" 1>&6
echo "configure:17046: checking for ANDROID_PLAY_SERVICES_ADS_AAR_LIB" >&5
    ANDROID_PLAY_SERVICES_ADS_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-ads-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-ads-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION-classes.jar"
    if ! test -e "$ANDROID_PLAY_SERVICES_ADS_AAR_LIB" ; then
      { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_ADS_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_ADS_AAR_LIB!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_PLAY_SERVICES_ADS_AAR_LIB" 1>&6
    
  

  
  
    echo $ac_n "checking for ANDROID_PLAY_SERVICES_ADS_AAR_RES""... $ac_c" 1>&6
echo "configure:17058: checking for ANDROID_PLAY_SERVICES_ADS_AAR_RES" >&5
    ANDROID_PLAY_SERVICES_ADS_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-ads-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/res"
    if ! test -e "$ANDROID_PLAY_SERVICES_ADS_AAR_RES" ; then
      { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_ADS_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_ADS_AAR_RES!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_PLAY_SERVICES_ADS_AAR_RES" 1>&6
    
  

  
  
    if test -e "$ANDROID_PLAY_SERVICES_ADS_AAR_INTERNAL_LIB" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_ADS_AAR_INTERNAL_LIB!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_ADS_AAR_INTERNAL_LIB!" 1>&5; exit 1; }
    fi
  

  
  
    if test -e "$ANDROID_PLAY_SERVICES_ADS_AAR_ASSETS" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_ADS_AAR_ASSETS!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_ADS_AAR_ASSETS!" 1>&5; exit 1; }
    fi
  


    
  
  
  ANDROID_PLAY_SERVICES_BASEMENT_AAR="$ANDROID_SDK_ROOT/extras/google/m2repository/com/google/android/gms/play-services-basement/$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION.aar"
  echo $ac_n "checking for play-services-basement AAR""... $ac_c" 1>&6
echo "configure:17087: checking for play-services-basement AAR" >&5
  if ! test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR" ; then
    { echo "configure: error: You must download the play-services-basement AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_BASEMENT_AAR)" 1>&2; echo "configure: error: You must download the play-services-basement AAR.  Run the Android SDK tool and install the Android and Google Support Repositories under Extras.  See https://developer.android.com/tools/extras/support-library.html for more info. (Looked for $ANDROID_PLAY_SERVICES_BASEMENT_AAR)" 1>&5; exit 1; }
  fi
  
  echo "$ac_t""$ANDROID_PLAY_SERVICES_BASEMENT_AAR" 1>&6

  if ! $PYTHON -m mozbuild.action.explode_aar --destdir=$MOZ_BUILD_ROOT/dist/exploded-aar $ANDROID_PLAY_SERVICES_BASEMENT_AAR ; then
    { echo "configure: error: Could not explode $ANDROID_PLAY_SERVICES_BASEMENT_AAR!" 1>&2; echo "configure: error: Could not explode $ANDROID_PLAY_SERVICES_BASEMENT_AAR!" 1>&5; exit 1; }
  fi

  
  
  
    echo $ac_n "checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB""... $ac_c" 1>&6
echo "configure:17102: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB" >&5
    ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION-classes.jar"
    if ! test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB" ; then
      { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB" 1>&6
    
  

  
  
    echo $ac_n "checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES""... $ac_c" 1>&6
echo "configure:17114: checking for ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES" >&5
    ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES="$MOZ_BUILD_ROOT/dist/exploded-aar/play-services-basement-$ANDROID_GOOGLE_PLAY_SERVICES_VERSION/res"
    if ! test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES" ; then
      { echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES!" 1>&2; echo "configure: error: Could not find required exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES!" 1>&5; exit 1; }
    fi
    echo "$ac_t""$ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES" 1>&6
    
  

  
  
    if test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR_INTERNAL_LIB" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_INTERNAL_LIB!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_INTERNAL_LIB!" 1>&5; exit 1; }
    fi
  

  
  
    if test -e "$ANDROID_PLAY_SERVICES_BASEMENT_AAR_ASSETS" ; then
      { echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_ASSETS!" 1>&2; echo "configure: error: Found unexpected exploded ANDROID_PLAY_SERVICES_BASEMENT_AAR_ASSETS!" 1>&5; exit 1; }
    fi
  


fi




if test "$MOZ_ENABLE_GTK" -o "$MOZ_ENABLE_QT"
then
    succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for pango >= $PANGO_VERSION""... $ac_c" 1>&6
echo "configure:17156: checking for pango >= $PANGO_VERSION" >&5

        if $PKG_CONFIG --exists "pango >= $PANGO_VERSION" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking _PANGOCHK_CFLAGS""... $ac_c" 1>&6
echo "configure:17163: checking _PANGOCHK_CFLAGS" >&5
            _PANGOCHK_CFLAGS=`$PKG_CONFIG --cflags "pango >= $PANGO_VERSION"`
            echo "$ac_t""$_PANGOCHK_CFLAGS" 1>&6

            echo $ac_n "checking _PANGOCHK_LIBS""... $ac_c" 1>&6
echo "configure:17168: checking _PANGOCHK_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            _PANGOCHK_LIBS="`$PKG_CONFIG --libs \"pango >= $PANGO_VERSION\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$_PANGOCHK_LIBS" 1>&6
        else
            _PANGOCHK_CFLAGS=""
            _PANGOCHK_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            _PANGOCHK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pango >= $PANGO_VERSION"`
            echo $_PANGOCHK_PKG_ERRORS
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       { echo "configure: error: Library requirements (pango >= $PANGO_VERSION) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (pango >= $PANGO_VERSION) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; }
     fi
  fi


    succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for pango >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION pangocairo >= $PANGO_VERSION""... $ac_c" 1>&6
echo "configure:17209: checking for pango >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION pangocairo >= $PANGO_VERSION" >&5

        if $PKG_CONFIG --exists "pango >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION pangocairo >= $PANGO_VERSION" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_PANGO_CFLAGS""... $ac_c" 1>&6
echo "configure:17216: checking MOZ_PANGO_CFLAGS" >&5
            MOZ_PANGO_CFLAGS=`$PKG_CONFIG --cflags "pango >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION pangocairo >= $PANGO_VERSION"`
            echo "$ac_t""$MOZ_PANGO_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_PANGO_LIBS""... $ac_c" 1>&6
echo "configure:17221: checking MOZ_PANGO_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            MOZ_PANGO_LIBS="`$PKG_CONFIG --libs \"pango >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION pangocairo >= $PANGO_VERSION\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$MOZ_PANGO_LIBS" 1>&6
        else
            MOZ_PANGO_CFLAGS=""
            MOZ_PANGO_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            MOZ_PANGO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pango >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION pangocairo >= $PANGO_VERSION"`
            echo $MOZ_PANGO_PKG_ERRORS
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       { echo "configure: error: Library requirements (pango >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION pangocairo >= $PANGO_VERSION) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (pango >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION pangocairo >= $PANGO_VERSION) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; }
     fi
  fi

fi


if test "$MOZ_X11"
then
            if test "$MOZ_ENABLE_GTK"
    then
        MOZ_ENABLE_GIO=1
        MOZ_ENABLE_GCONF=1
    fi

                # Check whether --enable-gio or --disable-gio was given.
if test "${enable_gio+set}" = set; then
  enableval="$enable_gio"
  if test "$enableval" = "no"; then
    MOZ_ENABLE_GIO=
  elif test "$enableval" = "yes"; then
    MOZ_ENABLE_GIO=force
  else
    { echo "configure: error: Option, gio, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, gio, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


    if test "$MOZ_ENABLE_GIO" -a "$MOZ_ENABLE_GTK"
    then
        if test "$MOZ_WIDGET_TOOLKIT" = gtk2
        then
            succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for gtk+-2.0 >= 2.14""... $ac_c" 1>&6
echo "configure:17289: checking for gtk+-2.0 >= 2.14" >&5

        if $PKG_CONFIG --exists "gtk+-2.0 >= 2.14" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking _GTKCHECK_CFLAGS""... $ac_c" 1>&6
echo "configure:17296: checking _GTKCHECK_CFLAGS" >&5
            _GTKCHECK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.14"`
            echo "$ac_t""$_GTKCHECK_CFLAGS" 1>&6

            echo $ac_n "checking _GTKCHECK_LIBS""... $ac_c" 1>&6
echo "configure:17301: checking _GTKCHECK_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            _GTKCHECK_LIBS="`$PKG_CONFIG --libs \"gtk+-2.0 >= 2.14\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$_GTKCHECK_LIBS" 1>&6
        else
            _GTKCHECK_CFLAGS=""
            _GTKCHECK_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            _GTKCHECK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.14"`
            
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       { echo "configure: error: * * * Could not find gtk+-2.0 > 2.14. Required for build with gio." 1>&2; echo "configure: error: * * * Could not find gtk+-2.0 > 2.14. Required for build with gio." 1>&5; exit 1; }
     fi
  fi

        fi
        succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for gio-2.0 >= $GIO_VERSION""... $ac_c" 1>&6
echo "configure:17342: checking for gio-2.0 >= $GIO_VERSION" >&5

        if $PKG_CONFIG --exists "gio-2.0 >= $GIO_VERSION" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_GIO_CFLAGS""... $ac_c" 1>&6
echo "configure:17349: checking MOZ_GIO_CFLAGS" >&5
            MOZ_GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= $GIO_VERSION"`
            echo "$ac_t""$MOZ_GIO_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_GIO_LIBS""... $ac_c" 1>&6
echo "configure:17354: checking MOZ_GIO_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            MOZ_GIO_LIBS="`$PKG_CONFIG --libs \"gio-2.0 >= $GIO_VERSION\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$MOZ_GIO_LIBS" 1>&6
        else
            MOZ_GIO_CFLAGS=""
            MOZ_GIO_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            MOZ_GIO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 >= $GIO_VERSION"`
            
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     
            MOZ_GIO_LIBS=`echo $MOZ_GIO_LIBS | sed 's/-llinc\>//'`
            MOZ_ENABLE_GIO=1
            cat >> confdefs.pytmp <<\EOF
    (''' MOZ_ENABLE_GIO ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ENABLE_GIO 1
EOF

        
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       
            if test "$MOZ_ENABLE_GIO" = "force"
            then
                { echo "configure: error: * * * Could not find gio-2.0 >= $GIO_VERSION" 1>&2; echo "configure: error: * * * Could not find gio-2.0 >= $GIO_VERSION" 1>&5; exit 1; }
            fi
            MOZ_ENABLE_GIO=
        
     fi
  fi

    fi

    

                # Check whether --enable-gconf or --disable-gconf was given.
if test "${enable_gconf+set}" = set; then
  enableval="$enable_gconf"
  if test "$enableval" = "no"; then
    MOZ_ENABLE_GCONF=
  elif test "$enableval" = "yes"; then
    MOZ_ENABLE_GCONF=1
  else
    { echo "configure: error: Option, gconf, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, gconf, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


    if test "$MOZ_ENABLE_GCONF"
    then
        succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for gconf-2.0 >= $GCONF_VERSION gobject-2.0 ""... $ac_c" 1>&6
echo "configure:17429: checking for gconf-2.0 >= $GCONF_VERSION gobject-2.0 " >&5

        if $PKG_CONFIG --exists "gconf-2.0 >= $GCONF_VERSION gobject-2.0 " ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_GCONF_CFLAGS""... $ac_c" 1>&6
echo "configure:17436: checking MOZ_GCONF_CFLAGS" >&5
            MOZ_GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= $GCONF_VERSION gobject-2.0 "`
            echo "$ac_t""$MOZ_GCONF_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_GCONF_LIBS""... $ac_c" 1>&6
echo "configure:17441: checking MOZ_GCONF_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            MOZ_GCONF_LIBS="`$PKG_CONFIG --libs \"gconf-2.0 >= $GCONF_VERSION gobject-2.0 \" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$MOZ_GCONF_LIBS" 1>&6
        else
            MOZ_GCONF_CFLAGS=""
            MOZ_GCONF_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            MOZ_GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= $GCONF_VERSION gobject-2.0 "`
            
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     
            MOZ_GCONF_LIBS=`$PKG_CONFIG --libs gobject-2.0`
            MOZ_ENABLE_GCONF=1
        
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       
            if test -n "$MOZ_ENABLE_GCONF";
            then
                { echo "configure: error: * * * Could not find gconf-2.0 " 1>&2; echo "configure: error: * * * Could not find gconf-2.0 " 1>&5; exit 1; }
            else
                echo "configure: warning: Many automated tests will fail with --disable-gconf. See bug 1167201." 1>&2
            fi
        
     fi
  fi

    fi

    if test "$MOZ_ENABLE_GCONF"; then
        cat >> confdefs.pytmp <<\EOF
    (''' MOZ_ENABLE_GCONF ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ENABLE_GCONF 1
EOF

    fi

    
fi


if test "$MOZ_ENABLE_GTK" -o "$MOZ_ENABLE_QT"
then
    MOZ_ENABLE_LIBPROXY=

    # Check whether --enable-libproxy or --disable-libproxy was given.
if test "${enable_libproxy+set}" = set; then
  enableval="$enable_libproxy"
  if test "$enableval" = "yes"; then
    MOZ_ENABLE_LIBPROXY=1
  elif test "$enableval" = "no"; then
    MOZ_ENABLE_LIBPROXY=
  else
    { echo "configure: error: Option, libproxy, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, libproxy, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


    if test "$MOZ_ENABLE_LIBPROXY"
    then
        succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for libproxy-1.0""... $ac_c" 1>&6
echo "configure:17526: checking for libproxy-1.0" >&5

        if $PKG_CONFIG --exists "libproxy-1.0" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_LIBPROXY_CFLAGS""... $ac_c" 1>&6
echo "configure:17533: checking MOZ_LIBPROXY_CFLAGS" >&5
            MOZ_LIBPROXY_CFLAGS=`$PKG_CONFIG --cflags "libproxy-1.0"`
            echo "$ac_t""$MOZ_LIBPROXY_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_LIBPROXY_LIBS""... $ac_c" 1>&6
echo "configure:17538: checking MOZ_LIBPROXY_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            MOZ_LIBPROXY_LIBS="`$PKG_CONFIG --libs \"libproxy-1.0\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$MOZ_LIBPROXY_LIBS" 1>&6
        else
            MOZ_LIBPROXY_CFLAGS=""
            MOZ_LIBPROXY_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            MOZ_LIBPROXY_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libproxy-1.0"`
            echo $MOZ_LIBPROXY_PKG_ERRORS
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       { echo "configure: error: Library requirements (libproxy-1.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (libproxy-1.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; }
     fi
  fi

        cat >> confdefs.pytmp <<\EOF
    (''' MOZ_ENABLE_LIBPROXY ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ENABLE_LIBPROXY 1
EOF

    fi
fi



if test "$MOZ_ENABLE_GTK"
then
    # Check whether --enable-gnomeui or --disable-gnomeui was given.
if test "${enable_gnomeui+set}" = set; then
  enableval="$enable_gnomeui"
  if test "$enableval" = "yes"; then
    MOZ_ENABLE_GNOMEUI=force
  elif test "$enableval" = "no"; then
    MOZ_ENABLE_GNOMEUI=
  else
    { echo "configure: error: Option, gnomeui, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, gnomeui, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


    if test "$MOZ_ENABLE_GNOMEUI"
    then
        succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for libgnomeui-2.0 >= $GNOMEUI_VERSION""... $ac_c" 1>&6
echo "configure:17607: checking for libgnomeui-2.0 >= $GNOMEUI_VERSION" >&5

        if $PKG_CONFIG --exists "libgnomeui-2.0 >= $GNOMEUI_VERSION" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_GNOMEUI_CFLAGS""... $ac_c" 1>&6
echo "configure:17614: checking MOZ_GNOMEUI_CFLAGS" >&5
            MOZ_GNOMEUI_CFLAGS=`$PKG_CONFIG --cflags "libgnomeui-2.0 >= $GNOMEUI_VERSION"`
            echo "$ac_t""$MOZ_GNOMEUI_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_GNOMEUI_LIBS""... $ac_c" 1>&6
echo "configure:17619: checking MOZ_GNOMEUI_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            MOZ_GNOMEUI_LIBS="`$PKG_CONFIG --libs \"libgnomeui-2.0 >= $GNOMEUI_VERSION\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$MOZ_GNOMEUI_LIBS" 1>&6
        else
            MOZ_GNOMEUI_CFLAGS=""
            MOZ_GNOMEUI_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            MOZ_GNOMEUI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libgnomeui-2.0 >= $GNOMEUI_VERSION"`
            
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     
            MOZ_ENABLE_GNOMEUI=1
        
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       
            if test "$MOZ_ENABLE_GNOMEUI" = "force"
            then
                { echo "configure: error: * * * Could not find libgnomeui-2.0 >= $GNOMEUI_VERSION" 1>&2; echo "configure: error: * * * Could not find libgnomeui-2.0 >= $GNOMEUI_VERSION" 1>&5; exit 1; }
            fi
            MOZ_ENABLE_GNOMEUI=
        
     fi
  fi

    fi

    if test "$MOZ_ENABLE_GNOMEUI"; then
        cat >> confdefs.pytmp <<\EOF
    (''' MOZ_ENABLE_GNOMEUI ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ENABLE_GNOMEUI 1
EOF

    fi
fi




if test "$MOZ_ENABLE_GTK" -o "$MOZ_ENABLE_QT"
then
    MOZ_ENABLE_DBUS=1

    # Check whether --enable-dbus or --disable-dbus was given.
if test "${enable_dbus+set}" = set; then
  enableval="$enable_dbus"
  if test "$enableval" = "no"; then
    MOZ_ENABLE_DBUS=
  elif test "$enableval" = "yes"; then
    MOZ_ENABLE_DBUS=1
  else
    { echo "configure: error: Option, dbus, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, dbus, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


    if test "$MOZ_ENABLE_DBUS"
    then
        succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for dbus-1 >= $DBUS_VERSION""... $ac_c" 1>&6
echo "configure:17702: checking for dbus-1 >= $DBUS_VERSION" >&5

        if $PKG_CONFIG --exists "dbus-1 >= $DBUS_VERSION" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_DBUS_CFLAGS""... $ac_c" 1>&6
echo "configure:17709: checking MOZ_DBUS_CFLAGS" >&5
            MOZ_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= $DBUS_VERSION"`
            echo "$ac_t""$MOZ_DBUS_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_DBUS_LIBS""... $ac_c" 1>&6
echo "configure:17714: checking MOZ_DBUS_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            MOZ_DBUS_LIBS="`$PKG_CONFIG --libs \"dbus-1 >= $DBUS_VERSION\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$MOZ_DBUS_LIBS" 1>&6
        else
            MOZ_DBUS_CFLAGS=""
            MOZ_DBUS_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            MOZ_DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= $DBUS_VERSION"`
            echo $MOZ_DBUS_PKG_ERRORS
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       { echo "configure: error: Library requirements (dbus-1 >= $DBUS_VERSION) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (dbus-1 >= $DBUS_VERSION) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; }
     fi
  fi

        succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for dbus-glib-1 >= $DBUS_VERSION""... $ac_c" 1>&6
echo "configure:17754: checking for dbus-glib-1 >= $DBUS_VERSION" >&5

        if $PKG_CONFIG --exists "dbus-glib-1 >= $DBUS_VERSION" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_DBUS_GLIB_CFLAGS""... $ac_c" 1>&6
echo "configure:17761: checking MOZ_DBUS_GLIB_CFLAGS" >&5
            MOZ_DBUS_GLIB_CFLAGS=`$PKG_CONFIG --cflags "dbus-glib-1 >= $DBUS_VERSION"`
            echo "$ac_t""$MOZ_DBUS_GLIB_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_DBUS_GLIB_LIBS""... $ac_c" 1>&6
echo "configure:17766: checking MOZ_DBUS_GLIB_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            MOZ_DBUS_GLIB_LIBS="`$PKG_CONFIG --libs \"dbus-glib-1 >= $DBUS_VERSION\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$MOZ_DBUS_GLIB_LIBS" 1>&6
        else
            MOZ_DBUS_GLIB_CFLAGS=""
            MOZ_DBUS_GLIB_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            MOZ_DBUS_GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-glib-1 >= $DBUS_VERSION"`
            echo $MOZ_DBUS_GLIB_PKG_ERRORS
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       { echo "configure: error: Library requirements (dbus-glib-1 >= $DBUS_VERSION) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (dbus-glib-1 >= $DBUS_VERSION) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; }
     fi
  fi

        cat >> confdefs.pytmp <<\EOF
    (''' MOZ_ENABLE_DBUS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ENABLE_DBUS 1
EOF

    fi
fi



if test "$MOZ_ENABLE_GTK" -o "$MOZ_ENABLE_QT"
then
    MOZ_SYNTH_SPEECHD=1

    # Check whether --enable-synth-speechd or --disable-synth-speechd was given.
if test "${enable_synth_speechd+set}" = set; then
  enableval="$enable_synth_speechd"
  if test "$enableval" = "no"; then
    MOZ_SYNTH_SPEECHD=
  elif test "$enableval" = "yes"; then
    MOZ_SYNTH_SPEECHD=1
  else
    { echo "configure: error: Option, synth-speechd, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, synth-speechd, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

fi


# Check whether --enable-websms-backend or --disable-websms-backend was given.
if test "${enable_websms_backend+set}" = set; then
  enableval="$enable_websms_backend"
  if test "$enableval" = "no"; then
    MOZ_WEBSMS_BACKEND=
  elif test "$enableval" = "yes"; then
    MOZ_WEBSMS_BACKEND=1
  else
    { echo "configure: error: Option, websms-backend, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, websms-backend, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_WEBSMS_BACKEND"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_WEBSMS_BACKEND ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_WEBSMS_BACKEND 1
EOF

fi

if test -n "$MOZ_EXCLUDE_HYPHENATION_DICTIONARIES"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_EXCLUDE_HYPHENATION_DICTIONARIES ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_EXCLUDE_HYPHENATION_DICTIONARIES 1
EOF

fi

if test -n "$MOZ_INSTALL_TRACKING"; then
    if test -z "$MOZ_INSTALL_TRACKING_ADJUST_SDK_APP_TOKEN"; then
        { echo "configure: error: Must specify --with-adjust-sdk-keyfile when MOZ_INSTALL_TRACKING is defined!" 1>&2; echo "configure: error: Must specify --with-adjust-sdk-keyfile when MOZ_INSTALL_TRACKING is defined!" 1>&5; exit 1; }
    fi
fi

MOZ_IPDL_TESTS=

# Check whether --enable-ipdl-tests or --disable-ipdl-tests was given.
if test "${enable_ipdl_tests+set}" = set; then
  enableval="$enable_ipdl_tests"
  if test "$enableval" = "yes"; then
    MOZ_IPDL_TESTS=1
  elif test "$enableval" = "no"; then
    MOZ_IPDL_TESTS=
  else
    { echo "configure: error: Option, ipdl-tests, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, ipdl-tests, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_IPDL_TESTS"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_IPDL_TESTS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_IPDL_TESTS 1
EOF

fi



# Check whether --enable-dbm or --disable-dbm was given.
if test "${enable_dbm+set}" = set; then
  enableval="$enable_dbm"
  if test "$enableval" = "no"; then
    NSS_DISABLE_DBM=1
  elif test "$enableval" = "yes"; then
    NSS_DISABLE_DBM=
  else
    { echo "configure: error: Option, dbm, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, dbm, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


# Check whether --enable-accessibility or --disable-accessibility was given.
if test "${enable_accessibility+set}" = set; then
  enableval="$enable_accessibility"
  if test "$enableval" = "no"; then
    ACCESSIBILITY=
  elif test "$enableval" = "yes"; then
    ACCESSIBILITY=1 
  else
    { echo "configure: error: Option, accessibility, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, accessibility, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test "$ACCESSIBILITY"; then
    case "$target" in
    *-mingw*)
        if test -z "$MIDL"; then
            if test "$GCC" != "yes"; then
                { echo "configure: error: MIDL could not be found. Building accessibility without MIDL is not supported." 1>&2; echo "configure: error: MIDL could not be found. Building accessibility without MIDL is not supported." 1>&5; exit 1; }
            else
                { echo "configure: error: You have accessibility enabled, but widl could not be found. Add --disable-accessibility to your mozconfig or install widl. See https://developer.mozilla.org/en-US/docs/Cross_Compile_Mozilla_for_Mingw32 for details." 1>&2; echo "configure: error: You have accessibility enabled, but widl could not be found. Add --disable-accessibility to your mozconfig or install widl. See https://developer.mozilla.org/en-US/docs/Cross_Compile_Mozilla_for_Mingw32 for details." 1>&5; exit 1; }
            fi
        fi
    esac
    cat >> confdefs.pytmp <<\EOF
    (''' ACCESSIBILITY ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define ACCESSIBILITY 1
EOF

fi

if test "${MOZ_WIDGET_TOOLKIT}" = "linuxgl" -a "$ACCESSIBILITY" != "1"; then
    { echo "configure: error: "Accessibility is required for the linuxgl widget backend"" 1>&2; echo "configure: error: "Accessibility is required for the linuxgl widget backend"" 1>&5; exit 1; }
fi

if test -n "$MOZ_WEBRTC"; then
    case "$target" in
    *-linux*|*-mingw*|*-darwin*|*-android*|*-linuxandroid*|*-dragonfly*|*-freebsd*|*-netbsd*|*-openbsd*)
                ;;
    *)
                MOZ_WEBRTC=
        ;;
    esac
fi

cat > conftest.$ac_ext <<EOF
#line 17952 "configure"
#include "confdefs.h"
#include <linux/ethtool.h>
int main() {
 struct ethtool_cmd cmd; cmd.speed_hi = 0; 
; return 0; }
EOF
if { (eval echo configure:17959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*



# target_arch is from {ia32|x64|arm|ppc}
case "$CPU_ARCH" in
x86_64 | arm | aarch64 | x86 | ppc* | ia64)
    :
    ;;
*)
# unsupported arch for webrtc
    MOZ_WEBRTC=
    ;;

esac

# Check whether --enable-webrtc or --disable-webrtc was given.
if test "${enable_webrtc+set}" = set; then
  enableval="$enable_webrtc"
  if test "$enableval" = "no"; then
    MOZ_WEBRTC=
  elif test "$enableval" = "yes"; then
    MOZ_WEBRTC=1
  else
    { echo "configure: error: Option, webrtc, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, webrtc, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_WEBRTC"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_WEBRTC ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_WEBRTC 1
EOF

            cat >> confdefs.pytmp <<\EOF
    (''' MOZ_WEBRTC_ASSERT_ALWAYS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_WEBRTC_ASSERT_ALWAYS 1
EOF

    MOZ_RAW=1
    MOZ_VPX_ERROR_CONCEALMENT=1

    MOZ_WEBRTC_SIGNALING=1
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_WEBRTC_SIGNALING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_WEBRTC_SIGNALING 1
EOF

    MOZ_PEERCONNECTION=1
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_PEERCONNECTION ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_PEERCONNECTION 1
EOF

    MOZ_SCTP=1
    MOZ_SRTP=1
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_SCTP ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_SCTP 1
EOF

    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_SRTP ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_SRTP 1
EOF

    if test -n "$MOZ_X11"; then
      MOZ_WEBRTC_X11_LIBS="-lXext -lXdamage -lXfixes -lXcomposite"
    fi
else
    MOZ_SYNTH_PICO=
fi

# Check whether --enable-hardware-aec-ns or --disable-hardware-aec-ns was given.
if test "${enable_hardware_aec_ns+set}" = set; then
  enableval="$enable_hardware_aec_ns"
  if test "$enableval" = "yes"; then
    MOZ_WEBRTC_HARDWARE_AEC_NS=1
  elif test "$enableval" = "no"; then
    MOZ_WEBRTC_HARDWARE_AEC_NS=
  else
    { echo "configure: error: Option, hardware-aec-ns, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, hardware-aec-ns, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_WEBRTC_HARDWARE_AEC_NS"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_WEBRTC_HARDWARE_AEC_NS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_WEBRTC_HARDWARE_AEC_NS 1
EOF

fi










if test "$OS_TARGET" = "Android" -o "$CPU_ARCH" = "arm"; then
    MOZ_SAMPLE_TYPE_S16=1
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_SAMPLE_TYPE_S16 ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_SAMPLE_TYPE_S16 1
EOF

    
else
    MOZ_SAMPLE_TYPE_FLOAT32=1
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_SAMPLE_TYPE_FLOAT32 ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_SAMPLE_TYPE_FLOAT32 1
EOF

    
fi

if test -n "$MOZ_WEBSPEECH_POCKETSPHINX"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_WEBSPEECH_POCKETSPHINX ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_WEBSPEECH_POCKETSPHINX 1
EOF

fi



# Check whether --enable-webspeech or --disable-webspeech was given.
if test "${enable_webspeech+set}" = set; then
  enableval="$enable_webspeech"
  if test "$enableval" = "no"; then
    MOZ_WEBSPEECH=
  elif test "$enableval" = "yes"; then
    MOZ_WEBSPEECH=1
  else
    { echo "configure: error: Option, webspeech, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, webspeech, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_WEBSPEECH"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_WEBSPEECH ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_WEBSPEECH 1
EOF

fi



# Check whether --enable-webspeechtestbackend or --disable-webspeechtestbackend was given.
if test "${enable_webspeechtestbackend+set}" = set; then
  enableval="$enable_webspeechtestbackend"
  if test "$enableval" = "no"; then
    MOZ_WEBSPEECH_TEST_BACKEND=
  elif test "$enableval" = "yes"; then
    MOZ_WEBSPEECH_TEST_BACKEND=1
  else
    { echo "configure: error: Option, webspeechtestbackend, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, webspeechtestbackend, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -z "$MOZ_WEBSPEECH"; then
MOZ_WEBSPEECH_TEST_BACKEND=
fi

if test -n "$MOZ_WEBSPEECH_TEST_BACKEND"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_WEBSPEECH_TEST_BACKEND ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_WEBSPEECH_TEST_BACKEND 1
EOF

fi



if test -z "$MOZ_WEBSPEECH"; then
MOZ_WEBSPEECH_MODELS=
fi

if test -n "$MOZ_WEBSPEECH_MODELS"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_WEBSPEECH_MODELS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_WEBSPEECH_MODELS 1
EOF

fi



# Check whether --enable-raw or --disable-raw was given.
if test "${enable_raw+set}" = set; then
  enableval="$enable_raw"
  if test "$enableval" = "yes"; then
    MOZ_RAW=1
  elif test "$enableval" = "no"; then
    MOZ_RAW=
  else
    { echo "configure: error: Option, raw, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, raw, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_RAW"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_RAW ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_RAW 1
EOF

fi



echo $ac_n "checking __attribute__ ((aligned ())) support""... $ac_c" 1>&6
echo "configure:18214: checking __attribute__ ((aligned ())) support" >&5
if eval "test \"`echo '$''{'ac_cv_c_attribute_aligned'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_c_attribute_aligned=0
     CFLAGS_save="${CFLAGS}"
     CFLAGS="${CFLAGS} -Werror"
     for ac_cv_c_attr_align_try in 64 32 16 8; do
       echo "trying $ac_cv_c_attr_align_try"
       cat > conftest.$ac_ext <<EOF
#line 18224 "configure"
#include "confdefs.h"

int main() {
static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;
; return 0; }
EOF
if { (eval echo configure:18231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
       if test "$ac_cv_c_attribute_aligned" != 0; then
         break;
       fi
     done
       CFLAGS="${CFLAGS_save}"
fi

echo "$ac_t""$ac_cv_c_attribute_aligned" 1>&6
if test "${ac_cv_c_attribute_aligned}" != "0"; then
  cat >> confdefs.pytmp <<EOF
    (''' ATTRIBUTE_ALIGNED_MAX ''', r''' ${ac_cv_c_attribute_aligned} ''')
EOF
cat >> confdefs.h <<EOF
#define ATTRIBUTE_ALIGNED_MAX ${ac_cv_c_attribute_aligned}
EOF

fi

if test "$COMPILE_ENVIRONMENT"; then
if test -n "$MOZ_APPLEMEDIA"; then
  # hack in frameworks for fmp4 - see bug 1029974
  # We load VideoToolbox and CoreMedia dynamically, so they don't appear here.
  LDFLAGS="$LDFLAGS -framework AudioToolbox"
    ac_safe=`echo "CoreMedia/CoreMedia.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for CoreMedia/CoreMedia.h""... $ac_c" 1>&6
echo "configure:18264: checking for CoreMedia/CoreMedia.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 18269 "configure"
#include "confdefs.h"
#include <CoreMedia/CoreMedia.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:18274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: MacOS X 10.7 SDK or later is required" 1>&2; echo "configure: error: MacOS X 10.7 SDK or later is required" 1>&5; exit 1; }
fi

fi
fi # COMPILE_ENVIRONMENT

if test "$OS_ARCH" = "WINNT"; then
        MOZ_DIRECTSHOW=1
fi

# Check whether --enable-directshow or --disable-directshow was given.
if test "${enable_directshow+set}" = set; then
  enableval="$enable_directshow"
  if test "$enableval" = "no"; then
    MOZ_DIRECTSHOW=
  elif test "$enableval" = "yes"; then
    MOZ_DIRECTSHOW=1
  else
    { echo "configure: error: Option, directshow, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, directshow, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_DIRECTSHOW"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_DIRECTSHOW ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_DIRECTSHOW 1
EOF

fi;


if test x"$MOZ_WIDGET_TOOLKIT" = x"gonk" -a -n "$MOZ_FMP4" -a -n "$ANDROID_VERSION"; then
    # we now know for sure that $ANDROID_VERSION is not an empty string!
    if test "$ANDROID_VERSION" -ge "18"; then
        MOZ_GONK_MEDIACODEC=1
        
    fi
fi


if test "$OS_TARGET" = Android -a x"$MOZ_WIDGET_TOOLKIT" != x"gonk"; then
    MOZ_ANDROID_OMX=1
fi

# Check whether --enable-android-omx or --disable-android-omx was given.
if test "${enable_android_omx+set}" = set; then
  enableval="$enable_android_omx"
  if test "$enableval" = "yes"; then
    MOZ_ANDROID_OMX=1
  elif test "$enableval" = "no"; then
    MOZ_ANDROID_OMX=
  else
    { echo "configure: error: Option, android-omx, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, android-omx, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_ANDROID_OMX"; then
  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_ANDROID_OMX ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ANDROID_OMX 1
EOF

fi

if test "$OS_TARGET" = Android -a x"$MOZ_WIDGET_TOOLKIT" != x"gonk"; then
    MOZ_OMX_PLUGIN=1
fi

# Check whether --enable-omx-plugin or --disable-omx-plugin was given.
if test "${enable_omx_plugin+set}" = set; then
  enableval="$enable_omx_plugin"
  if test "$enableval" = "yes"; then
    MOZ_OMX_PLUGIN=1
  elif test "$enableval" = "no"; then
    MOZ_OMX_PLUGIN=
  else
    { echo "configure: error: Option, omx-plugin, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, omx-plugin, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_OMX_PLUGIN"; then
    if test "$OS_TARGET" = "Android"; then
                cat >> confdefs.pytmp <<\EOF
    (''' MOZ_OMX_PLUGIN ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_OMX_PLUGIN 1
EOF

    else
                { echo "configure: error: OMX media plugin can only be built on B2G or Android" 1>&2; echo "configure: error: OMX media plugin can only be built on B2G or Android" 1>&5; exit 1; }
    fi
fi

# Check whether --with-system-libvpx or --without-system-libvpx was given.
if test "${with_system_libvpx+set}" = set; then
  withval="$with_system_libvpx"
  if test "$withval" = "yes"; then
    MOZ_SYSTEM_LIBVPX=1
  elif test "$withval" = "no"; then
    :
  else
    { echo "configure: error: Option, system-libvpx, does not take an argument ($withval)." 1>&2; echo "configure: error: Option, system-libvpx, does not take an argument ($withval)." 1>&5; exit 1; }
  fi
fi


MOZ_LIBVPX_CFLAGS=
MOZ_LIBVPX_LIBS=

if test -n "$MOZ_VPX_ERROR_CONCEALMENT" ; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_VPX_ERROR_CONCEALMENT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_VPX_ERROR_CONCEALMENT 1
EOF

fi

_SAVE_CFLAGS=$CFLAGS
_SAVE_LIBS=$LIBS
if test -n "$MOZ_SYSTEM_LIBVPX"; then
                    succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for vpx >= 1.5.0""... $ac_c" 1>&6
echo "configure:18434: checking for vpx >= 1.5.0" >&5

        if $PKG_CONFIG --exists "vpx >= 1.5.0" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_LIBVPX_CFLAGS""... $ac_c" 1>&6
echo "configure:18441: checking MOZ_LIBVPX_CFLAGS" >&5
            MOZ_LIBVPX_CFLAGS=`$PKG_CONFIG --cflags "vpx >= 1.5.0"`
            echo "$ac_t""$MOZ_LIBVPX_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_LIBVPX_LIBS""... $ac_c" 1>&6
echo "configure:18446: checking MOZ_LIBVPX_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            MOZ_LIBVPX_LIBS="`$PKG_CONFIG --libs \"vpx >= 1.5.0\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$MOZ_LIBVPX_LIBS" 1>&6
        else
            MOZ_LIBVPX_CFLAGS=""
            MOZ_LIBVPX_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            MOZ_LIBVPX_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "vpx >= 1.5.0"`
            echo $MOZ_LIBVPX_PKG_ERRORS
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       { echo "configure: error: Library requirements (vpx >= 1.5.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (vpx >= 1.5.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; }
     fi
  fi


    CFLAGS="$CFLAGS $MOZ_LIBVPX_CFLAGS"
    LIBS="$LIBS $MOZ_LIBVPX_LIBS"

       ac_safe=`echo "vpx/vpx_decoder.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for vpx/vpx_decoder.h""... $ac_c" 1>&6
echo "configure:18481: checking for vpx/vpx_decoder.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 18486 "configure"
#include "confdefs.h"

#include <vpx/vpx_decoder.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:18494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    :
  else
    echo "$ac_t""no" 1>&6
    { echo "configure: error: Couldn't find vpx/vpx_decoder.h which is required for build with system libvpx. Use --without-system-libvpx to build with in-tree libvpx." 1>&2; echo "configure: error: Couldn't find vpx/vpx_decoder.h which is required for build with system libvpx. Use --without-system-libvpx to build with in-tree libvpx." 1>&5; exit 1; }
  fi


    echo $ac_n "checking for vpx_codec_dec_init_ver in -lvpx""... $ac_c" 1>&6
echo "configure:18516: checking for vpx_codec_dec_init_ver in -lvpx" >&5
ac_lib_var=`echo vpx'_'vpx_codec_dec_init_ver | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lvpx  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 18524 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char vpx_codec_dec_init_ver();

int main() {
vpx_codec_dec_init_ver()
; return 0; }
EOF
if { (eval echo configure:18535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo vpx | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_lib ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lvpx $LIBS"

else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: --with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found" 1>&2; echo "configure: error: --with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found" 1>&5; exit 1; }
fi


       ac_safe=`echo "vpx_mem/vpx_mem.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for vpx_mem/vpx_mem.h""... $ac_c" 1>&6
echo "configure:18569: checking for vpx_mem/vpx_mem.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 18574 "configure"
#include "confdefs.h"

#include <vpx_mem/vpx_mem.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:18582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    echo $ac_n "checking for vpx_mem_set_functions""... $ac_c" 1>&6
echo "configure:18597: checking for vpx_mem_set_functions" >&5
if eval "test \"`echo '$''{'ac_cv_func_vpx_mem_set_functions'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 18602 "configure"
#define vpx_mem_set_functions innocuous_vpx_mem_set_functions
#include "confdefs.h"
#undef vpx_mem_set_functions
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char vpx_mem_set_functions(); below.  */
#define vpx_mem_set_functions innocuous_vpx_mem_set_functions
#include <assert.h>
#undef vpx_mem_set_functions
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char vpx_mem_set_functions();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_vpx_mem_set_functions) || defined (__stub___vpx_mem_set_functions)
choke me
#else
vpx_mem_set_functions();
#endif

; return 0; }
EOF
if { (eval echo configure:18629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_vpx_mem_set_functions=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_vpx_mem_set_functions=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'vpx_mem_set_functions`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

  else
    echo "$ac_t""no" 1>&6
    
  fi

    if test "$ac_cv_header_vpx_mem_vpx_mem_h" = no -o \
            "$ac_cv_func_vpx_mem_set_functions" = no; then
        cat >> confdefs.pytmp <<\EOF
    (''' MOZ_VPX_NO_MEM_REPORTING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_VPX_NO_MEM_REPORTING 1
EOF

    fi
fi
CFLAGS=$_SAVE_CFLAGS
LIBS=$_SAVE_LIBS





if test "$MOZ_SAMPLE_TYPE_FLOAT32"; then
    MOZ_VORBIS=1
else
    MOZ_TREMOR=1
fi

if test -z "$MOZ_SYSTEM_LIBVPX"; then

            
        case "$OS_ARCH:$CPU_ARCH" in
    Darwin:x86)
      VPX_USE_YASM=1
      VPX_X86_ASM=1
    ;;
    Darwin:x86_64)
      VPX_USE_YASM=1
      VPX_X86_ASM=1
    ;;
    WINNT:x86_64)
      VPX_USE_YASM=1
      VPX_X86_ASM=1
    ;;
    WINNT:x86)
            if test -n "$COMPILE_ENVIRONMENT" -a -z "$YASM"; then
        { echo "configure: error: yasm 1.1 or greater is required to build libvpx on Win32, but it appears not to be installed.  Install it (included in MozillaBuild 1.5.1 and newer) or configure with --disable-webm (which disables the WebM video format). See https://developer.mozilla.org/en/YASM for more details." 1>&2; echo "configure: error: yasm 1.1 or greater is required to build libvpx on Win32, but it appears not to be installed.  Install it (included in MozillaBuild 1.5.1 and newer) or configure with --disable-webm (which disables the WebM video format). See https://developer.mozilla.org/en/YASM for more details." 1>&5; exit 1; }
      elif test -n "$COMPILE_ENVIRONMENT" -a "$_YASM_MAJOR_VERSION" -lt "1" -o \( "$_YASM_MAJOR_VERSION" -eq "1" -a "$_YASM_MINOR_VERSION" -lt "1" \) ; then
        { echo "configure: error: yasm 1.1 or greater is required to build libvpx on Win32, but you appear to have version $_YASM_MAJOR_VERSION.$_YASM_MINOR_VERSION.  Upgrade to the newest version (included in MozillaBuild 1.5.1 and newer) or configure with --disable-webm (which disables the WebM video format). See https://developer.mozilla.org/en/YASM for more details." 1>&2; echo "configure: error: yasm 1.1 or greater is required to build libvpx on Win32, but you appear to have version $_YASM_MAJOR_VERSION.$_YASM_MINOR_VERSION.  Upgrade to the newest version (included in MozillaBuild 1.5.1 and newer) or configure with --disable-webm (which disables the WebM video format). See https://developer.mozilla.org/en/YASM for more details." 1>&5; exit 1; }
      else
        VPX_USE_YASM=1
        VPX_X86_ASM=1
              fi # COMPILE_ENVIRONMENT and others
    ;;
    *:arm*)
      if test -n "$GNU_AS" ; then
                        VPX_ASFLAGS="-march=armv7-a -mfpu=neon"
        VPX_AS_CONVERSION='$(PERL) $(topsrcdir)/media/libvpx/build/make/ads2gas.pl'
        VPX_ARM_ASM=1
                                                                                                cat > conftest.$ac_ext <<EOF
#line 18709 "configure"
#include "confdefs.h"

int main() {
#ifndef __SOFTFP__
           #error "compiler target supports -mfpu=neon, so we don't have to add extra flags"
           #endif
; return 0; }
EOF
if { (eval echo configure:18718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  VPX_ASFLAGS="$VPX_ASFLAGS -mfloat-abi=softfp"
           
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
      fi
    ;;
    *:x86)
      if $CC -E -dM -</dev/null | grep -q __ELF__; then
        VPX_USE_YASM=1
        VPX_X86_ASM=1
      fi
    ;;
    *:x86_64)
      if $CC -E -dM -</dev/null | grep -q __ELF__; then
        VPX_USE_YASM=1
        VPX_X86_ASM=1
      fi
    ;;
    esac

    if test -n "$COMPILE_ENVIRONMENT" -a -n "$VPX_USE_YASM" -a -z "$YASM"; then
      { echo "configure: error: yasm is a required build tool for this architecture when webm is enabled. You may either install yasm or --disable-webm (which disables the WebM video format). See https://developer.mozilla.org/en/YASM for more details." 1>&2; echo "configure: error: yasm is a required build tool for this architecture when webm is enabled. You may either install yasm or --disable-webm (which disables the WebM video format). See https://developer.mozilla.org/en/YASM for more details." 1>&5; exit 1; }
    fi # COMPILE_ENVIRONMENT and others

    if test -n "$VPX_USE_YASM" && test "$OS_ARCH:$CPU_ARCH" != "WINNT:x86_64"; then
      VPX_ASFLAGS="-DPIC"
    fi

    if test -n "$VPX_X86_ASM"; then
      cat >> confdefs.pytmp <<\EOF
    (''' VPX_X86_ASM ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define VPX_X86_ASM 1
EOF

    elif test -n "$VPX_ARM_ASM"; then
      cat >> confdefs.pytmp <<\EOF
    (''' VPX_ARM_ASM ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define VPX_ARM_ASM 1
EOF

    else
      echo "configure: warning: No assembler or assembly support for libvpx. Using unoptimized C routines." 1>&2
    fi

        cat >> confdefs.pytmp <<\EOF
    (''' MOZ_VPX_NO_MEM_REPORTING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_VPX_NO_MEM_REPORTING 1
EOF

fi


if test -n "$MOZ_VORBIS" -a -n "$MOZ_TREMOR"; then
    { echo "configure: error: MOZ_VORBIS and MOZ_TREMOR are mutually exclusive!  The build system should not allow them both to be set, but they are.  Please file a bug at https://bugzilla.mozilla.org/" 1>&2; echo "configure: error: MOZ_VORBIS and MOZ_TREMOR are mutually exclusive!  The build system should not allow them both to be set, but they are.  Please file a bug at https://bugzilla.mozilla.org/" 1>&5; exit 1; }
fi

if test -n "$MOZ_VORBIS"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_VORBIS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_VORBIS 1
EOF

fi

if test -n "$MOZ_TREMOR"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_TREMOR ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_TREMOR 1
EOF

fi

MOZ_WEBM_ENCODER=1
cat >> confdefs.pytmp <<\EOF
    (''' MOZ_WEBM_ENCODER ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_WEBM_ENCODER 1
EOF




if test "$OS_TARGET" = "Linux"; then
    MOZ_ALSA=1
fi

# Check whether --enable-alsa or --disable-alsa was given.
if test "${enable_alsa+set}" = set; then
  enableval="$enable_alsa"
  if test "$enableval" = "yes"; then
    MOZ_ALSA=1
  elif test "$enableval" = "no"; then
    MOZ_ALSA=
  else
    { echo "configure: error: Option, alsa, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, alsa, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_ALSA"; then
    succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for alsa""... $ac_c" 1>&6
echo "configure:18845: checking for alsa" >&5

        if $PKG_CONFIG --exists "alsa" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_ALSA_CFLAGS""... $ac_c" 1>&6
echo "configure:18852: checking MOZ_ALSA_CFLAGS" >&5
            MOZ_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa"`
            echo "$ac_t""$MOZ_ALSA_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_ALSA_LIBS""... $ac_c" 1>&6
echo "configure:18857: checking MOZ_ALSA_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            MOZ_ALSA_LIBS="`$PKG_CONFIG --libs \"alsa\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$MOZ_ALSA_LIBS" 1>&6
        else
            MOZ_ALSA_CFLAGS=""
            MOZ_ALSA_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            MOZ_ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "alsa"`
            
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       echo "$MOZ_ALSA_PKG_ERRORS"
          { echo "configure: error: Need alsa for audio output on Linux. (On Ubuntu, you might try installing the package libasound2-dev.)" 1>&2; echo "configure: error: Need alsa for audio output on Linux. (On Ubuntu, you might try installing the package libasound2-dev.)" 1>&5; exit 1; }
     fi
  fi

fi




case "$OS_TARGET" in
WINNT|Darwin|Android|OpenBSD)
    ;;
*)
    MOZ_PULSEAUDIO=1
    ;;
esac

# Check whether --enable-pulseaudio or --disable-pulseaudio was given.
if test "${enable_pulseaudio+set}" = set; then
  enableval="$enable_pulseaudio"
  if test "$enableval" = "no"; then
    MOZ_PULSEAUDIO=
  elif test "$enableval" = "yes"; then
    MOZ_PULSEAUDIO=1
  else
    { echo "configure: error: Option, pulseaudio, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, pulseaudio, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_PULSEAUDIO"; then
    if test -z "$gonkdir"; then
        succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for libpulse""... $ac_c" 1>&6
echo "configure:18926: checking for libpulse" >&5

        if $PKG_CONFIG --exists "libpulse" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_PULSEAUDIO_CFLAGS""... $ac_c" 1>&6
echo "configure:18933: checking MOZ_PULSEAUDIO_CFLAGS" >&5
            MOZ_PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags "libpulse"`
            echo "$ac_t""$MOZ_PULSEAUDIO_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_PULSEAUDIO_LIBS""... $ac_c" 1>&6
echo "configure:18938: checking MOZ_PULSEAUDIO_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            MOZ_PULSEAUDIO_LIBS="`$PKG_CONFIG --libs \"libpulse\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$MOZ_PULSEAUDIO_LIBS" 1>&6
        else
            MOZ_PULSEAUDIO_CFLAGS=""
            MOZ_PULSEAUDIO_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            MOZ_PULSEAUDIO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libpulse"`
            
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       echo "$MOZ_PULSEAUDIO_PKG_ERRORS"
              { echo "configure: error: pulseaudio audio backend requires libpulse development package" 1>&2; echo "configure: error: pulseaudio audio backend requires libpulse development package" 1>&5; exit 1; }
     fi
  fi

    else
        MOZ_PULSEAUDIO_CFLAGS="-I$gonkdir/external/pulseaudio/pulseaudio/src"
    fi
fi



# Check whether --enable-permissions or --disable-permissions was given.
if test "${enable_permissions+set}" = set; then
  enableval="$enable_permissions"
  if test "$enableval" = "no"; then
    MOZ_PERMISSIONS=
  elif test "$enableval" = "yes"; then
    MOZ_PERMISSIONS=1

  else
    { echo "configure: error: Option, permissions, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, permissions, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi



if test -n "$MOZ_PERMISSIONS"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_PERMISSIONS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_PERMISSIONS 1
EOF

fi

if test -n "$MOZ_B2G"; then
    if test -n "$MOZ_PERMISSIONS"; then
        MOZ_CHILD_PERMISSIONS=1
        cat >> confdefs.pytmp <<\EOF
    (''' MOZ_CHILD_PERMISSIONS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_CHILD_PERMISSIONS 1
EOF

    else
        { echo "configure: error: You need to enable MOZ_PERMISSIONS for MOZ_CHILD_PERMISSIONS" 1>&2; echo "configure: error: You need to enable MOZ_PERMISSIONS for MOZ_CHILD_PERMISSIONS" 1>&5; exit 1; }
    fi
fi



# Check whether --enable-negotiateauth or --disable-negotiateauth was given.
if test "${enable_negotiateauth+set}" = set; then
  enableval="$enable_negotiateauth"
  if test "$enableval" = "no"; then
    MOZ_AUTH_EXTENSION=
  elif test "$enableval" = "yes"; then
    MOZ_AUTH_EXTENSION=1 
  else
    { echo "configure: error: Option, negotiateauth, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, negotiateauth, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_IOS" -a -n "$MOZ_AUTH_EXTENSION"; then
   { echo "configure: error: negotiateauth is not supported on iOS." 1>&2; echo "configure: error: negotiateauth is not supported on iOS." 1>&5; exit 1; }
fi

# Check whether --enable-pref-extensions or --disable-pref-extensions was given.
if test "${enable_pref_extensions+set}" = set; then
  enableval="$enable_pref_extensions"
  if test "$enableval" = "no"; then
    MOZ_PREF_EXTENSIONS=
  elif test "$enableval" = "yes"; then
    MOZ_PREF_EXTENSIONS=1 
  else
    { echo "configure: error: Option, pref-extensions, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, pref-extensions, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


# Check whether --enable-system-extension-dirs or --disable-system-extension-dirs was given.
if test "${enable_system_extension_dirs+set}" = set; then
  enableval="$enable_system_extension_dirs"
  if test "$enableval" = "no"; then
    ENABLE_SYSTEM_EXTENSION_DIRS=
  elif test "$enableval" = "yes"; then
    ENABLE_SYSTEM_EXTENSION_DIRS=1 
  else
    { echo "configure: error: Option, system-extension-dirs, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, system-extension-dirs, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test "$ENABLE_SYSTEM_EXTENSION_DIRS"; then
  cat >> confdefs.pytmp <<\EOF
    (''' ENABLE_SYSTEM_EXTENSION_DIRS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define ENABLE_SYSTEM_EXTENSION_DIRS 1
EOF

fi

# Check whether --enable-universalchardet or --disable-universalchardet was given.
if test "${enable_universalchardet+set}" = set; then
  enableval="$enable_universalchardet"
  if test "$enableval" = "no"; then
    MOZ_UNIVERSALCHARDET=
  elif test "$enableval" = "yes"; then
    MOZ_UNIVERSALCHARDET=1 
  else
    { echo "configure: error: Option, universalchardet, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, universalchardet, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi



MOZ_ANGLE_RENDERER=
MOZ_D3D_CPU_SUFFIX=
MOZ_HAS_WINSDK_WITH_D3D=
MOZ_D3DCOMPILER_VISTA_DLL=
MOZ_D3DCOMPILER_VISTA_DLL_PATH=
MOZ_DIRECTX_SDK_PATH=
MOZ_D3DCOMPILER_XP_DLL=
MOZ_D3DCOMPILER_XP_CAB=

if test "$COMPILE_ENVIRONMENT" ; then
case "$target_os" in
*mingw*)
    MOZ_ANGLE_RENDERER=1
    ;;
esac

# The DirectX SDK libraries are split into x86 and x64 sub-directories
case "${target_cpu}" in
i*86)
  MOZ_D3D_CPU_SUFFIX=x86
  ;;
x86_64)
  MOZ_D3D_CPU_SUFFIX=x64
  ;;
esac

# Check whether --enable-require-all-d3dc-versions or --disable-require-all-d3dc-versions was given.
if test "${enable_require_all_d3dc_versions+set}" = set; then
  enableval="$enable_require_all_d3dc_versions"
  if test "$enableval" = "yes"; then
    MOZ_REQUIRE_ALL_D3DCS=1
  elif test "$enableval" = "no"; then
    MOZ_REQUIRE_ALL_D3DCS=
  else
    { echo "configure: error: Option, require-all-d3dc-versions, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, require-all-d3dc-versions, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


# This is potentially set in external mozconfig files; if it's set,
# then the build exposes the "webgl" context name, which is reserved
# for conformant implementations.
if test -n "$MOZ_WEBGL_CONFORMANT"; then
  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_WEBGL_CONFORMANT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_WEBGL_CONFORMANT 1
EOF

fi

MOZ_FOUND_D3D_COMPILERS=

if test -n "$MOZ_ANGLE_RENDERER"; then
  if test -z "$MOZ_D3D_CPU_SUFFIX"; then
    { echo "configure: error: Couldn't determine MOZ_D3D_CPU_SUFFIX." 1>&2; echo "configure: error: Couldn't determine MOZ_D3D_CPU_SUFFIX." 1>&5; exit 1; }
  fi

  ######################################
  # Find _46+ for use by Vista+.

  # Find a D3D compiler DLL in a Windows SDK.
  MOZ_D3DCOMPILER_VISTA_DLL=
  case "$MOZ_WINSDK_MAXVER" in
  0x0603*|0x0A00*)
    MOZ_D3DCOMPILER_VISTA_DLL=d3dcompiler_47.dll
    echo "$ac_t""Found D3D compiler in Windows SDK." 1>&6
  ;;
  esac

  if test -n "$MOZ_D3DCOMPILER_VISTA_DLL"; then
    # We have a name, now track down the path.
    if test -n "$WINDOWSSDKDIR"; then
      MOZ_D3DCOMPILER_VISTA_DLL_PATH="$WINDOWSSDKDIR/Redist/D3D/$MOZ_D3D_CPU_SUFFIX/$MOZ_D3DCOMPILER_VISTA_DLL"
      if test -f "$MOZ_D3DCOMPILER_VISTA_DLL_PATH"; then
        echo "$ac_t""Found MOZ_D3DCOMPILER_VISTA_DLL_PATH: $MOZ_D3DCOMPILER_VISTA_DLL_PATH" 1>&6
        MOZ_HAS_WINSDK_WITH_D3D=1
      else
        echo "$ac_t""MOZ_D3DCOMPILER_VISTA_DLL_PATH doesn't exist: $MOZ_D3DCOMPILER_VISTA_DLL_PATH" 1>&6
        { echo "configure: error: Windows SDK at "$WINDOWSSDKDIR" appears broken. Try updating to MozillaBuild 1.9 final or higher." 1>&2; echo "configure: error: Windows SDK at "$WINDOWSSDKDIR" appears broken. Try updating to MozillaBuild 1.9 final or higher." 1>&5; exit 1; }
        MOZ_D3DCOMPILER_VISTA_DLL_PATH=
      fi
    else
      echo "$ac_t""Windows SDK not found." 1>&6
    fi
  else
    { echo "configure: error: Couldn't find Windows SDK 8.1 or higher needed for ANGLE." 1>&2; echo "configure: error: Couldn't find Windows SDK 8.1 or higher needed for ANGLE." 1>&5; exit 1; }
  fi

  if test -z "$MOZ_D3DCOMPILER_VISTA_DLL_PATH"; then
    MOZ_D3DCOMPILER_VISTA_DLL=
  fi

  # On mingw, check if headers are provided by toolchain.
  if test -n "$GNU_CC"; then
       ac_safe=`echo "d3d10.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for d3d10.h""... $ac_c" 1>&6
echo "configure:19181: checking for d3d10.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 19186 "configure"
#include "confdefs.h"

#include <d3d10.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:19194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    MOZ_HAS_WINSDK_WITH_D3D=1
  else
    echo "$ac_t""no" 1>&6
    
  fi

  fi

  ######################################
  # Find _43 for use by XP.

  if test "$HAVE_64BIT_BUILD"; then
    echo "$ac_t""We are building a 64-bit binary, skip checking d3dcompiler_43." 1>&6
  else
    # Get the SDK path from the registry.
    # First try to get the June 2010 SDK
    MOZ_DIRECTX_SDK_REG_KEY=`reg query 'HKLM\Software\Microsoft\DirectX' //s | grep 'Microsoft DirectX SDK (June 2010)' | head -n 1`
    if test -z "$MOZ_DIRECTX_SDK_REG_KEY" ; then
      # Otherwise just take whatever comes first
      MOZ_DIRECTX_SDK_REG_KEY=`reg query 'HKLM\Software\Microsoft\DirectX' //s | grep 'Microsoft DirectX SDK' | head -n 1`
    fi
    MOZ_DIRECTX_SDK_PATH=`reg query "$MOZ_DIRECTX_SDK_REG_KEY" //v InstallPath | grep REG_SZ | sed 's/.*\([a-zA-Z]\)\\:\\\\/\\1\\:\\\\/' | sed 's,\\\\,/,g'`

    if test -n "$MOZ_DIRECTX_SDK_PATH" &&
       test -f "$MOZ_DIRECTX_SDK_PATH"/lib/$MOZ_D3D_CPU_SUFFIX/dxguid.lib ; then
      echo "$ac_t""Found DirectX SDK via registry, using $MOZ_DIRECTX_SDK_PATH" 1>&6
    else
      echo "$ac_t""DirectX SDK not found." 1>&6
      MOZ_DIRECTX_SDK_PATH=
    fi

    # Check that our DirectX SDK is acceptable.
    if test -n "$MOZ_DIRECTX_SDK_PATH"; then
      if test -n "`echo $MOZ_DIRECTX_SDK_REG_KEY | grep 'February 2010'`" ; then
        echo "$ac_t""Found the February 2010 DirectX SDK, which is unacceptable to ANGLE." 1>&6
        MOZ_DIRECTX_SDK_PATH=
      fi
    fi

    if test -n "$MOZ_DIRECTX_SDK_PATH"; then
      # Find a D3D compiler DLL in the DirectX SDK, if we didn't find one already.
      # Get the SDK numeric version (e.g. 43) by looking at the dependencies of d3dx9.lib
      MOZ_D3DX9_VERSION=`dumpbin //headers "$MOZ_DIRECTX_SDK_PATH"/lib/$MOZ_D3D_CPU_SUFFIX/d3dx9.lib | egrep d3dx9_[0-9][0-9]\.dll | head -n1 | sed 's/.*\([0-9][0-9]\).*/\\1/g'`

      if test -n "$MOZ_D3DX9_VERSION" ; then
        MOZ_D3DCOMPILER_XP_CAB=`find "$MOZ_DIRECTX_SDK_PATH"/Redist -name *D3DCompiler_${MOZ_D3DX9_VERSION}_${MOZ_D3D_CPU_SUFFIX}.cab | head -n1`

        if test -n "$MOZ_D3DCOMPILER_XP_CAB"; then
          MOZ_D3DCOMPILER_XP_DLL=D3DCompiler_$MOZ_D3DX9_VERSION.dll
        else
          echo "$ac_t""Couldn't find a CAB containing the D3D compiler DLL." 1>&6
          { echo "configure: error: DirectX SDK at "$MOZ_DIRECTX_SDK_PATH" appears broken." 1>&2; echo "configure: error: DirectX SDK at "$MOZ_DIRECTX_SDK_PATH" appears broken." 1>&5; exit 1; }
          MOZ_DIRECTX_SDK_PATH=
        fi
      else
        echo "$ac_t""Couldn't determine the D3DX9 version for the DirectX SDK." 1>&6
        MOZ_DIRECTX_SDK_PATH=
      fi
    else
      echo "$ac_t""Couldn't find an acceptable DirectX SDK for ANGLE, needed for d3dcompiler_43." 1>&6
    fi
  fi

  ######################################
  # Check that we found what we needed.
  MOZ_FOUND_A_D3D_COMPILER=
  MOZ_FOUND_BOTH_D3D_COMPILERS=1

  if test -n "$MOZ_D3DCOMPILER_VISTA_DLL"; then
    MOZ_FOUND_A_D3D_COMPILER=1
    echo "$ac_t""Found d3dcompiler DLL for Vista+: $MOZ_D3DCOMPILER_VISTA_DLL" 1>&6
  else
    MOZ_FOUND_BOTH_D3D_COMPILERS=
  fi

  if test -n "$MOZ_D3DCOMPILER_XP_DLL"; then
    MOZ_FOUND_A_D3D_COMPILER=1
    echo "$ac_t""Found d3dcompiler DLL for XP: $MOZ_D3DCOMPILER_XP_DLL" 1>&6
  else
    MOZ_FOUND_BOTH_D3D_COMPILERS=
  fi

  if test -z "$CROSS_COMPILE"; then
    if test -z "MOZ_FOUND_A_D3D_COMPILER"; then
      { echo "configure: error: Couldn't find an acceptable D3D compiler DLL." 1>&2; echo "configure: error: Couldn't find an acceptable D3D compiler DLL." 1>&5; exit 1; }
    fi

    if test -n "$MOZ_REQUIRE_ALL_D3DCS" -a -z "$MOZ_FOUND_BOTH_D3D_COMPILERS"; then
      { echo "configure: error: Both D3D compilers _43 and _46+ are required by --enable-require-d3d-compilers." 1>&2; echo "configure: error: Both D3D compilers _43 and _46+ are required by --enable-require-d3d-compilers." 1>&5; exit 1; }
      { echo "configure: error:   Install Windows SDK 8.0+, as well as DirectX SDK (June 2010 version or newer), or reconfigure without this flag." 1>&2; echo "configure: error:   Install Windows SDK 8.0+, as well as DirectX SDK (June 2010 version or newer), or reconfigure without this flag." 1>&5; exit 1; }
    fi
  fi
fi # MOZ_ANGLE_RENDERER

fi # COMPILE_ENVIRONMENT


MOZ_GAMEPAD=
MOZ_GAMEPAD_BACKEND=stub

# Gamepad DOM is built on supported platforms by default.
case "$OS_TARGET" in
     WINNT|Linux)
       MOZ_GAMEPAD=1
       ;;
     Darwin)
       if test -z "$MOZ_IOS"; then
         MOZ_GAMEPAD=1
       fi
       ;;
     Android)
       if test "$MOZ_WIDGET_TOOLKIT" != "gonk"; then
         MOZ_GAMEPAD=1
       fi
       ;;
     *)
       ;;
esac

# Check whether --enable-gamepad or --disable-gamepad was given.
if test "${enable_gamepad+set}" = set; then
  enableval="$enable_gamepad"
  if test "$enableval" = "no"; then
    MOZ_GAMEPAD=
  elif test "$enableval" = "yes"; then
    MOZ_GAMEPAD=1
  else
    { echo "configure: error: Option, gamepad, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, gamepad, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test "$MOZ_GAMEPAD"; then
    case "$OS_TARGET" in
    Darwin)
        if test -z "$MOZ_IOS"; then
            MOZ_GAMEPAD_BACKEND=cocoa
        fi
        ;;
    WINNT)
        MOZ_GAMEPAD_BACKEND=windows
        ;;
    Linux)
           ac_safe=`echo "linux/joystick.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for linux/joystick.h""... $ac_c" 1>&6
echo "configure:19353: checking for linux/joystick.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 19358 "configure"
#include "confdefs.h"

#include <linux/joystick.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:19366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    :
  else
    echo "$ac_t""no" 1>&6
    
  fi

        if test "$ac_cv_header_linux_joystick_h" != "yes"; then
          { echo "configure: error: Can't find header linux/joystick.h, needed for gamepad support. Please install Linux kernel headers or reconfigure with --disable-gamepad to disable gamepad support." 1>&2; echo "configure: error: Can't find header linux/joystick.h, needed for gamepad support. Please install Linux kernel headers or reconfigure with --disable-gamepad to disable gamepad support." 1>&5; exit 1; }
        fi
        MOZ_GAMEPAD_BACKEND=linux
        ;;
    Android)
        MOZ_GAMEPAD_BACKEND=android
        ;;
    *)
        ;;
   esac

  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_GAMEPAD ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_GAMEPAD 1
EOF

fi




case $target in
i?86-*-mingw*|x86_64-*-mingw*)
  MOZ_CRASHREPORTER=1
  ;;
i?86-apple-darwin*|x86_64-apple-darwin*)
  if test -z "$MOZ_IOS"; then
    MOZ_CRASHREPORTER=1
  fi
  ;;
i?86-*-linux*|x86_64-*-linux*|arm-*-linux*)
  if test "$MOZ_ENABLE_GTK"; then
    MOZ_CRASHREPORTER=1
  fi
  ;;
*-android*|*-linuxandroid*)
  MOZ_CRASHREPORTER=1
  ;;
esac

# Check whether --enable-crashreporter or --disable-crashreporter was given.
if test "${enable_crashreporter+set}" = set; then
  enableval="$enable_crashreporter"
  if test "$enableval" = "no"; then
    MOZ_CRASHREPORTER=
  elif test "$enableval" = "yes"; then
    MOZ_CRASHREPORTER=F # Force enable breakpad
  else
    { echo "configure: error: Option, crashreporter, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, crashreporter, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test "$OS_ARCH" != "$HOST_OS_ARCH" -a "$OS_ARCH" != "WINNT" -a "$OS_ARCH" != "Darwin"; then
  if test "$MOZ_CRASHREPORTER" = F; then
    { echo "configure: error: Cannot --enable-crashreporter, as breakpad tools do not support compiling on $HOST_OS_ARCH while targeting $OS_ARCH." 1>&2; echo "configure: error: Cannot --enable-crashreporter, as breakpad tools do not support compiling on $HOST_OS_ARCH while targeting $OS_ARCH." 1>&5; exit 1; }
  fi
  MOZ_CRASHREPORTER=
fi

if test -n "$MOZ_CRASHREPORTER"; then
   cat >> confdefs.pytmp <<\EOF
    (''' MOZ_CRASHREPORTER ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_CRASHREPORTER 1
EOF


  if test "$OS_TARGET" = "Linux" && \
    test -z "$SKIP_LIBRARY_CHECKS"; then
    succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for gthread-2.0""... $ac_c" 1>&6
echo "configure:19471: checking for gthread-2.0" >&5

        if $PKG_CONFIG --exists "gthread-2.0" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_GTHREAD_CFLAGS""... $ac_c" 1>&6
echo "configure:19478: checking MOZ_GTHREAD_CFLAGS" >&5
            MOZ_GTHREAD_CFLAGS=`$PKG_CONFIG --cflags "gthread-2.0"`
            echo "$ac_t""$MOZ_GTHREAD_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_GTHREAD_LIBS""... $ac_c" 1>&6
echo "configure:19483: checking MOZ_GTHREAD_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            MOZ_GTHREAD_LIBS="`$PKG_CONFIG --libs \"gthread-2.0\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$MOZ_GTHREAD_LIBS" 1>&6
        else
            MOZ_GTHREAD_CFLAGS=""
            MOZ_GTHREAD_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            MOZ_GTHREAD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gthread-2.0"`
            echo $MOZ_GTHREAD_PKG_ERRORS
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       { echo "configure: error: Library requirements (gthread-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (gthread-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; }
     fi
  fi

  fi

  if test "$OS_ARCH" = "WINNT"; then
    if test -z "$HAVE_64BIT_BUILD"; then
      MOZ_CRASHREPORTER_INJECTOR=1
      cat >> confdefs.pytmp <<\EOF
    (''' MOZ_CRASHREPORTER_INJECTOR ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_CRASHREPORTER_INJECTOR 1
EOF

    fi
  fi
fi

# Check whether --with-crashreporter-enable-percent or --without-crashreporter-enable-percent was given.
if test "${with_crashreporter_enable_percent+set}" = set; then
  withval="$with_crashreporter_enable_percent"
   val=`echo $withval | sed 's/^0-9//g'`
    MOZ_CRASHREPORTER_ENABLE_PERCENT="$val"
fi


if test -z "$MOZ_CRASHREPORTER_ENABLE_PERCENT"; then
   MOZ_CRASHREPORTER_ENABLE_PERCENT=100
fi
cat >> confdefs.pytmp <<EOF
    (''' MOZ_CRASHREPORTER_ENABLE_PERCENT ''', r''' $MOZ_CRASHREPORTER_ENABLE_PERCENT ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_CRASHREPORTER_ENABLE_PERCENT $MOZ_CRASHREPORTER_ENABLE_PERCENT
EOF


MOZ_LIBJPEG_TURBO=
LIBJPEG_TURBO_USE_YASM=
if test -z "$MOZ_SYSTEM_JPEG"; then
    MOZ_LIBJPEG_TURBO=1
fi

# Check whether --enable-libjpeg_turbo or --disable-libjpeg_turbo was given.
if test "${enable_libjpeg_turbo+set}" = set; then
  enableval="$enable_libjpeg_turbo"
  if test "$enableval" = "no"; then
    MOZ_LIBJPEG_TURBO=
  elif test "$enableval" = "yes"; then
    MOZ_LIBJPEG_TURBO=1
  else
    { echo "configure: error: Option, libjpeg_turbo, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, libjpeg_turbo, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test "$MOZ_SYSTEM_JPEG" = 1 -a "$MOZ_LIBJPEG_TURBO" = 1; then
    { echo "configure: error: cannot use --with-system-jpeg with --enable-libjpeg-turbo." 1>&2; echo "configure: error: cannot use --with-system-jpeg with --enable-libjpeg-turbo." 1>&5; exit 1; }
fi


if test -n "$MOZ_LIBJPEG_TURBO" -a -n "$COMPILE_ENVIRONMENT"; then

    case "$OS_ARCH:$CPU_ARCH" in
  Darwin:x86)
    LIBJPEG_TURBO_ASFLAGS="-DPIC -DMACHO"
  ;;
  Darwin:x86_64)
    LIBJPEG_TURBO_ASFLAGS="-D__x86_64__ -DPIC -DMACHO"
  ;;
  Darwin:arm*)
  ;;
  WINNT:x86)
    LIBJPEG_TURBO_ASFLAGS="-DPIC -DWIN32"
  ;;
  WINNT:x86_64)
    LIBJPEG_TURBO_ASFLAGS="-D__x86_64__ -DPIC -DWIN64 -DMSVC"
  ;;
  *:arm)
    LIBJPEG_TURBO_ASFLAGS="-march=armv7-a -mfpu=neon"
  ;;
  *:aarch64)
    LIBJPEG_TURBO_ASFLAGS="-march=armv8-a"
  ;;
  *:mips32)
    LIBJPEG_TURBO_ASFLAGS="-mdspr2"
  ;;
  *:x86)
    if $CC -E -dM -</dev/null | grep -q __ELF__; then
      LIBJPEG_TURBO_ASFLAGS="-DPIC -DELF"
    fi
  ;;
  *:x86_64)
    if $CC -E -dM -</dev/null | grep -q __ELF__; then
      LIBJPEG_TURBO_ASFLAGS="-D__x86_64__ -DPIC -DELF"
    fi
  ;;
  esac
fi

if test -n "$LIBJPEG_TURBO_ASFLAGS"; then
  case "$CPU_ARCH" in
  x86_64|x86)
    LIBJPEG_TURBO_USE_YASM=1

    if test -z "$YASM" ; then
        { echo "configure: error: Yasm is required to build with libjpeg-turbo's optimized JPEG decoding routines, but you do not appear to have Yasm installed.  Either install it or configure with --disable-libjpeg-turbo to use the pure C JPEG decoder.  See https://developer.mozilla.org/en/YASM for more details." 1>&2; echo "configure: error: Yasm is required to build with libjpeg-turbo's optimized JPEG decoding routines, but you do not appear to have Yasm installed.  Either install it or configure with --disable-libjpeg-turbo to use the pure C JPEG decoder.  See https://developer.mozilla.org/en/YASM for more details." 1>&5; exit 1; }
    fi

            if test "$OS_ARCH" = "Linux" ; then
        if test "$_YASM_MAJOR_VERSION" -lt "1" -o \( "$_YASM_MAJOR_VERSION" -eq "1" -a "$_YASM_MINOR_VERSION" -eq "0" -a "$_YASM_RELEASE" -lt "1" \) ; then
            { echo "configure: error: Yasm 1.0.1 or greater is required to build with libjpeg-turbo's optimized JPEG decoding routines, but you appear to have version $_YASM_MAJOR_VERSION.$_YASM_MINOR_VERSION.$_YASM_RELEASE.  Upgrade to the newest version or configure with --disable-libjpeg-turbo to use the pure C JPEG decoder.  See https://developer.mozilla.org/en/YASM for more details." 1>&2; echo "configure: error: Yasm 1.0.1 or greater is required to build with libjpeg-turbo's optimized JPEG decoding routines, but you appear to have version $_YASM_MAJOR_VERSION.$_YASM_MINOR_VERSION.$_YASM_RELEASE.  Upgrade to the newest version or configure with --disable-libjpeg-turbo to use the pure C JPEG decoder.  See https://developer.mozilla.org/en/YASM for more details." 1>&5; exit 1; }
        fi
    else
        if test "$_YASM_MAJOR_VERSION" -lt "1" -o \( "$_YASM_MAJOR_VERSION" -eq "1" -a "$_YASM_MINOR_VERSION" -lt "1" \) ; then
            { echo "configure: error: Yasm 1.1 or greater is required to build with libjpeg-turbo's optimized JPEG decoding routines, but you appear to have version $_YASM_MAJOR_VERSION.$_YASM_MINOR_VERSION.  Upgrade to the newest version or configure with --disable-libjpeg-turbo to use the pure C JPEG decoder.  See https://developer.mozilla.org/en/YASM for more details." 1>&2; echo "configure: error: Yasm 1.1 or greater is required to build with libjpeg-turbo's optimized JPEG decoding routines, but you appear to have version $_YASM_MAJOR_VERSION.$_YASM_MINOR_VERSION.  Upgrade to the newest version or configure with --disable-libjpeg-turbo to use the pure C JPEG decoder.  See https://developer.mozilla.org/en/YASM for more details." 1>&5; exit 1; }
        fi
    fi
  ;;
  esac
fi


MOZ_LIBAV_FFT=


case "$OS_ARCH:$CPU_ARCH" in
  WINNT:x86)
      MOZ_LIBAV_FFT=1
  ;;
  *:x86_64)
      MOZ_LIBAV_FFT=1
  ;;
esac


if test -n "$MOZ_LIBAV_FFT" -a -n "$COMPILE_ENVIRONMENT"; then
  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_LIBAV_FFT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_LIBAV_FFT 1
EOF

    case "$OS_ARCH:$CPU_ARCH" in
  Darwin:x86_64)
    LIBAV_FFT_ASFLAGS="-D__x86_64__ -DPIC -DMACHO"
  ;;
  WINNT:x86)
    LIBAV_FFT_ASFLAGS="-DPIC -DWIN32"
  ;;
  WINNT:x86_64)
    LIBAV_FFT_ASFLAGS="-D__x86_64__ -DPIC -DWIN64 -DMSVC"
  ;;
  *:x86_64)
    if $CC -E -dM -</dev/null | grep -q __ELF__; then
      LIBAV_FFT_ASFLAGS="-D__x86_64__ -DPIC -DELF"
    fi
  ;;
  *)
    { echo "configure: error: libav's FFT routines are only available for 32-bit windows or 64-bit x86 based platforms." 1>&2; echo "configure: error: libav's FFT routines are only available for 32-bit windows or 64-bit x86 based platforms." 1>&5; exit 1; }
  ;;
  esac
fi

if test -n "$LIBAV_FFT_ASFLAGS"; then
        if test -z "$YASM" ; then
    { echo "configure: error: Yasm is required to build with libav's optimized FFT routines, but you do not appear to have Yasm installed. See https://developer.mozilla.org/en/YASM for more details." 1>&2; echo "configure: error: Yasm is required to build with libav's optimized FFT routines, but you do not appear to have Yasm installed. See https://developer.mozilla.org/en/YASM for more details." 1>&5; exit 1; }
  fi
      if test "$OS_ARCH" = "Linux" ; then
    if test "$_YASM_MAJOR_VERSION" -lt "1" -o \( "$_YASM_MAJOR_VERSION" -eq "1" -a "$_YASM_MINOR_VERSION" -eq "0" -a "$_YASM_RELEASE" -lt "1" \) ; then
      { echo "configure: error: Yasm 1.0.1 or greater is required to build with libav's optimized FFT routines, but you do not appear to have Yasm installed.  See https://developer.mozilla.org/en/YASM for more details." 1>&2; echo "configure: error: Yasm 1.0.1 or greater is required to build with libav's optimized FFT routines, but you do not appear to have Yasm installed.  See https://developer.mozilla.org/en/YASM for more details." 1>&5; exit 1; }
    fi
  else
    if test "$_YASM_MAJOR_VERSION" -lt "1" -o \( "$_YASM_MAJOR_VERSION" -eq "1" -a "$_YASM_MINOR_VERSION" -lt "1" \) ; then
      { echo "configure: error: Yasm 1.1 or greater is required to build with libav's optimized FFT routines, but you do not appear to have Yasm installed.  See https://developer.mozilla.org/en/YASM for more details." 1>&2; echo "configure: error: Yasm 1.1 or greater is required to build with libav's optimized FFT routines, but you do not appear to have Yasm installed.  See https://developer.mozilla.org/en/YASM for more details." 1>&5; exit 1; }
    fi
  fi
elif test -n "$MOZ_LIBAV_FFT" -a "${CPU_ARCH}" != "arm"; then
    echo "configure: warning: No assembler or assembly support for libav-fft.  Using unoptimized C routines." 1>&2
fi


MOZ_FFVPX=
case "$CPU_ARCH" in
  x86)
      MOZ_FFVPX=1
  ;;
  x86_64)
      MOZ_FFVPX=1
  ;;
esac

if test -n "$MOZ_LIBAV_FFT"; then
  FFVPX_ASFLAGS=$LIBAV_FFT_ASFLAGS
fi
if test -n "$MOZ_FFVPX"; then
  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_FFVPX ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_FFVPX 1
EOF

fi


# Check whether --enable-extensions or --disable-extensions was given.
if test "${enable_extensions+set}" = set; then
  enableval="$enable_extensions"
   for option in `echo $enableval | sed 's/,/ /g'`; do
    if test "$option" = "yes" -o "$option" = "all"; then
        { echo "configure: error: --enable-extensions=$option is no longer supported." 1>&2; echo "configure: error: --enable-extensions=$option is no longer supported." 1>&5; exit 1; }
    elif test "$option" = "no" -o "$option" = "none"; then
        MOZ_EXTENSIONS=""
    elif test "$option" = "default"; then
        MOZ_EXTENSIONS="$MOZ_EXTENSIONS $MOZ_EXTENSIONS_DEFAULT"
    elif test `echo "$option" | grep -c \^-` != 0; then
        option=`echo $option | sed 's/^-//'`
        MOZ_EXTENSIONS=`echo "$MOZ_EXTENSIONS" | sed "s/ ${option}//"`
    else
        MOZ_EXTENSIONS="$MOZ_EXTENSIONS $option"
    fi
done
else
  MOZ_EXTENSIONS="$MOZ_EXTENSIONS_DEFAULT"
fi


if test -z "$MOZ_ENABLE_GIO" -a `echo "$MOZ_EXTENSIONS" | grep -c gio` -ne 0; then
    # Suppress warning on non-X11 platforms
    if test -n "$MOZ_X11"; then
        echo "configure: warning: Removing gio from MOZ_EXTENSIONS due to --disable-gio." 1>&2
    fi
    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|gio||'`
fi

if test `echo "$MOZ_EXTENSIONS" | grep -c gio` -ne 0; then
    MOZ_GIO_COMPONENT=1
    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|gio||'`
fi


for extension in $MOZ_EXTENSIONS; do
    if test ! -d "${srcdir}/extensions/${extension}"; then
        { echo "configure: error: Unrecognized extension provided to --enable-extensions: ${extension}." 1>&2; echo "configure: error: Unrecognized extension provided to --enable-extensions: ${extension}." 1>&5; exit 1; }
    fi
done

if test -n "$MOZ_USE_NATIVE_POPUP_WINDOWS"; then
  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_USE_NATIVE_POPUP_WINDOWS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_USE_NATIVE_POPUP_WINDOWS 1
EOF

fi

# Check whether --enable-tree-freetype or --disable-tree-freetype was given.
if test "${enable_tree_freetype+set}" = set; then
  enableval="$enable_tree_freetype"
  if test "$enableval" = "yes"; then
    MOZ_TREE_FREETYPE=1
  elif test "$enableval" = "no"; then
    MOZ_TREE_FREETYPE= 
  else
    { echo "configure: error: Option, tree-freetype, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, tree-freetype, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test -n "$MOZ_TREE_FREETYPE"; then
   if test -n "$_WIN32_MSVC"; then
      { echo "configure: error: "building with in-tree freetype is not supported on MSVC"" 1>&2; echo "configure: error: "building with in-tree freetype is not supported on MSVC"" 1>&5; exit 1; }
   fi
   cat >> confdefs.pytmp <<\EOF
    (''' MOZ_TREE_FREETYPE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_TREE_FREETYPE 1
EOF

   
   MOZ_ENABLE_CAIRO_FT=1
   FT_FONT_FEATURE="#define CAIRO_HAS_FT_FONT 1"
   FT2_CFLAGS="-I$_topsrcdir/modules/freetype2/include"
   CAIRO_FT_CFLAGS="-I$_topsrcdir/modules/freetype2/include"
   CAIRO_FT_OSLIBS=''
   cat >> confdefs.pytmp <<\EOF
    (''' HAVE_FT_BITMAP_SIZE_Y_PPEM ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_FT_BITMAP_SIZE_Y_PPEM 1
EOF

   cat >> confdefs.pytmp <<\EOF
    (''' HAVE_FT_GLYPHSLOT_EMBOLDEN ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_FT_GLYPHSLOT_EMBOLDEN 1
EOF

   cat >> confdefs.pytmp <<\EOF
    (''' HAVE_FT_LOAD_SFNT_TABLE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_FT_LOAD_SFNT_TABLE 1
EOF

   
fi

if test "$OS_ARCH" = "WINNT"; then
    MIN_NSIS_MAJOR_VER=3
    MIN_NSIS_MINOR_VER=0
    MIN_NSIS_PRERELEASE_TYPE=b
    MIN_NSIS_PRERELEASE_VER=1
      for ac_prog in $MAKENSISU makensis-3.0b3.exe makensis-3.0b1.exe makensis
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:19832: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MAKENSISU'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$MAKENSISU" in
  /*)
  ac_cv_path_MAKENSISU="$MAKENSISU" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_MAKENSISU="$MAKENSISU" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_MAKENSISU="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
MAKENSISU="$ac_cv_path_MAKENSISU"
if test -n "$MAKENSISU"; then
  echo "$ac_t""$MAKENSISU" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$MAKENSISU" && break
done

  if test "$msyshost"; then
    case "$MAKENSISU" in
    /*)
      tmp_DIRNAME=`dirname "$MAKENSISU"`
      tmp_BASENAME=`basename "$MAKENSISU"`
      tmp_PWD=`cd "$tmp_DIRNAME" && pwd -W`
      MAKENSISU="$tmp_PWD/$tmp_BASENAME"
      if test -e "$MAKENSISU.exe"; then
        MAKENSISU="$MAKENSISU.exe"
      fi
    esac
  fi

    if test -n "$MAKENSISU" -a "$MAKENSISU" != ":"; then
      echo "$ac_t""yes" 1>&6
      MAKENSISU_VER=`"$MAKENSISU" -version 2>/dev/null`
      
      MAKENSISU_PARSED_VER=`echo "$MAKENSISU_VER" | sed -e 's/^v\([0-9]\+\.[0-9]\+\).*$/\1/g'`
      
      MAKENSISU_MAJOR_VER=0
      MAKENSISU_MINOR_VER=0
      MAKENSISU_PRERELEASE_TYPE=$MIN_NSIS_PRERELEASE_TYPE
      MAKENSISU_PRERELEASE_VER=$MIN_NSIS_PRERELEASE_VER
      if test ! "$MAKENSISU_PARSED_VER" = ""; then
          MAKENSISU_MAJOR_VER=`echo $MAKENSISU_PARSED_VER | $AWK -F\. '{ print $1 }'`
          MAKENSISU_MINOR_VER=`echo $MAKENSISU_PARSED_VER | $AWK -F\. '{ print $2 }'`
          
          MAKENSISU_PARSED_PRERELEASE=`echo "$MAKENSISU_VER" | sed -e 's/^v[0-9]\+\.[0-9]\+\([^0-9]\+\)\([0-9]\+\).*$/\1.\2/g'`
          
          if test ! "$MAKENSISU_PARSED_PRERELEASE" = "$MAKENSISU_VER"; then
              MAKENSISU_PRERELEASE_TYPE=`echo $MAKENSISU_PARSED_PRERELEASE | $AWK -F\. '{ print $1 }'`
              MAKENSISU_PRERELEASE_VER=`echo $MAKENSISU_PARSED_PRERELEASE | $AWK -F\. '{ print $2 }'`
          fi
      fi
      echo $ac_n "checking for NSIS version $MIN_NSIS_MAJOR_VER.$MIN_NSIS_MINOR_VER$MIN_NSIS_PRERELEASE_TYPE$MIN_NSIS_PRERELEASE_VER or greater""... $ac_c" 1>&6
echo "configure:19902: checking for NSIS version $MIN_NSIS_MAJOR_VER.$MIN_NSIS_MINOR_VER$MIN_NSIS_PRERELEASE_TYPE$MIN_NSIS_PRERELEASE_VER or greater" >&5
      if test "$MAKENSISU_MAJOR_VER" -eq $MIN_NSIS_MAJOR_VER -a \
              "$MAKENSISU_MINOR_VER" -ge $MIN_NSIS_MINOR_VER -a \
              "$MAKENSISU_PRERELEASE_TYPE" = "$MIN_NSIS_PRERELEASE_TYPE" -a \
              "$MAKENSISU_PRERELEASE_VER" -ge $MIN_NSIS_PRERELEASE_VER; then
          echo "$ac_t""yes" 1>&6
          echo "$ac_t""Found NSIS Version: $MAKENSISU_VER" 1>&6
      else
          echo "$ac_t""no" 1>&6
          if test -z "$CROSS_COMPILE"; then
            { echo "configure: error: To build the installer you must have the latest MozillaBuild or NSIS version $MIN_NSIS_MAJOR_VER.$MIN_NSIS_MINOR_VER$MIN_NSIS_PRERELEASE_TYPE$MIN_NSIS_PRERELEASE_VER or greater in your path." 1>&2; echo "configure: error: To build the installer you must have the latest MozillaBuild or NSIS version $MIN_NSIS_MAJOR_VER.$MIN_NSIS_MINOR_VER$MIN_NSIS_PRERELEASE_TYPE$MIN_NSIS_PRERELEASE_VER or greater in your path." 1>&5; exit 1; }
          else
            MAKENSISU=
          fi
      fi
    elif test -z "$CROSS_COMPILE"; then
      { echo "configure: error: To build the installer you must have the latest MozillaBuild or NSIS version $MIN_NSIS_MAJOR_VER.$MIN_NSIS_MINOR_VER$MIN_NSIS_PRERELEASE_TYPE$MIN_NSIS_PRERELEASE_VER or greater in your path." 1>&2; echo "configure: error: To build the installer you must have the latest MozillaBuild or NSIS version $MIN_NSIS_MAJOR_VER.$MIN_NSIS_MINOR_VER$MIN_NSIS_PRERELEASE_TYPE$MIN_NSIS_PRERELEASE_VER or greater in your path." 1>&5; exit 1; }
    else
      MAKENSISU=
    fi
fi

for ac_prog in wget
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:19929: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WGET'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$WGET"; then
  ac_cv_prog_WGET="$WGET" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_WGET="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
WGET="$ac_cv_prog_WGET"
if test -n "$WGET"; then
  echo "$ac_t""$WGET" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$WGET" && break
done
test -n "$WGET" || WGET=""""




# Check whether --enable-maintenance-service or --disable-maintenance-service was given.
if test "${enable_maintenance_service+set}" = set; then
  enableval="$enable_maintenance_service"
  if test "$enableval" = "yes"; then
    MOZ_MAINTENANCE_SERVICE=1
  elif test "$enableval" = "no"; then
    MOZ_MAINTENANCE_SERVICE= 
  else
    { echo "configure: error: Option, maintenance-service, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, maintenance-service, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_MAINTENANCE_SERVICE"; then
  if test "$OS_ARCH" = "WINNT"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_MAINTENANCE_SERVICE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_MAINTENANCE_SERVICE 1
EOF

  else
    { echo "configure: error: Can only build with --enable-maintenance-service with a Windows target" 1>&2; echo "configure: error: Can only build with --enable-maintenance-service with a Windows target" 1>&5; exit 1; }
  fi
fi


# Check whether --enable-bundled-fonts or --disable-bundled-fonts was given.
if test "${enable_bundled_fonts+set}" = set; then
  enableval="$enable_bundled_fonts"
  if test "$enableval" = "yes"; then
    MOZ_BUNDLED_FONTS=1
  elif test "$enableval" = "no"; then
    MOZ_BUNDLED_FONTS=
  else
    { echo "configure: error: Option, bundled-fonts, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, bundled-fonts, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_BUNDLED_FONTS"; then
  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_BUNDLED_FONTS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_BUNDLED_FONTS 1
EOF

fi


# Check whether --enable-verify-mar or --disable-verify-mar was given.
if test "${enable_verify_mar+set}" = set; then
  enableval="$enable_verify_mar"
  if test "$enableval" = "yes"; then
    MOZ_VERIFY_MAR_SIGNATURE=1
  elif test "$enableval" = "no"; then
    MOZ_VERIFY_MAR_SIGNATURE= 
  else
    { echo "configure: error: Option, verify-mar, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, verify-mar, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_VERIFY_MAR_SIGNATURE"; then
  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_VERIFY_MAR_SIGNATURE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_VERIFY_MAR_SIGNATURE 1
EOF

fi


# Check whether --enable-signmar or --disable-signmar was given.
if test "${enable_signmar+set}" = set; then
  enableval="$enable_signmar"
  if test "$enableval" = "yes"; then
    MOZ_ENABLE_SIGNMAR=1
  elif test "$enableval" = "no"; then
    MOZ_ENABLE_SIGNMAR= 
  else
    { echo "configure: error: Option, signmar, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, signmar, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_ENABLE_SIGNMAR"; then
  if test -z "$COMPILE_ENVIRONMENT" ; then
    echo "configure: warning: Cannot --enable-signmar with --disable-compile-environment" 1>&2
    MOZ_ENABLE_SIGNMAR=
  else
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_ENABLE_SIGNMAR ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ENABLE_SIGNMAR 1
EOF

  fi
fi


if test "$MOZ_IOS"; then
  MOZ_UPDATER=
fi

# Check whether --enable-updater or --disable-updater was given.
if test "${enable_updater+set}" = set; then
  enableval="$enable_updater"
  if test "$enableval" = "no"; then
    MOZ_UPDATER=
  elif test "$enableval" = "yes"; then
    MOZ_UPDATER=1 
  else
    { echo "configure: error: Option, updater, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, updater, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_UPDATER"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_UPDATER ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_UPDATER 1
EOF

fi

# Check whether --enable-parental-controls or --disable-parental-controls was given.
if test "${enable_parental_controls+set}" = set; then
  enableval="$enable_parental_controls"
  if test "$enableval" = "no"; then
    MOZ_DISABLE_PARENTAL_CONTROLS=1
  elif test "$enableval" = "yes"; then
    MOZ_DISABLE_PARENTAL_CONTROLS=
  else
    { echo "configure: error: Option, parental-controls, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, parental-controls, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test -n "$MOZ_DISABLE_PARENTAL_CONTROLS"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_DISABLE_PARENTAL_CONTROLS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_DISABLE_PARENTAL_CONTROLS 1
EOF

fi



if test -n "$MOZ_NO_SMART_CARDS"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_NO_SMART_CARDS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_NO_SMART_CARDS 1
EOF

fi


if test -n "$MOZ_NO_EV_CERTS"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_NO_EV_CERTS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_NO_EV_CERTS 1
EOF

fi


if test -n "$MOZ_TSAN"; then
    # Bug 1182565: TSan conflicts with sandboxing on Linux.
    case $OS_TARGET in
    Linux|Android)
        MOZ_SANDBOX=
        ;;
    esac
fi

# Check whether --enable-sandbox or --disable-sandbox was given.
if test "${enable_sandbox+set}" = set; then
  enableval="$enable_sandbox"
  if test "$enableval" = "no"; then
    MOZ_SANDBOX=
  elif test "$enableval" = "yes"; then
    MOZ_SANDBOX=1
  else
    { echo "configure: error: Option, sandbox, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, sandbox, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$gonkdir"; then
    MOZ_CONTENT_SANDBOX=$MOZ_SANDBOX
fi

case "$OS_TARGET:$NIGHTLY_BUILD" in
WINNT:1)
    MOZ_CONTENT_SANDBOX=$MOZ_SANDBOX
    ;;
Darwin:1)
    MOZ_CONTENT_SANDBOX=$MOZ_SANDBOX
    ;;
esac

# Check whether --enable-content-sandbox or --disable-content-sandbox was given.
if test "${enable_content_sandbox+set}" = set; then
  enableval="$enable_content_sandbox"
  if test "$enableval" = "yes"; then
    MOZ_CONTENT_SANDBOX=1
  elif test "$enableval" = "no"; then
    MOZ_CONTENT_SANDBOX=
  else
    { echo "configure: error: Option, content-sandbox, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, content-sandbox, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_CONTENT_SANDBOX" -a -z "$MOZ_SANDBOX"; then
    { echo "configure: error: --enable-content-sandbox and --disable-sandbox are conflicting options" 1>&2; echo "configure: error: --enable-content-sandbox and --disable-sandbox are conflicting options" 1>&5; exit 1; }
fi

if test -n "$MOZ_CONTENT_SANDBOX"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_CONTENT_SANDBOX ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_CONTENT_SANDBOX 1
EOF

fi



case $OS_TARGET in
WINNT)
    MOZ_GMP_SANDBOX=$MOZ_SANDBOX
    ;;
Linux)
    case $CPU_ARCH in
    x86_64|x86)
        MOZ_GMP_SANDBOX=$MOZ_SANDBOX
        ;;
    esac
    ;;
Darwin)
    MOZ_GMP_SANDBOX=$MOZ_SANDBOX
    ;;
esac

if test -n "$MOZ_GMP_SANDBOX"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_GMP_SANDBOX ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_GMP_SANDBOX 1
EOF

fi



if test -z "$MOZ_CONTENT_SANDBOX" -a -z "$MOZ_GMP_SANDBOX"; then
    MOZ_SANDBOX=
fi

if test -n "$MOZ_SANDBOX"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_SANDBOX ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_SANDBOX 1
EOF

fi




# Individual module options

# Check whether --enable-feeds or --disable-feeds was given.
if test "${enable_feeds+set}" = set; then
  enableval="$enable_feeds"
  if test "$enableval" = "no"; then
    MOZ_FEEDS=
  elif test "$enableval" = "yes"; then
    MOZ_FEEDS=1 
  else
    { echo "configure: error: Option, feeds, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, feeds, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test -n "$MOZ_FEEDS"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_FEEDS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_FEEDS 1
EOF

else
    if test "$MOZ_BUILD_APP" = "browser"; then
        { echo "configure: error: Cannot build Firefox with --disable-feeds." 1>&2; echo "configure: error: Cannot build Firefox with --disable-feeds." 1>&5; exit 1; }
    fi
fi


MOZ_SYSTEM_SQLITE=
# Check whether --enable-system-sqlite or --disable-system-sqlite was given.
if test "${enable_system_sqlite+set}" = set; then
  enableval="$enable_system_sqlite"
  if test "$enableval" = "yes"; then
    MOZ_SYSTEM_SQLITE=1
  elif test "$enableval" = "no"; then
    MOZ_SYSTEM_SQLITE= 
  else
    { echo "configure: error: Option, system-sqlite, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, system-sqlite, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_SYSTEM_SQLITE"
then
                    succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for sqlite3 >= $SQLITE_VERSION""... $ac_c" 1>&6
echo "configure:20305: checking for sqlite3 >= $SQLITE_VERSION" >&5

        if $PKG_CONFIG --exists "sqlite3 >= $SQLITE_VERSION" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking SQLITE_CFLAGS""... $ac_c" 1>&6
echo "configure:20312: checking SQLITE_CFLAGS" >&5
            SQLITE_CFLAGS=`$PKG_CONFIG --cflags "sqlite3 >= $SQLITE_VERSION"`
            echo "$ac_t""$SQLITE_CFLAGS" 1>&6

            echo $ac_n "checking SQLITE_LIBS""... $ac_c" 1>&6
echo "configure:20317: checking SQLITE_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            SQLITE_LIBS="`$PKG_CONFIG --libs \"sqlite3 >= $SQLITE_VERSION\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$SQLITE_LIBS" 1>&6
        else
            SQLITE_CFLAGS=""
            SQLITE_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            SQLITE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "sqlite3 >= $SQLITE_VERSION"`
            echo $SQLITE_PKG_ERRORS
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       { echo "configure: error: Library requirements (sqlite3 >= $SQLITE_VERSION) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (sqlite3 >= $SQLITE_VERSION) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; }
     fi
  fi


                        echo $ac_n "checking for SQLITE_SECURE_DELETE support in system SQLite""... $ac_c" 1>&6
echo "configure:20348: checking for SQLITE_SECURE_DELETE support in system SQLite" >&5
    _SAVE_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS $SQLITE_CFLAGS"
    _SAVE_LIBS="$LIBS"
    LIBS="$LIBS $SQLITE_LIBS"
    if eval "test \"`echo '$''{'ac_cv_sqlite_secure_delete'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
        if test "$cross_compiling" = yes; then
  ac_cv_sqlite_secure_delete=no
        
else
  cat > conftest.$ac_ext <<EOF
#line 20362 "configure"
#include "confdefs.h"

            #include "sqlite3.h"

            int main(int argc, char **argv){
              return !sqlite3_compileoption_used("SQLITE_SECURE_DELETE");
            }
EOF
if { (eval echo configure:20371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sqlite_secure_delete=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sqlite_secure_delete=no
fi
rm -fr conftest*
fi

    
fi

    echo "$ac_t""$ac_cv_sqlite_secure_delete" 1>&6
    CFLAGS="$_SAVE_CFLAGS"
    LIBS="$_SAVE_LIBS"
    if test "x$ac_cv_sqlite_secure_delete" = "xno"; then
        { echo "configure: error: System SQLite library is not compiled with SQLITE_SECURE_DELETE." 1>&2; echo "configure: error: System SQLite library is not compiled with SQLITE_SECURE_DELETE." 1>&5; exit 1; }
    fi

                        echo $ac_n "checking for SQLITE_THREADSAFE support in system SQLite""... $ac_c" 1>&6
echo "configure:20394: checking for SQLITE_THREADSAFE support in system SQLite" >&5
    _SAVE_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS $SQLITE_CFLAGS"
    _SAVE_LIBS="$LIBS"
    LIBS="$LIBS $SQLITE_LIBS"
    if eval "test \"`echo '$''{'ac_cv_sqlite_threadsafe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
        if test "$cross_compiling" = yes; then
  ac_cv_sqlite_threadsafe=no
        
else
  cat > conftest.$ac_ext <<EOF
#line 20408 "configure"
#include "confdefs.h"

            #include "sqlite3.h"

            int main(int argc, char **argv){
              return !sqlite3_compileoption_used("SQLITE_THREADSAFE=1");
            }
EOF
if { (eval echo configure:20417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sqlite_threadsafe=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sqlite_threadsafe=no
fi
rm -fr conftest*
fi

    
fi

    echo "$ac_t""$ac_cv_sqlite_threadsafe" 1>&6
    CFLAGS="$_SAVE_CFLAGS"
    LIBS="$_SAVE_LIBS"
    if test "x$ac_cv_sqlite_threadsafe" = "xno"; then
        { echo "configure: error: System SQLite library is not compiled with SQLITE_THREADSAFE." 1>&2; echo "configure: error: System SQLite library is not compiled with SQLITE_THREADSAFE." 1>&5; exit 1; }
    fi

                        echo $ac_n "checking for SQLITE_ENABLE_FTS3 support in system SQLite""... $ac_c" 1>&6
echo "configure:20440: checking for SQLITE_ENABLE_FTS3 support in system SQLite" >&5
    _SAVE_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS $SQLITE_CFLAGS"
    _SAVE_LIBS="$LIBS"
    LIBS="$LIBS $SQLITE_LIBS"
    if eval "test \"`echo '$''{'ac_cv_sqlite_enable_fts3'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
        if test "$cross_compiling" = yes; then
  ac_cv_sqlite_enable_fts3=no
        
else
  cat > conftest.$ac_ext <<EOF
#line 20454 "configure"
#include "confdefs.h"

            #include "sqlite3.h"

            int main(int argc, char **argv){
              return !sqlite3_compileoption_used("SQLITE_ENABLE_FTS3");
            }
EOF
if { (eval echo configure:20463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sqlite_enable_fts3=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sqlite_enable_fts3=no
fi
rm -fr conftest*
fi

    
fi

    echo "$ac_t""$ac_cv_sqlite_enable_fts3" 1>&6
    CFLAGS="$_SAVE_CFLAGS"
    LIBS="$_SAVE_LIBS"
    if test "x$ac_cv_sqlite_enable_fts3" = "xno"; then
        { echo "configure: error: System SQLite library is not compiled with SQLITE_ENABLE_FTS3." 1>&2; echo "configure: error: System SQLite library is not compiled with SQLITE_ENABLE_FTS3." 1>&5; exit 1; }
    fi

                        echo $ac_n "checking for SQLITE_ENABLE_UNLOCK_NOTIFY support in system SQLite""... $ac_c" 1>&6
echo "configure:20486: checking for SQLITE_ENABLE_UNLOCK_NOTIFY support in system SQLite" >&5
    _SAVE_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS $SQLITE_CFLAGS"
    _SAVE_LIBS="$LIBS"
    LIBS="$LIBS $SQLITE_LIBS"
    if eval "test \"`echo '$''{'ac_cv_sqlite_enable_unlock_notify'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
        if test "$cross_compiling" = yes; then
  ac_cv_sqlite_enable_unlock_notify=no
        
else
  cat > conftest.$ac_ext <<EOF
#line 20500 "configure"
#include "confdefs.h"

            #include "sqlite3.h"

            int main(int argc, char **argv){
              return !sqlite3_compileoption_used("SQLITE_ENABLE_UNLOCK_NOTIFY");
            }
EOF
if { (eval echo configure:20509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sqlite_enable_unlock_notify=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sqlite_enable_unlock_notify=no
fi
rm -fr conftest*
fi

    
fi

    echo "$ac_t""$ac_cv_sqlite_enable_unlock_notify" 1>&6
    CFLAGS="$_SAVE_CFLAGS"
    LIBS="$_SAVE_LIBS"
    if test "x$ac_cv_sqlite_enable_unlock_notify" = "xno"; then
        { echo "configure: error: System SQLite library is not compiled with SQLITE_ENABLE_UNLOCK_NOTIFY." 1>&2; echo "configure: error: System SQLite library is not compiled with SQLITE_ENABLE_UNLOCK_NOTIFY." 1>&5; exit 1; }
    fi

                        echo $ac_n "checking for SQLITE_ENABLE_DBSTAT_VTAB support in system SQLite""... $ac_c" 1>&6
echo "configure:20532: checking for SQLITE_ENABLE_DBSTAT_VTAB support in system SQLite" >&5
    _SAVE_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS $SQLITE_CFLAGS"
    _SAVE_LIBS="$LIBS"
    LIBS="$LIBS $SQLITE_LIBS"
    if eval "test \"`echo '$''{'ac_cv_sqlite_dbstat_vtab'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
        if test "$cross_compiling" = yes; then
  ac_cv_sqlite_dbstat_vtab=no
        
else
  cat > conftest.$ac_ext <<EOF
#line 20546 "configure"
#include "confdefs.h"

            #include "sqlite3.h"

            int main(int argc, char **argv){
              return !sqlite3_compileoption_used("SQLITE_ENABLE_DBSTAT_VTAB");
            }
EOF
if { (eval echo configure:20555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sqlite_dbstat_vtab=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sqlite_dbstat_vtab=no
fi
rm -fr conftest*
fi

    
fi

    echo "$ac_t""$ac_cv_sqlite_dbstat_vtab" 1>&6
    CFLAGS="$_SAVE_CFLAGS"
    LIBS="$_SAVE_LIBS"
    if test "x$ac_cv_sqlite_dbstat_vtab" = "xno"; then
        { echo "configure: error: System SQLite library is not compiled with SQLITE_ENABLE_DBSTAT_VTAB." 1>&2; echo "configure: error: System SQLite library is not compiled with SQLITE_ENABLE_DBSTAT_VTAB." 1>&5; exit 1; }
    fi
fi

if test -n "$MOZ_SYSTEM_SQLITE"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_SYSTEM_SQLITE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_SYSTEM_SQLITE 1
EOF

fi


if test -n "$MOZ_HELP_VIEWER"; then
          cat >> confdefs.pytmp <<\EOF
    (''' MOZ_HELP_VIEWER ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_HELP_VIEWER 1
EOF

fi

# Check whether --enable-safe-browsing or --disable-safe-browsing was given.
if test "${enable_safe_browsing+set}" = set; then
  enableval="$enable_safe_browsing"
  if test "$enableval" = "yes"; then
    MOZ_SAFE_BROWSING=1
  elif test "$enableval" = "no"; then
    MOZ_SAFE_BROWSING= 
  else
    { echo "configure: error: Option, safe-browsing, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, safe-browsing, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test -n "$MOZ_SAFE_BROWSING"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_SAFE_BROWSING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_SAFE_BROWSING 1
EOF

fi


if test -n "$MOZ_SAFE_BROWSING"; then
    MOZ_URL_CLASSIFIER=1
fi
# Check whether --enable-url-classifier or --disable-url-classifier was given.
if test "${enable_url_classifier+set}" = set; then
  enableval="$enable_url_classifier"
  if test "$enableval" = "yes"; then
    MOZ_URL_CLASSIFIER=1
  elif test "$enableval" = "no"; then
    MOZ_URL_CLASSIFIER= 
  else
    { echo "configure: error: Option, url-classifier, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, url-classifier, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test -n "$MOZ_URL_CLASSIFIER"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_URL_CLASSIFIER ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_URL_CLASSIFIER 1
EOF

fi


# Check whether --enable-zipwriter or --disable-zipwriter was given.
if test "${enable_zipwriter+set}" = set; then
  enableval="$enable_zipwriter"
  if test "$enableval" = "no"; then
    MOZ_ZIPWRITER=
  elif test "$enableval" = "yes"; then
    MOZ_ZIPWRITER=1 
  else
    { echo "configure: error: Option, zipwriter, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, zipwriter, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi



# Check whether --enable-faststripe or --disable-faststripe was given.
if test "${enable_faststripe+set}" = set; then
  enableval="$enable_faststripe"
  if test "$enableval" = "yes"; then
    MOZ_THEME_FASTSTRIPE=1
  elif test "$enableval" = "no"; then
    MOZ_THEME_FASTSTRIPE= 
  else
    { echo "configure: error: Option, faststripe, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, faststripe, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi




# Runtime debugging and Optimizations

# Check whether --enable-mobile-optimize or --disable-mobile-optimize was given.
if test "${enable_mobile_optimize+set}" = set; then
  enableval="$enable_mobile_optimize"
  if test "$enableval" = "yes"; then
    MOZ_GFX_OPTIMIZE_MOBILE=1
  elif test "$enableval" = "no"; then
    :
  else
    { echo "configure: error: Option, mobile-optimize, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, mobile-optimize, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi




if test "$MOZ_GFX_OPTIMIZE_MOBILE"; then
    # We ignore paint will resample on mobile for performance.
    # We may want to revisit this later.
    MOZ_IGNORE_PAINT_WILL_RESAMPLE=1

    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_GFX_OPTIMIZE_MOBILE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_GFX_OPTIMIZE_MOBILE 1
EOF

    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_IGNORE_PAINT_WILL_RESAMPLE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_IGNORE_PAINT_WILL_RESAMPLE 1
EOF

fi

if test -z "$MOZ_OPTIMIZE_FLAGS"; then
    MOZ_OPTIMIZE_FLAGS="-O"
fi

if test -z "$MOZ_OPTIMIZE_RUSTFLAGS"; then
    MOZ_OPTIMIZE_RUSTFLAGS="-O"
fi

# Check whether --enable-optimize or --disable-optimize was given.
if test "${enable_optimize+set}" = set; then
  enableval="$enable_optimize"
   if test "$enableval" != "no"; then
    MOZ_OPTIMIZE=1
    if test -n "$enableval" -a "$enableval" != "yes"; then
        MOZ_OPTIMIZE_FLAGS=`echo "$enableval" | sed -e 's|\\\ | |g'`
        MOZ_OPTIMIZE=2
    fi
else
    MOZ_OPTIMIZE=
fi 
else
  MOZ_OPTIMIZE=1
fi



  case "$target" in
  *android*)
    unwind_tables="-funwind-tables"
    ;;
  esac
  if test "$GNU_CC"; then
    MOZ_ENABLE_FRAME_PTR="-fno-omit-frame-pointer $unwind_tables"
    MOZ_DISABLE_FRAME_PTR="-fomit-frame-pointer"
    if test "$CPU_ARCH" = arm; then
      # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54398
      MOZ_ENABLE_FRAME_PTR="$unwind_tables"
    fi
  else
    case "$target" in
        *-mingw32*)
      MOZ_ENABLE_FRAME_PTR="-Oy-"
      MOZ_DISABLE_FRAME_PTR="-Oy"
    ;;
    esac
  fi

  # if we are debugging, profiling or using sanitizers, we want a frame pointer.
  if test -z "$MOZ_OPTIMIZE" -o \
          -n "$MOZ_PROFILING" -o \
          -n "$MOZ_DEBUG" -o \
          -n "$MOZ_MSAN" -o \
          -n "$MOZ_ASAN"; then
    MOZ_FRAMEPTR_FLAGS="$MOZ_ENABLE_FRAME_PTR"
  else
    MOZ_FRAMEPTR_FLAGS="$MOZ_DISABLE_FRAME_PTR"
  fi


if test "$COMPILE_ENVIRONMENT"; then
if test -n "$MOZ_OPTIMIZE"; then
    echo $ac_n "checking for valid C compiler optimization flags""... $ac_c" 1>&6
echo "configure:20777: checking for valid C compiler optimization flags" >&5
    _SAVE_CFLAGS=$CFLAGS
    CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS"
    cat > conftest.$ac_ext <<EOF
#line 20781 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
printf("Hello World\n");
; return 0; }
EOF
if { (eval echo configure:20788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  _results=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  _results=no
fi
rm -f conftest*
    echo "$ac_t""$_results" 1>&6
    if test "$_results" = "no"; then
        { echo "configure: error: These compiler flags for C are invalid: $MOZ_OPTIMIZE_FLAGS" 1>&2; echo "configure: error: These compiler flags for C are invalid: $MOZ_OPTIMIZE_FLAGS" 1>&5; exit 1; }
    fi
    CFLAGS=$_SAVE_CFLAGS
fi
fi # COMPILE_ENVIRONMENT











# On Windows, NS_StackWalk will only work correctly if we have frame pointers
# available. That will only be true for non-optimized builds, debug builds or
# builds with --enable-profiling in the .mozconfig (which is turned on in
# Nightly by default.)
case "$OS_TARGET" in
WINNT)
    if test -z "$MOZ_OPTIMIZE" -o -n "$MOZ_PROFILING" -o -n "$MOZ_DEBUG"; then
        MOZ_STACKWALKING=1
    else
        MOZ_STACKWALKING=
    fi
    ;;
*)
    MOZ_STACKWALKING=1
    ;;
esac

if test -n "$MOZ_STACKWALKING"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_STACKWALKING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_STACKWALKING 1
EOF

fi



if test -z "$MOZ_ENABLE_WARNINGS_AS_ERRORS"; then
   WARNINGS_AS_ERRORS=''
fi

cat >> confdefs.pytmp <<\EOF
    (''' MOZ_LOGGING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_LOGGING 1
EOF

cat >> confdefs.pytmp <<\EOF
    (''' FORCE_PR_LOG ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define FORCE_PR_LOG 1
EOF


_ENABLE_LOGREFCNT=42
# Check whether --enable-logrefcnt or --disable-logrefcnt was given.
if test "${enable_logrefcnt+set}" = set; then
  enableval="$enable_logrefcnt"
  if test "$enableval" = "yes"; then
    _ENABLE_LOGREFCNT=1
  elif test "$enableval" = "no"; then
    _ENABLE_LOGREFCNT= 
  else
    { echo "configure: error: Option, logrefcnt, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, logrefcnt, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test "$_ENABLE_LOGREFCNT" = "1"; then
    cat >> confdefs.pytmp <<\EOF
    (''' FORCE_BUILD_REFCNT_LOGGING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define FORCE_BUILD_REFCNT_LOGGING 1
EOF

elif test -z "$_ENABLE_LOGREFCNT"; then
    cat >> confdefs.pytmp <<\EOF
    (''' NO_BUILD_REFCNT_LOGGING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define NO_BUILD_REFCNT_LOGGING 1
EOF

fi

# Check whether --enable-approximate_location or --disable-approximate_location was given.
if test "${enable_approximate_location+set}" = set; then
  enableval="$enable_approximate_location"
  if test "$enableval" = "yes"; then
    MOZ_APPROX_LOCATION=1
  elif test "$enableval" = "no"; then
    MOZ_APPROX_LOCATION= 
  else
    { echo "configure: error: Option, approximate_location, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, approximate_location, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test -n "$MOZ_APPROX_LOCATION"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_APPROX_LOCATION ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_APPROX_LOCATION 1
EOF

fi

# Check whether --enable-gps_debug or --disable-gps_debug was given.
if test "${enable_gps_debug+set}" = set; then
  enableval="$enable_gps_debug"
  if test "$enableval" = "yes"; then
    MOZ_GPS_DEBUG=1
  elif test "$enableval" = "no"; then
    MOZ_GPS_DEBUG= 
  else
    { echo "configure: error: Option, gps_debug, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, gps_debug, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test -n "$MOZ_GPS_DEBUG"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_GPS_DEBUG ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_GPS_DEBUG 1
EOF

fi
if test -n "$MOZ_DEBUG"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_GPS_DEBUG ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_GPS_DEBUG 1
EOF

fi

# Check whether --enable-dump-painting or --disable-dump-painting was given.
if test "${enable_dump_painting+set}" = set; then
  enableval="$enable_dump_painting"
  if test "$enableval" = "yes"; then
    MOZ_DUMP_PAINTING=1
  elif test "$enableval" = "no"; then
    MOZ_DUMP_PAINTING= 
  else
    { echo "configure: error: Option, dump-painting, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, dump-painting, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test -n "$MOZ_DUMP_PAINTING"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_DUMP_PAINTING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_DUMP_PAINTING 1
EOF

    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_LAYERS_HAVE_LOG ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_LAYERS_HAVE_LOG 1
EOF

fi
if test -n "$MOZ_DEBUG"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_DUMP_PAINTING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_DUMP_PAINTING 1
EOF

fi

case "${OS_TARGET}" in
Android|WINNT|Darwin)
  MOZ_GLUE_IN_PROGRAM=
  ;;
*)
    MOZ_GLUE_IN_PROGRAM=1
  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_GLUE_IN_PROGRAM ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_GLUE_IN_PROGRAM 1
EOF

  ;;
esac

if test -n "$MOZ_REPLACE_MALLOC"; then
    MOZ_SYSTEM_JEMALLOC=

        if test -n "$MACOSX_DEPLOYMENT_TARGET"; then
        echo $ac_n "checking how to do weak dynamic linking""... $ac_c" 1>&6
echo "configure:21007: checking how to do weak dynamic linking" >&5
if eval "test \"`echo '$''{'ac_cv_weak_dynamic_linking'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'extern void foo() __attribute__((weak_import));int bar() { if (foo) foo(); return 0; }' > conftest.c
             if { ac_try='${CC-cc} -o conftest${DLL_SUFFIX} $CFLAGS -dynamiclib $LDFLAGS -Wl,-U,_foo conftest.c $LIBS 1>&5'; { (eval echo configure:21012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } &&
                test -s conftest${DLL_SUFFIX}; then
                                                                                     if "$OTOOL" -l conftest${DLL_SUFFIX} 2> /dev/null | grep "LC_DYLD_INFO_ONLY" > /dev/null; then
                     _CLASSIC_INFO=
                 else
                     _CLASSIC_INFO=1
                 fi
                 if "$OTOOL" -l conftest${DLL_SUFFIX} 2> /dev/null | grep "LC_DYLD_INFO" > /dev/null; then
                     _DYLD_INFO=1
                 else
                     _DYLD_INFO=
                 fi
                                                                                                                                                                                                            if test -n "$_DYLD_INFO" && dyldinfo -bind conftest${DLL_SUFFIX} 2> /dev/null | grep "_foo (weak import)" > /dev/null; then
                     if test -n "$_CLASSIC_INFO"; then
                         ac_cv_weak_dynamic_linking="flat namespace"
                     else
                         ac_cv_weak_dynamic_linking="compiler support"
                     fi
                 else
                     if test -n "$_DYLD_INFO"; then
                         ac_cv_weak_dynamic_linking="dummy library"
                     else
                         ac_cv_weak_dynamic_linking="flat namespace"
                     fi
                 fi
             else
                 { echo "configure: error: couldn't compile a simple C file" 1>&2; echo "configure: error: couldn't compile a simple C file" 1>&5; exit 1; }
             fi
             rm -rf conftest*
fi

echo "$ac_t""$ac_cv_weak_dynamic_linking" 1>&6
        MOZ_REPLACE_MALLOC_LINKAGE="$ac_cv_weak_dynamic_linking"
    fi
fi


if test -z "$MOZ_MEMORY"; then
  case "${target}" in
    *-mingw*)
      if test -z "$WIN32_REDIST_DIR" -a -z "$MOZ_DEBUG"; then
        echo "configure: warning: When not building jemalloc, you need to set WIN32_REDIST_DIR to the path to the Visual C++ Redist (usually VCINSTALLDIR\redist\x86\Microsoft.VC80.CRT, for VC++ v8) if you intend to distribute your build." 1>&2
      fi
      ;;
  esac
else
  if test -n "$MOZ_JEMALLOC4" -a -z "$MOZ_REPLACE_MALLOC"; then
    MOZ_SYSTEM_JEMALLOC=1
    for ac_func in mallctl nallocx
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:21063: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 21068 "configure"
#define $ac_func innocuous_$ac_func
#include "confdefs.h"
#undef $ac_func
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#define $ac_func innocuous_$ac_func
#include <assert.h>
#undef $ac_func
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:21095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_func ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
MOZ_SYSTEM_JEMALLOC=
       break
fi
done

    if test -n "$MOZ_SYSTEM_JEMALLOC"; then
      cat >> confdefs.pytmp <<\EOF
    (''' MOZ_SYSTEM_JEMALLOC ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_SYSTEM_JEMALLOC 1
EOF

    fi
  fi
  if test "x$MOZ_DEBUG" = "x1"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_MEMORY_DEBUG ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_MEMORY_DEBUG 1
EOF

  fi
        case "${target}" in
  *-mingw*)
    export MOZ_NO_DEBUG_RTL=1
    if test "$MSVS_VERSION" != "2015"; then
        WIN32_CRT_LIBS="msvcrt.lib msvcprt.lib"
                WIN32_CRTDLL_FULLPATH=`lib -nologo -list $WIN32_CRT_LIBS | grep crtdll\\.obj`
        lib -NOLOGO -OUT:crtdll.obj $WIN32_CRT_LIBS -EXTRACT:$WIN32_CRTDLL_FULLPATH
        if grep -q '__imp__\{0,1\}free' crtdll.obj; then
          MOZ_CRT=1
        fi
        rm crtdll.obj
    fi
    ;;
  esac
fi # MOZ_MEMORY


export MOZ_CRT



# Allow the application to provide a subconfigure script.
# This should be after 'export MOZ_NO_DEBUG_RTL=1' since
# ldap/c-sdk/configure refers to the enviroment value.
if test -f "${srcdir}/${MOZ_BUILD_APP}/configure.in" ; then
  do_output_subdirs() {
    if test -n "$_subconfigure_subdirs"; then
      { echo "configure: error: Cannot specify more than one sub-sub-configure" 1>&2; echo "configure: error: Cannot specify more than one sub-sub-configure" 1>&5; exit 1; }
     fi
    _subconfigure_subdir="$1"
    _subconfigure_config_args="$ac_configure_args"
  }
  tmpscript=`$PYTHON -c 'import os, tempfile; print tempfile.mktemp(prefix="subscript.").replace(os.sep, "/")'` || exit 1
  m4 "${srcdir}/build/autoconf/subconfigure.m4" \
     "${srcdir}/build/autoconf/altoptions.m4" \
     "${srcdir}/${MOZ_BUILD_APP}/configure.in" > $tmpscript
  . $tmpscript
  rm -f $tmpscript
fi

if test "$OS_TARGET" = Android; then
    if test "$MOZ_WIDGET_TOOLKIT" = gonk -a -n "$MOZ_NUWA_PROCESS"; then
        MOZ_GLUE_WRAP_LDFLAGS="${MOZ_GLUE_WRAP_LDFLAGS} -Wl,--wrap=pthread_create,--wrap=epoll_wait,--wrap=poll,--wrap=pthread_cond_timedwait,--wrap=pthread_cond_wait,--wrap=epoll_create,--wrap=epoll_ctl,--wrap=close,--wrap=pthread_key_create,--wrap=pthread_key_delete,--wrap=socketpair,--wrap=pthread_self,--wrap=pthread_mutex_lock,--wrap=pthread_mutex_trylock,--wrap=pthread_join,--wrap=pipe,--wrap=pipe2"
    fi
fi


export MOZ_GLUE_WRAP_LDFLAGS




# Check whether --enable-clang-plugin or --disable-clang-plugin was given.
if test "${enable_clang_plugin+set}" = set; then
  enableval="$enable_clang_plugin"
  if test "$enableval" = "yes"; then
    ENABLE_CLANG_PLUGIN=1
  elif test "$enableval" = "no"; then
    ENABLE_CLANG_PLUGIN= 
  else
    { echo "configure: error: Option, clang-plugin, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, clang-plugin, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test -n "$ENABLE_CLANG_PLUGIN"; then
    if test -z "${CLANG_CC}${CLANG_CL}"; then
        { echo "configure: error: Can't use clang plugin without clang." 1>&2; echo "configure: error: Can't use clang plugin without clang." 1>&5; exit 1; }
    fi

    echo $ac_n "checking for llvm-config""... $ac_c" 1>&6
echo "configure:21213: checking for llvm-config" >&5
    if test -z "$LLVMCONFIG"; then
      if test -n "$CLANG_CL"; then
          CXX_COMPILER="$(dirname "$CXX")/clang"
      else
          CXX_COMPILER="${CXX}"
      fi
      LLVMCONFIG=`$CXX_COMPILER -print-prog-name=llvm-config`
    fi

    if test -z "$LLVMCONFIG"; then
      LLVMCONFIG=`which llvm-config`
    fi

    if test ! -x "$LLVMCONFIG"; then
      echo "$ac_t""not found" 1>&6
      { echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&2; echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&5; exit 1; }
    fi

    echo "$ac_t""$LLVMCONFIG" 1>&6

    if test -z "$LLVMCONFIG"; then
        { echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&2; echo "configure: error: Cannot find an llvm-config binary for building a clang plugin" 1>&5; exit 1; }
    fi
    LLVM_CXXFLAGS=`$LLVMCONFIG --cxxflags`
                    LLVM_LDFLAGS=`$LLVMCONFIG --system-libs | tr '\n' ' '`
    LLVM_LDFLAGS="$LLVM_LDFLAGS `$LLVMCONFIG --ldflags --libs core mc analysis asmparser mcparser bitreader option profiledata | tr '\n' ' '`"

    if test "${HOST_OS_ARCH}" = "Darwin"; then
        CLANG_LDFLAGS="-lclangFrontend -lclangDriver -lclangSerialization"
        CLANG_LDFLAGS="$CLANG_LDFLAGS -lclangParse -lclangSema -lclangAnalysis"
        CLANG_LDFLAGS="$CLANG_LDFLAGS -lclangEdit -lclangAST -lclangLex"
        CLANG_LDFLAGS="$CLANG_LDFLAGS -lclangBasic -lclangASTMatchers"
    elif test "${HOST_OS_ARCH}" = "WINNT"; then
        CLANG_LDFLAGS="clangFrontend.lib clangDriver.lib clangSerialization.lib"
        CLANG_LDFLAGS="$CLANG_LDFLAGS clangParse.lib clangSema.lib clangAnalysis.lib"
        CLANG_LDFLAGS="$CLANG_LDFLAGS clangEdit.lib clangAST.lib clangLex.lib"
        CLANG_LDFLAGS="$CLANG_LDFLAGS clangBasic.lib clangASTMatchers.lib"
    else
        CLANG_LDFLAGS="-lclangASTMatchers"
    fi

    if test -n "$CLANG_CL"; then
                                        LLVM_REPLACE_CXXFLAGS=''
        for arg in $LLVM_CXXFLAGS; do
                                    arg=`echo "$arg"|sed -e 's/^\//-/' -e 's/\\\\/\//g'`
            LLVM_REPLACE_CXXFLAGS="$LLVM_REPLACE_CXXFLAGS $arg"
        done
        LLVM_CXXFLAGS="$LLVM_REPLACE_CXXFLAGS"

        LLVM_REPLACE_LDFLAGS=''
        for arg in $LLVM_LDFLAGS; do
                                    arg=`echo "$arg"|sed -e 's/^\//-/' -e 's/\\\\/\//g'`
            LLVM_REPLACE_LDFLAGS="$LLVM_REPLACE_LDFLAGS $arg"
        done
        LLVM_LDFLAGS="$LLVM_REPLACE_LDFLAGS"

        CLANG_REPLACE_LDFLAGS=''
        for arg in $CLANG_LDFLAGS; do
                                    arg=`echo "$arg"|sed -e 's/^\//-/' -e 's/\\\\/\//g'`
            CLANG_REPLACE_LDFLAGS="$CLANG_REPLACE_LDFLAGS $arg"
        done
        CLANG_LDFLAGS="$CLANG_REPLACE_LDFLAGS"
    fi

                echo $ac_n "checking for new ASTMatcher API""... $ac_c" 1>&6
echo "configure:21279: checking for new ASTMatcher API" >&5
if eval "test \"`echo '$''{'ac_cv_have_new_ASTMatcher_api'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
            
            ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

            _SAVE_CXXFLAGS="$CXXFLAGS"
            _SAVE_CXX="$CXX"
            CXXFLAGS="${LLVM_CXXFLAGS}"
            CXX="${HOST_CXX}"
            cat > conftest.$ac_ext <<EOF
#line 21297 "configure"
#include "confdefs.h"
#include "clang/ASTMatchers/ASTMatchers.h"
int main() {
clang::ast_matchers::cxxConstructExpr();
; return 0; }
EOF
if { (eval echo configure:21304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_have_new_ASTMatcher_names="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_have_new_ASTMatcher_names="no"
fi
rm -f conftest*
            CXX="$_SAVE_CXX"
            CXXFLAGS="$_SAVE_CXXFLAGS"
            ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

        
fi

echo "$ac_t""$ac_cv_have_new_ASTMatcher_api" 1>&6
    if test "$ac_cv_have_new_ASTMatcher_names" = "yes"; then
      LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DHAVE_NEW_ASTMATCHER_NAMES"
    fi

    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_CLANG_PLUGIN ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_CLANG_PLUGIN 1
EOF

fi









# Check whether --enable-strip or --disable-strip was given.
if test "${enable_strip+set}" = set; then
  enableval="$enable_strip"
  if test "$enableval" = "yes"; then
    ENABLE_STRIP=1
  elif test "$enableval" = "no"; then
    ENABLE_STRIP= 
  else
    { echo "configure: error: Option, strip, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, strip, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


# Check whether --enable-install-strip or --disable-install-strip was given.
if test "${enable_install_strip+set}" = set; then
  enableval="$enable_install_strip"
  if test "$enableval" = "yes"; then
    PKG_SKIP_STRIP= 
  elif test "$enableval" = "no"; then
    PKG_SKIP_STRIP=1
  else
    { echo "configure: error: Option, install-strip, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, install-strip, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi



USE_ELF_HACK=1
# Check whether --enable-elf-hack or --disable-elf-hack was given.
if test "${enable_elf_hack+set}" = set; then
  enableval="$enable_elf_hack"
  if test "$enableval" = "no"; then
    USE_ELF_HACK=
  elif test "$enableval" = "yes"; then
    USE_ELF_HACK=1
  else
    { echo "configure: error: Option, elf-hack, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, elf-hack, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


# Only enable elfhack where supported
if test "$USE_ELF_HACK" = 1; then
    case "${HOST_OS_ARCH},${OS_ARCH}" in
    Linux,Linux)
        case "${CPU_ARCH}" in
        arm | x86 | x86_64)
            USE_ELF_HACK=1
            ;;
        *)
            USE_ELF_HACK=
            ;;
        esac
        ;;
    *)
        USE_ELF_HACK=
        ;;
    esac
fi

if test -n "$COMPILE_ENVIRONMENT" -a -n "$USE_ELF_HACK"; then
                                        echo $ac_n "checking whether linker creates PT_GNU_RELRO segments""... $ac_c" 1>&6
echo "configure:21410: checking whether linker creates PT_GNU_RELRO segments" >&5
if eval "test \"`echo '$''{'LINK_WITH_PT_GNU_RELRO'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo "int main() {return 0;}" > conftest.${ac_ext}
         if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS conftest.${ac_ext} $LIBS 1>&2'; { (eval echo configure:21415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } &&
            test -s conftest${ac_exeext}; then
            if ${TOOLCHAIN_PREFIX}readelf -l conftest${ac_exeext} | grep GNU_RELRO > /dev/null; then
                LINK_WITH_PT_GNU_RELRO=yes
            else
                LINK_WITH_PT_GNU_RELRO=no
            fi
         else
                          { echo "configure: error: couldn't compile a simple C file" 1>&2; echo "configure: error: couldn't compile a simple C file" 1>&5; exit 1; }
         fi
         rm -rf conftest*
fi

echo "$ac_t""$LINK_WITH_PT_GNU_RELRO" 1>&6
    if test "$LINK_WITH_PT_GNU_RELRO" = yes; then
        if test "$USE_ELF_HACK" = F; then
            echo $ac_n "checking for -z norelro option to ld""... $ac_c" 1>&6
echo "configure:21432: checking for -z norelro option to ld" >&5
            _SAVE_LDFLAGS=$LDFLAGS
            LDFLAGS="$LDFLAGS -Wl,-z,norelro"
            cat > conftest.$ac_ext <<EOF
#line 21436 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:21443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
                        NSPR_LDFLAGS="$NSPR_LDFLAGS -Wl,-z,norelro"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  { echo "configure: error: --enable-elf-hack is not compatible with a linker creating a PT_GNU_RELRO segment and that doesn't support the "-z norelro" option." 1>&2; echo "configure: error: --enable-elf-hack is not compatible with a linker creating a PT_GNU_RELRO segment and that doesn't support the "-z norelro" option." 1>&5; exit 1; }
fi
rm -f conftest*
            USE_ELF_HACK=1
        else
            echo "configure: warning: Disabling elfhack" 1>&2
            USE_ELF_HACK=
        fi
    fi
fi # COMPILE_ENVIRONMENT and others.


STDCXX_COMPAT=
# Check whether --enable-stdcxx-compat or --disable-stdcxx-compat was given.
if test "${enable_stdcxx_compat+set}" = set; then
  enableval="$enable_stdcxx_compat"
  if test "$enableval" = "yes"; then
    STDCXX_COMPAT=1
  elif test "$enableval" = "no"; then
    :
  else
    { echo "configure: error: Option, stdcxx-compat, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, stdcxx-compat, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$STDCXX_COMPAT"; then
   eval $(CXX="$CXX" HOST_CXX="$HOST_CXX" $PYTHON -m mozbuild.configure.libstdcxx)
   
   
   CXXFLAGS="$CXXFLAGS -D_GLIBCXX_USE_CXX11_ABI=0"
   HOST_CXXFLAGS="$HOST_CXXFLAGS -D_GLIBCXX_USE_CXX11_ABI=0"
fi


# Check whether --enable-debug-js-modules or --disable-debug-js-modules was given.
if test "${enable_debug_js_modules+set}" = set; then
  enableval="$enable_debug_js_modules"
  if test "$enableval" = "yes"; then
    DEBUG_JS_MODULES=1
  elif test "$enableval" = "no"; then
    DEBUG_JS_MODULES=
  else
    { echo "configure: error: Option, debug-js-modules, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, debug-js-modules, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi




# Profiling and Instrumenting

# Check whether --enable-tasktracer or --disable-tasktracer was given.
if test "${enable_tasktracer+set}" = set; then
  enableval="$enable_tasktracer"
  if test "$enableval" = "yes"; then
    MOZ_TASK_TRACER=1
  elif test "$enableval" = "no"; then
    MOZ_TASK_TRACER= 
  else
    { echo "configure: error: Option, tasktracer, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, tasktracer, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test -n "$MOZ_TASK_TRACER"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_TASK_TRACER ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_TASK_TRACER 1
EOF

    
fi

# Check whether --enable-reflow-perf or --disable-reflow-perf was given.
if test "${enable_reflow_perf+set}" = set; then
  enableval="$enable_reflow_perf"
  if test "$enableval" = "yes"; then
    MOZ_REFLOW_PERF=1
  elif test "$enableval" = "no"; then
    MOZ_REFLOW_PERF= 
  else
    { echo "configure: error: Option, reflow-perf, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, reflow-perf, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test -n "$MOZ_REFLOW_PERF"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_REFLOW_PERF ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_REFLOW_PERF 1
EOF

fi

if test -n "$MOZ_HORIZON"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_HORIZON ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_HORIZON 1
EOF

fi



# Check whether --enable-startupcache or --disable-startupcache was given.
if test "${enable_startupcache+set}" = set; then
  enableval="$enable_startupcache"
  if test "$enableval" = "no"; then
    MOZ_DISABLE_STARTUPCACHE=1
  elif test "$enableval" = "yes"; then
    MOZ_DISABLE_STARTUPCACHE=
  else
    { echo "configure: error: Option, startupcache, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, startupcache, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_B2G"; then
  MOZ_DISABLE_STARTUPCACHE=1
fi
if test -n "$MOZ_DISABLE_STARTUPCACHE"; then
  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_DISABLE_STARTUPCACHE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_DISABLE_STARTUPCACHE 1
EOF

fi


if test x"$MOZ_WIDGET_TOOLKIT" != x"gonk"; then
    if test -n "$GAIADIR" -a ! -d "$GAIADIR" ; then
        { echo "configure: error: GAIADIR '$GAIADIR' isn't a valid directory" 1>&2; echo "configure: error: GAIADIR '$GAIADIR' isn't a valid directory" 1>&5; exit 1; }
    fi

    
    if test -n "$GAIADIR" ; then
        cat >> confdefs.pytmp <<\EOF
    (''' PACKAGE_GAIA ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define PACKAGE_GAIA 1
EOF

    fi

    if test -n "$FXOS_SIMULATOR" -a -z "$GAIADIR" ; then
        { echo "configure: error: FXOS_SIMULATOR=1 requires GAIADIR to be defined" 1>&2; echo "configure: error: FXOS_SIMULATOR=1 requires GAIADIR to be defined" 1>&5; exit 1; }
    fi

    if test -n "$FXOS_SIMULATOR" ; then
        cat >> confdefs.pytmp <<\EOF
    (''' FXOS_SIMULATOR ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define FXOS_SIMULATOR 1
EOF

        
    fi
fi

# Check whether --enable-b2g-ril or --disable-b2g-ril was given.
if test "${enable_b2g_ril+set}" = set; then
  enableval="$enable_b2g_ril"
  if test "$enableval" = "yes"; then
    MOZ_B2G_RIL=1
  elif test "$enableval" = "no"; then
    MOZ_B2G_RIL=
  else
    { echo "configure: error: Option, b2g-ril, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, b2g-ril, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
else
  MOZ_B2G_RIL=$_PLATFORM_HAVE_RIL 
fi

if test -n "$MOZ_B2G_RIL"; then
    if test -n "$_PLATFORM_HAVE_RIL"; then
        cat >> confdefs.pytmp <<\EOF
    (''' MOZ_B2G_RIL ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_B2G_RIL 1
EOF

    else
        { echo "configure: error: b2g-ril cannot be enabled because target platform doesn't support it." 1>&2; echo "configure: error: b2g-ril cannot be enabled because target platform doesn't support it." 1>&5; exit 1; }
    fi
fi


if test -n "$MOZ_B2G_FM"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_B2G_FM ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_B2G_FM 1
EOF

fi


# Check whether --enable-b2g-bt or --disable-b2g-bt was given.
if test "${enable_b2g_bt+set}" = set; then
  enableval="$enable_b2g_bt"
  if test "$enableval" = "yes"; then
    MOZ_B2G_BT=1
  elif test "$enableval" = "no"; then
    MOZ_B2G_BT= 
  else
    { echo "configure: error: Option, b2g-bt, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, b2g-bt, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test -n "$MOZ_B2G_BT"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_B2G_BT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_B2G_BT 1
EOF

fi




# Check whether --enable-nfc or --disable-nfc was given.
if test "${enable_nfc+set}" = set; then
  enableval="$enable_nfc"
  if test "$enableval" = "yes"; then
    MOZ_NFC=1
  elif test "$enableval" = "no"; then
    MOZ_NFC= 
  else
    { echo "configure: error: Option, nfc, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, nfc, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test -n "$MOZ_NFC"; then
   cat >> confdefs.pytmp <<\EOF
    (''' MOZ_NFC ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_NFC 1
EOF

fi


# Check whether --enable-synth-pico or --disable-synth-pico was given.
if test "${enable_synth_pico+set}" = set; then
  enableval="$enable_synth_pico"
  if test "$enableval" = "yes"; then
    MOZ_SYNTH_PICO=1
  elif test "$enableval" = "no"; then
    MOZ_SYNTH_PICO= 
  else
    { echo "configure: error: Option, synth-pico, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, synth-pico, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test -n "$MOZ_SYNTH_PICO"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_SYNTH_PICO ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_SYNTH_PICO 1
EOF

fi


if test -n "$MOZ_TIME_MANAGER"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_TIME_MANAGER ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_TIME_MANAGER 1
EOF

fi


# Check whether --enable-b2g-camera or --disable-b2g-camera was given.
if test "${enable_b2g_camera+set}" = set; then
  enableval="$enable_b2g_camera"
  if test "$enableval" = "yes"; then
    MOZ_B2G_CAMERA=1
  elif test "$enableval" = "no"; then
    MOZ_B2G_CAMERA= 
  else
    { echo "configure: error: Option, b2g-camera, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, b2g-camera, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test -n "$MOZ_B2G_CAMERA"; then
   cat >> confdefs.pytmp <<\EOF
    (''' MOZ_B2G_CAMERA ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_B2G_CAMERA 1
EOF

fi


if test -n "$MOZ_SIMPLEPUSH"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_SIMPLEPUSH ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_SIMPLEPUSH 1
EOF

fi


if test -n "$MOZ_PAY"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_PAY ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_PAY 1
EOF

fi


if test -n "$MOZ_ACTIVITIES"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_ACTIVITIES ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ACTIVITIES 1
EOF

fi


if test -n "$MOZ_AUDIO_CHANNEL_MANAGER"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_AUDIO_CHANNEL_MANAGER ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_AUDIO_CHANNEL_MANAGER 1
EOF

fi


   MOZ_SECUREELEMENT=1,
if test -n "$MOZ_SECUREELEMENT"; then
   cat >> confdefs.pytmp <<\EOF
    (''' MOZ_SECUREELEMENT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_SECUREELEMENT 1
EOF

fi
 

if test -z "$SKIP_LIBRARY_CHECKS"; then
    
    ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

    for ac_func in __cxa_demangle
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:21832: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 21837 "configure"
#define $ac_func innocuous_$ac_func
#include "confdefs.h"
#undef $ac_func
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#define $ac_func innocuous_$ac_func
#include <assert.h>
#undef $ac_func
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:21867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_func ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 HAVE_DEMANGLE=1
else
  echo "$ac_t""no" 1>&6
HAVE_DEMANGLE=
fi
done

    ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

fi

# Demangle only for debug or DMD builds
MOZ_DEMANGLE_SYMBOLS=
if test "$HAVE_DEMANGLE" && test "$MOZ_DEBUG" -o "$MOZ_DMD"; then
    MOZ_DEMANGLE_SYMBOLS=1
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_DEMANGLE_SYMBOLS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_DEMANGLE_SYMBOLS 1
EOF

fi


if test -z "$SKIP_LIBRARY_CHECKS"; then
    
    ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

       ac_safe=`echo "unwind.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for unwind.h""... $ac_c" 1>&6
echo "configure:21929: checking for unwind.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 21934 "configure"
#include "confdefs.h"

#include <unwind.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:21942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    for ac_func in _Unwind_Backtrace
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:21959: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 21964 "configure"
#define $ac_func innocuous_$ac_func
#include "confdefs.h"
#undef $ac_func
/* System header to define __stub macros and hopefully few prototypes
  else
    echo "$ac_t""no" 1>&6
    which can conflict with char $ac_func(); below.  */
#define $ac_func innocuous_$ac_func
#include <assert.h>
#undef $ac_func
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:21996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_func ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

  fi

    ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

fi


# Check whether --with-jitreport-granularity or --without-jitreport-granularity was given.
if test "${with_jitreport_granularity+set}" = set; then
  withval="$with_jitreport_granularity"
  JITREPORT_GRANULARITY=$withval
else
  JITREPORT_GRANULARITY=3
fi


cat >> confdefs.pytmp <<EOF
    (''' JS_DEFAULT_JITREPORT_GRANULARITY ''', r''' $JITREPORT_GRANULARITY ''')
EOF
cat >> confdefs.h <<EOF
#define JS_DEFAULT_JITREPORT_GRANULARITY $JITREPORT_GRANULARITY
EOF


# Check whether --enable-mozril-geoloc or --disable-mozril-geoloc was given.
if test "${enable_mozril_geoloc+set}" = set; then
  enableval="$enable_mozril_geoloc"
  if test "$enableval" = "no"; then
    DISABLE_MOZ_RIL_GEOLOC=1
  elif test "$enableval" = "yes"; then
    DISABLE_MOZ_RIL_GEOLOC= 
  else
    { echo "configure: error: Option, mozril-geoloc, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, mozril-geoloc, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test -n "$DISABLE_MOZ_RIL_GEOLOC"; then
   cat >> confdefs.pytmp <<\EOF
    (''' DISABLE_MOZ_RIL_GEOLOC ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define DISABLE_MOZ_RIL_GEOLOC 1
EOF

fi


# Check whether --with-servo or --without-servo was given.
if test "${with_servo+set}" = set; then
  withval="$with_servo"
  SERVO_TARGET_DIR=$withval
else
  SERVO_TARGET_DIR=
fi

if test -n "$SERVO_TARGET_DIR"; then
   MOZ_SERVO_LIBS="-L${SERVO_TARGET_DIR} -lgeckoservo"
   cat >> confdefs.pytmp <<\EOF
    (''' MOZ_STYLO ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_STYLO 1
EOF

   
fi

# Misc. Options

# Check whether --with-default-mozilla-five-home or --without-default-mozilla-five-home was given.
if test "${with_default_mozilla_five_home+set}" = set; then
  withval="$with_default_mozilla_five_home"
   val=`echo $withval`
  cat >> confdefs.pytmp <<EOF
    (''' MOZ_DEFAULT_MOZILLA_FIVE_HOME ''', r''' "$val" ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_DEFAULT_MOZILLA_FIVE_HOME "$val"
EOF
 
fi


# Check whether --with-user-appdir or --without-user-appdir was given.
if test "${with_user_appdir+set}" = set; then
  withval="$with_user_appdir"
   val=`echo $withval`
if echo "$val" | grep "\/" >/dev/null; then
    { echo "configure: error: "Homedir must be single relative path."" 1>&2; echo "configure: error: "Homedir must be single relative path."" 1>&5; exit 1; }
else
    MOZ_USER_DIR="$val"
fi
fi


cat >> confdefs.pytmp <<EOF
    (''' MOZ_USER_DIR ''', r''' "$MOZ_USER_DIR" ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_USER_DIR "$MOZ_USER_DIR"
EOF


MOZ_DOC_INPUT_DIRS='./dist/include ./dist/idl'
# Check whether --with-doc-input-dirs or --without-doc-input-dirs was given.
if test "${with_doc_input_dirs+set}" = set; then
  withval="$with_doc_input_dirs"
   MOZ_DOC_INPUT_DIRS=`echo "$withval" | sed "s/,/ /g"`  
fi



MOZ_DOC_INCLUDE_DIRS='./dist/include ./dist/include/nspr'
# Check whether --with-doc-include-dirs or --without-doc-include-dirs was given.
if test "${with_doc_include_dirs+set}" = set; then
  withval="$with_doc_include_dirs"
   MOZ_DOC_INCLUDE_DIRS=`echo "$withval" | sed "s/,/ /g"`  
fi



MOZ_DOC_OUTPUT_DIR='./dist/docs'
# Check whether --with-doc-output-dir or --without-doc-output-dir was given.
if test "${with_doc_output_dir+set}" = set; then
  withval="$with_doc_output_dir"
   MOZ_DOC_OUTPUT_DIR=$withval  
fi



if test -z "$SKIP_COMPILER_CHECKS"; then
# Compiler Options

echo $ac_n "checking for -pipe support""... $ac_c" 1>&6
echo "configure:22162: checking for -pipe support" >&5
if test -n "$GNU_CC" -a -n "$GNU_CXX"; then
        CFLAGS="$CFLAGS -pipe"
    CXXFLAGS="$CXXFLAGS -pipe"
    echo "$ac_t""yes" 1>&6
else
    echo "$ac_t""no" 1>&6
fi


_SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction"

echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6
echo "configure:22176: checking whether C compiler supports -fprofile-generate" >&5
cat > conftest.$ac_ext <<EOF
#line 22178 "configure"
#include "confdefs.h"

int main() {
return 0;
; return 0; }
EOF
if { (eval echo configure:22185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
   PROFILE_GEN_CFLAGS="-fprofile-generate"
                 result="yes" 
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  result="no"
fi
rm -f conftest*
echo "$ac_t""$result" 1>&6

if test $result = "yes"; then
  PROFILE_GEN_LDFLAGS="-fprofile-generate"
  PROFILE_USE_CFLAGS="-fprofile-use -fprofile-correction -Wcoverage-mismatch"
  PROFILE_USE_LDFLAGS="-fprofile-use"
fi

CFLAGS="$_SAVE_CFLAGS"






fi # ! SKIP_COMPILER_CHECKS

cat >> confdefs.pytmp <<\EOF
    (''' CPP_THROW_NEW ''', r''' throw() ''')
EOF
cat >> confdefs.h <<\EOF
#define CPP_THROW_NEW throw()
EOF

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross


if test "$COMPILE_ENVIRONMENT"; then


echo $ac_n "checking what kind of list files are supported by the linker""... $ac_c" 1>&6
echo "configure:22232: checking what kind of list files are supported by the linker" >&5
if eval "test \"`echo '$''{'EXPAND_LIBS_LIST_STYLE'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo "int main() {return 0;}" > conftest.${ac_ext}
     if { ac_try='${CC-cc} -o conftest.${OBJ_SUFFIX} -c $CFLAGS $CPPFLAGS conftest.${ac_ext} 1>&5'; { (eval echo configure:22237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.${OBJ_SUFFIX}; then
         echo "INPUT(conftest.${OBJ_SUFFIX})" > conftest.list
         if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS conftest.list $LIBS 1>&5'; { (eval echo configure:22239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then
             EXPAND_LIBS_LIST_STYLE=linkerscript
         else
             echo "conftest.${OBJ_SUFFIX}" > conftest.list
                                                                 if { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS -Wl,-filelist,conftest.list $LIBS 1>&5'; { (eval echo configure:22243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then
                 EXPAND_LIBS_LIST_STYLE=filelist
             elif { ac_try='${CC-cc} -o conftest${ac_exeext} $LDFLAGS @conftest.list $LIBS 1>&5'; { (eval echo configure:22245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest${ac_exeext}; then
                 EXPAND_LIBS_LIST_STYLE=list
             else
                 EXPAND_LIBS_LIST_STYLE=none
             fi
         fi
     else
                  { echo "configure: error: couldn't compile a simple C file" 1>&2; echo "configure: error: couldn't compile a simple C file" 1>&5; exit 1; }
     fi
     rm -rf conftest*
fi

echo "$ac_t""$EXPAND_LIBS_LIST_STYLE" 1>&6

LIBS_DESC_SUFFIX=desc



if test "$GCC_USE_GNU_LD"; then
    echo $ac_n "checking what kind of ordering can be done with the linker""... $ac_c" 1>&6
echo "configure:22265: checking what kind of ordering can be done with the linker" >&5
if eval "test \"`echo '$''{'EXPAND_LIBS_ORDER_STYLE'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  > conftest.order
         _SAVE_LDFLAGS="$LDFLAGS"
         LDFLAGS="${LDFLAGS} -Wl,--section-ordering-file,conftest.order"
         cat > conftest.$ac_ext <<EOF
#line 22273 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:22280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  EXPAND_LIBS_ORDER_STYLE=section-ordering-file
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  EXPAND_LIBS_ORDER_STYLE=
fi
rm -f conftest*
         LDFLAGS="$_SAVE_LDFLAGS"
         if test -z "$EXPAND_LIBS_ORDER_STYLE"; then
             if { ac_try='${CC-cc} ${DSO_LDOPTS} ${LDFLAGS} -o ${DLL_PREFIX}conftest${DLL_SUFFIX} -Wl'; { (eval echo configure:22292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
                 EXPAND_LIBS_ORDER_STYLE=linkerscript
             else
                 EXPAND_LIBS_ORDER_STYLE=none
             fi
             rm -f ${DLL_PREFIX}conftest${DLL_SUFFIX}
         fi
fi

echo "$ac_t""$EXPAND_LIBS_ORDER_STYLE" 1>&6
fi



fi # COMPILE_ENVIRONMENT

# Build dependencies

if test "$GNU_CC" -a "$GNU_CXX"; then
  _DEPEND_CFLAGS='-MD -MP -MF $(MDDEPDIR)/$(@F).pp'
else
    if test -z "$_WIN32_MSVC"; then
    _USE_CPP_INCLUDE_FLAG=
    _DEFINES_CFLAGS='$(ACDEFINES) -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT'
    _DEFINES_CXXFLAGS='$(ACDEFINES) -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT'
  else
    echo '#include <stdio.h>' > dummy-hello.c
    
        _CL_PREFIX_REGEX="^\([^:]*:.*[ :] \)\(.*\\\stdio.h\)$"
    CL_INCLUDES_PREFIX=`${CC} -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/'"$_CL_PREFIX_REGEX"'/\1/p'`
    _CL_STDIO_PATH=`${CC} -showIncludes -c -Fonul dummy-hello.c 2>&1 | sed -ne 's/'"$_CL_PREFIX_REGEX"'/\2/p'`
    
    if ! test -e "$_CL_STDIO_PATH"; then
        { echo "configure: error: Unable to parse cl -showIncludes prefix. This compiler's locale has an unsupported formatting." 1>&2; echo "configure: error: Unable to parse cl -showIncludes prefix. This compiler's locale has an unsupported formatting." 1>&5; exit 1; }
    fi
    if test -z "$CL_INCLUDES_PREFIX"; then
        { echo "configure: error: Cannot find cl -showIncludes prefix." 1>&2; echo "configure: error: Cannot find cl -showIncludes prefix." 1>&5; exit 1; }
    fi
    
    rm -f dummy-hello.c

                NONASCII=$'\241\241'
    
  fi
fi

# Static build options

if test -z "$MOZ_SYSTEM_ZLIB"; then
if test -n "$JS_SHARED_LIBRARY"; then
  ZLIB_IN_MOZGLUE=1
  cat >> confdefs.pytmp <<\EOF
    (''' ZLIB_IN_MOZGLUE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define ZLIB_IN_MOZGLUE 1
EOF

fi
fi



# Standalone module options (Not for building Mozilla)


if test -z "$SKIP_PATH_CHECKS"; then
if test -z "${GLIB_CFLAGS}" -o -z "${GLIB_LIBS}" ; then
    if test "$MOZ_ENABLE_GTK" ; then
        succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for glib-2.0 >= 1.3.7 gobject-2.0""... $ac_c" 1>&6
echo "configure:22372: checking for glib-2.0 >= 1.3.7 gobject-2.0" >&5

        if $PKG_CONFIG --exists "glib-2.0 >= 1.3.7 gobject-2.0" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking GLIB_CFLAGS""... $ac_c" 1>&6
echo "configure:22379: checking GLIB_CFLAGS" >&5
            GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 1.3.7 gobject-2.0"`
            echo "$ac_t""$GLIB_CFLAGS" 1>&6

            echo $ac_n "checking GLIB_LIBS""... $ac_c" 1>&6
echo "configure:22384: checking GLIB_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            GLIB_LIBS="`$PKG_CONFIG --libs \"glib-2.0 >= 1.3.7 gobject-2.0\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$GLIB_LIBS" 1>&6
        else
            GLIB_CFLAGS=""
            GLIB_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= 1.3.7 gobject-2.0"`
            echo $GLIB_PKG_ERRORS
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       { echo "configure: error: Library requirements (glib-2.0 >= 1.3.7 gobject-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (glib-2.0 >= 1.3.7 gobject-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; }
     fi
  fi

    fi
fi
fi

if test -z "${GLIB_GMODULE_LIBS}" \
   -a -n "${GLIB_CONFIG}"\
    -a "${GLIB_CONFIG}" != no\
; then
    GLIB_GMODULE_LIBS=`$GLIB_CONFIG gmodule --libs`
fi




if test "${OS_TARGET}" = "WINNT" -o \
        "${OS_ARCH}" = "Darwin" -o \
        "${MOZ_WIDGET_TOOLKIT}" = "android" -o \
        "${MOZ_WIDGET_TOOLKIT}" = "gonk" -o \
        "${MOZ_WIDGET_TOOLKIT}" = "gtk2" -o \
        "${MOZ_WIDGET_TOOLKIT}" = "gtk3"; then
    case "${CPU_ARCH}" in
    x86|x86_64|arm)
        MOZ_ENABLE_SKIA=1
        ;;
    *)
        MOZ_ENABLE_SKIA=
        ;;
    esac
else
MOZ_ENABLE_SKIA=
fi

# Check whether --enable-skia or --disable-skia was given.
if test "${enable_skia+set}" = set; then
  enableval="$enable_skia"
  if test "$enableval" = "yes"; then
    MOZ_ENABLE_SKIA=1
  elif test "$enableval" = "no"; then
    MOZ_ENABLE_SKIA=
  else
    { echo "configure: error: Option, skia, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, skia, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test "${OS_TARGET}" = "OpenBSD" -o \
        "${OS_TARGET}" = "NetBSD"; then \
    MOZ_DISABLE_SKIA_GPU=1
else
    MOZ_DISABLE_SKIA_GPU=
fi

# Check whether --enable-skia-gpu or --disable-skia-gpu was given.
if test "${enable_skia_gpu+set}" = set; then
  enableval="$enable_skia_gpu"
  if test "$enableval" = "no"; then
    MOZ_DISABLE_SKIA_GPU=1
  elif test "$enableval" = "yes"; then
    MOZ_DISABLE_SKIA_GPU=
  else
    { echo "configure: error: Option, skia-gpu, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, skia-gpu, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test "$USE_FC_FREETYPE"; then
    if test "$COMPILE_ENVIRONMENT"; then
                                succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for freetype2 >= 6.1.0""... $ac_c" 1>&6
echo "configure:22491: checking for freetype2 >= 6.1.0" >&5

        if $PKG_CONFIG --exists "freetype2 >= 6.1.0" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking FT2_CFLAGS""... $ac_c" 1>&6
echo "configure:22498: checking FT2_CFLAGS" >&5
            FT2_CFLAGS=`$PKG_CONFIG --cflags "freetype2 >= 6.1.0"`
            echo "$ac_t""$FT2_CFLAGS" 1>&6

            echo $ac_n "checking FT2_LIBS""... $ac_c" 1>&6
echo "configure:22503: checking FT2_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            FT2_LIBS="`$PKG_CONFIG --libs \"freetype2 >= 6.1.0\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$FT2_LIBS" 1>&6
        else
            FT2_CFLAGS=""
            FT2_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            FT2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2 >= 6.1.0"`
            
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     _HAVE_FREETYPE2=1
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       _HAVE_FREETYPE2=
     fi
  fi


        if test "$_HAVE_FREETYPE2"; then
            _SAVE_LIBS="$LIBS"
            _SAVE_CFLAGS="$CFLAGS"
            LIBS="$LIBS $FT2_LIBS"
            CFLAGS="$CFLAGS $FT2_CFLAGS"

            echo $ac_n "checking for FT_Bitmap_Size.y_ppem""... $ac_c" 1>&6
echo "configure:22540: checking for FT_Bitmap_Size.y_ppem" >&5
if eval "test \"`echo '$''{'ac_cv_member_FT_Bitmap_Size_y_ppem'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 22545 "configure"
#include "confdefs.h"
#include <ft2build.h>
                                 #include FT_FREETYPE_H
int main() {
FT_Bitmap_Size s;
                                 if (sizeof s.y_ppem) return 0;
                                 return 1
; return 0; }
EOF
if { (eval echo configure:22555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_member_FT_Bitmap_Size_y_ppem=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_member_FT_Bitmap_Size_y_ppem=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_member_FT_Bitmap_Size_y_ppem" 1>&6
            if test "$ac_cv_member_FT_Bitmap_Size_y_ppem" = yes; then
                HAVE_FT_BITMAP_SIZE_Y_PPEM=1
            else
                HAVE_FT_BITMAP_SIZE_Y_PPEM=0
            fi
            cat >> confdefs.pytmp <<EOF
    (''' HAVE_FT_BITMAP_SIZE_Y_PPEM ''', r''' $HAVE_FT_BITMAP_SIZE_Y_PPEM ''')
EOF
cat >> confdefs.h <<EOF
#define HAVE_FT_BITMAP_SIZE_Y_PPEM $HAVE_FT_BITMAP_SIZE_Y_PPEM
EOF


            for ac_func in FT_GlyphSlot_Embolden FT_Load_Sfnt_Table
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:22584: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 22589 "configure"
#define $ac_func innocuous_$ac_func
#include "confdefs.h"
#undef $ac_func
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#define $ac_func innocuous_$ac_func
#include <assert.h>
#undef $ac_func
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:22616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_func ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


            LIBS="$_SAVE_LIBS"
            CFLAGS="$_SAVE_CFLAGS"
        fi

        _SAVE_CPPFLAGS="$CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $FT2_CFLAGS $XCFLAGS"
         for ac_hdr in fontconfig/fcfreetype.h
  do
       ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:22654: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 22659 "configure"
#include "confdefs.h"
#include <fontconfig/fontconfig.h>
#include <$ac_hdr>
int main() {

; return 0; }
EOF
if { (eval echo configure:22667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
                       cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
  else
    echo "$ac_t""no" 1>&6
    { echo "configure: error: Can't find header fontconfig/fcfreetype.h." 1>&2; echo "configure: error: Can't find header fontconfig/fcfreetype.h." 1>&5; exit 1; }
  fi

  done

        CPPFLAGS="$_SAVE_CPPFLAGS"
    else
        cat >> confdefs.pytmp <<\EOF
    (''' HAVE_FONTCONFIG_FCFREETYPE_H ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_FONTCONFIG_FCFREETYPE_H 1
EOF

    fi

    succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for fontconfig >= $FONTCONFIG_VERSION""... $ac_c" 1>&6
echo "configure:22718: checking for fontconfig >= $FONTCONFIG_VERSION" >&5

        if $PKG_CONFIG --exists "fontconfig >= $FONTCONFIG_VERSION" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking _FONTCONFIG_CFLAGS""... $ac_c" 1>&6
echo "configure:22725: checking _FONTCONFIG_CFLAGS" >&5
            _FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= $FONTCONFIG_VERSION"`
            echo "$ac_t""$_FONTCONFIG_CFLAGS" 1>&6

            echo $ac_n "checking _FONTCONFIG_LIBS""... $ac_c" 1>&6
echo "configure:22730: checking _FONTCONFIG_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            _FONTCONFIG_LIBS="`$PKG_CONFIG --libs \"fontconfig >= $FONTCONFIG_VERSION\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$_FONTCONFIG_LIBS" 1>&6
        else
            _FONTCONFIG_CFLAGS=""
            _FONTCONFIG_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            _FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= $FONTCONFIG_VERSION"`
            echo $_FONTCONFIG_PKG_ERRORS
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     
        if test "$MOZ_PANGO"; then
            MOZ_PANGO_CFLAGS="$MOZ_PANGO_CFLAGS $_FONTCONFIG_CFLAGS"
            MOZ_PANGO_LIBS="$MOZ_PANGO_LIBS $_FONTCONFIG_LIBS"
        else
            FT2_CFLAGS="$FT2_CFLAGS $_FONTCONFIG_CFLAGS"
            FT2_LIBS="$FT2_LIBS $_FONTCONFIG_LIBS"
        fi
    
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       { echo "configure: error: Library requirements (fontconfig >= $FONTCONFIG_VERSION) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (fontconfig >= $FONTCONFIG_VERSION) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; }
     fi
  fi

fi


MOZ_TREE_CAIRO=1
# Check whether --enable-system-cairo or --disable-system-cairo was given.
if test "${enable_system_cairo+set}" = set; then
  enableval="$enable_system_cairo"
  if test "$enableval" = "yes"; then
    MOZ_TREE_CAIRO=
  elif test "$enableval" = "no"; then
    MOZ_TREE_CAIRO=1 
  else
    { echo "configure: error: Option, system-cairo, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, system-cairo, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


MOZ_TREE_PIXMAN=1
# Check whether --enable-system-pixman or --disable-system-pixman was given.
if test "${enable_system_pixman+set}" = set; then
  enableval="$enable_system_pixman"
  if test "$enableval" = "yes"; then
    MOZ_TREE_PIXMAN=
  elif test "$enableval" = "no"; then
    MOZ_TREE_PIXMAN=force
  else
    { echo "configure: error: Option, system-pixman, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, system-pixman, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
else
  MOZ_TREE_PIXMAN=1 
fi


# System cairo depends on system pixman
if test "$MOZ_TREE_PIXMAN" = "force"; then
    if test -z "$MOZ_TREE_CAIRO"; then
        { echo "configure: error: --disable-system-pixman is incompatible with --enable-system-cairo." 1>&2; echo "configure: error: --disable-system-pixman is incompatible with --enable-system-cairo." 1>&5; exit 1; }
    else
        MOZ_TREE_PIXMAN=1
    fi
elif test -z "$MOZ_TREE_CAIRO"; then
    MOZ_TREE_PIXMAN=
fi

if test "$MOZ_TREE_PIXMAN"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_TREE_PIXMAN ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_TREE_PIXMAN 1
EOF

else
    succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for pixman-1 >= 0.19.2""... $ac_c" 1>&6
echo "configure:22831: checking for pixman-1 >= 0.19.2" >&5

        if $PKG_CONFIG --exists "pixman-1 >= 0.19.2" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_PIXMAN_CFLAGS""... $ac_c" 1>&6
echo "configure:22838: checking MOZ_PIXMAN_CFLAGS" >&5
            MOZ_PIXMAN_CFLAGS=`$PKG_CONFIG --cflags "pixman-1 >= 0.19.2"`
            echo "$ac_t""$MOZ_PIXMAN_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_PIXMAN_LIBS""... $ac_c" 1>&6
echo "configure:22843: checking MOZ_PIXMAN_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            MOZ_PIXMAN_LIBS="`$PKG_CONFIG --libs \"pixman-1 >= 0.19.2\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$MOZ_PIXMAN_LIBS" 1>&6
        else
            MOZ_PIXMAN_CFLAGS=""
            MOZ_PIXMAN_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            MOZ_PIXMAN_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pixman-1 >= 0.19.2"`
            echo $MOZ_PIXMAN_PKG_ERRORS
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       { echo "configure: error: Library requirements (pixman-1 >= 0.19.2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (pixman-1 >= 0.19.2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; }
     fi
  fi

fi

# Check for headers defining standard int types.
if test -n "$COMPILE_ENVIRONMENT"; then
     for ac_hdr in stdint.h inttypes.h
  do
       ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:22880: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 22885 "configure"
#include "confdefs.h"

#include <$ac_hdr>
int main() {

; return 0; }
EOF
if { (eval echo configure:22893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
                       cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_hdr ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
  else
    echo "$ac_t""no" 1>&6
    
  fi

  done


    if test "${ac_cv_header_inttypes_h}" = "yes"; then
        HAVE_INTTYPES_H=1
    fi
fi



if test "$MOZ_TREE_CAIRO"; then
    MOZ_CAIRO_CFLAGS="-I${DIST}/include/cairo"
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_TREE_CAIRO ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_TREE_CAIRO 1
EOF


    if test "$OS_ARCH" = "WINNT"; then
        # For now we assume that we will have a uint64_t available through
        # one of the above headers or mozstdint.h.
        cat >> confdefs.pytmp <<\EOF
    (''' HAVE_UINT64_T ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define HAVE_UINT64_T 1
EOF

    fi

    # Define macros for cairo-features.h
    TEE_SURFACE_FEATURE="#define CAIRO_HAS_TEE_SURFACE 1"
    if test "$MOZ_X11"; then
        XLIB_SURFACE_FEATURE="#define CAIRO_HAS_XLIB_SURFACE 1"
        XLIB_XRENDER_SURFACE_FEATURE="#define CAIRO_HAS_XLIB_XRENDER_SURFACE 1"
        PS_SURFACE_FEATURE="#define CAIRO_HAS_PS_SURFACE 1"
    fi
    if test "$_HAVE_FREETYPE2"; then
        FT_FONT_FEATURE="#define CAIRO_HAS_FT_FONT 1"
        MOZ_ENABLE_CAIRO_FT=1
        CAIRO_FT_CFLAGS="$FT2_CFLAGS"
    fi

    case "$MOZ_WIDGET_TOOLKIT" in
      qt)
        QT_SURFACE_FEATURE="#define CAIRO_HAS_QT_SURFACE 1"
        ;;
      cocoa | uikit)
        QUARTZ_SURFACE_FEATURE="#define CAIRO_HAS_QUARTZ_SURFACE 1"
        QUARTZ_IMAGE_SURFACE_FEATURE="#define CAIRO_HAS_QUARTZ_IMAGE_SURFACE 1"
        QUARTZ_FONT_FEATURE="#define CAIRO_HAS_QUARTZ_FONT 1"
        ;;
      windows)
        WIN32_D2D_SURFACE_FEATURE="#define CAIRO_HAS_D2D_SURFACE 1"
        WIN32_DWRITE_FONT_FEATURE="#define CAIRO_HAS_DWRITE_FONT 1"
        WIN32_FONT_FEATURE="#define CAIRO_HAS_WIN32_FONT 1"
        WIN32_SURFACE_FEATURE="#define CAIRO_HAS_WIN32_SURFACE 1"
        MOZ_ENABLE_D2D_SURFACE=1
        MOZ_ENABLE_DWRITE_FONT=1

        if test "$COMPILE_ENVIRONMENT"; then

             ac_safe=`echo "d3d9.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for d3d9.h""... $ac_c" 1>&6
echo "configure:22986: checking for d3d9.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 22991 "configure"
#include "confdefs.h"

#include <d3d9.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:22999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    MOZ_ENABLE_D3D9_LAYER=1
  else
    echo "$ac_t""no" 1>&6
    
  fi


                    if test -n "$WIN32_D2D_SURFACE_FEATURE"; then
               ac_safe=`echo "d3d10.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for d3d10.h""... $ac_c" 1>&6
echo "configure:23023: checking for d3d10.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
   cat > conftest.$ac_ext <<EOF
#line 23028 "configure"
#include "confdefs.h"

#include <d3d10.h>
int main() {

; return 0; }
EOF
if { (eval echo configure:23036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest* 
fi

  if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    echo "$ac_t""yes" 1>&6
    MOZ_ENABLE_D3D10_LAYER=1
  else
    echo "$ac_t""no" 1>&6
    
  fi

          fi
        fi
        ;;
    esac
    if test "$USE_FC_FREETYPE"; then
        FC_FONT_FEATURE="#define CAIRO_HAS_FC_FONT 1"
    fi
    
    
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    MOZ_CAIRO_OSLIBS='${CAIRO_FT_OSLIBS}'

    if test "$MOZ_X11"; then
        MOZ_CAIRO_OSLIBS="$MOZ_CAIRO_OSLIBS $XLDFLAGS -lXrender"
    fi

    CAIRO_FEATURES_H=gfx/cairo/cairo/src/cairo-features.h
else
    succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for cairo >= $CAIRO_VERSION""... $ac_c" 1>&6
echo "configure:23107: checking for cairo >= $CAIRO_VERSION" >&5

        if $PKG_CONFIG --exists "cairo >= $CAIRO_VERSION" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking CAIRO_CFLAGS""... $ac_c" 1>&6
echo "configure:23114: checking CAIRO_CFLAGS" >&5
            CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= $CAIRO_VERSION"`
            echo "$ac_t""$CAIRO_CFLAGS" 1>&6

            echo $ac_n "checking CAIRO_LIBS""... $ac_c" 1>&6
echo "configure:23119: checking CAIRO_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            CAIRO_LIBS="`$PKG_CONFIG --libs \"cairo >= $CAIRO_VERSION\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$CAIRO_LIBS" 1>&6
        else
            CAIRO_CFLAGS=""
            CAIRO_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            CAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo >= $CAIRO_VERSION"`
            echo $CAIRO_PKG_ERRORS
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       { echo "configure: error: Library requirements (cairo >= $CAIRO_VERSION) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (cairo >= $CAIRO_VERSION) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; }
     fi
  fi

    MOZ_CAIRO_CFLAGS="$CAIRO_CFLAGS"
    MOZ_CAIRO_LIBS="$CAIRO_LIBS"
    succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for cairo-tee >= $CAIRO_VERSION""... $ac_c" 1>&6
echo "configure:23161: checking for cairo-tee >= $CAIRO_VERSION" >&5

        if $PKG_CONFIG --exists "cairo-tee >= $CAIRO_VERSION" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking CAIRO_TEE_CFLAGS""... $ac_c" 1>&6
echo "configure:23168: checking CAIRO_TEE_CFLAGS" >&5
            CAIRO_TEE_CFLAGS=`$PKG_CONFIG --cflags "cairo-tee >= $CAIRO_VERSION"`
            echo "$ac_t""$CAIRO_TEE_CFLAGS" 1>&6

            echo $ac_n "checking CAIRO_TEE_LIBS""... $ac_c" 1>&6
echo "configure:23173: checking CAIRO_TEE_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            CAIRO_TEE_LIBS="`$PKG_CONFIG --libs \"cairo-tee >= $CAIRO_VERSION\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$CAIRO_TEE_LIBS" 1>&6
        else
            CAIRO_TEE_CFLAGS=""
            CAIRO_TEE_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            CAIRO_TEE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo-tee >= $CAIRO_VERSION"`
            echo $CAIRO_TEE_PKG_ERRORS
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       { echo "configure: error: Library requirements (cairo-tee >= $CAIRO_VERSION) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (cairo-tee >= $CAIRO_VERSION) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; }
     fi
  fi

    if test "$MOZ_X11"; then
        succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for cairo-xlib-xrender >= $CAIRO_VERSION""... $ac_c" 1>&6
echo "configure:23214: checking for cairo-xlib-xrender >= $CAIRO_VERSION" >&5

        if $PKG_CONFIG --exists "cairo-xlib-xrender >= $CAIRO_VERSION" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking CAIRO_XRENDER_CFLAGS""... $ac_c" 1>&6
echo "configure:23221: checking CAIRO_XRENDER_CFLAGS" >&5
            CAIRO_XRENDER_CFLAGS=`$PKG_CONFIG --cflags "cairo-xlib-xrender >= $CAIRO_VERSION"`
            echo "$ac_t""$CAIRO_XRENDER_CFLAGS" 1>&6

            echo $ac_n "checking CAIRO_XRENDER_LIBS""... $ac_c" 1>&6
echo "configure:23226: checking CAIRO_XRENDER_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            CAIRO_XRENDER_LIBS="`$PKG_CONFIG --libs \"cairo-xlib-xrender >= $CAIRO_VERSION\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$CAIRO_XRENDER_LIBS" 1>&6
        else
            CAIRO_XRENDER_CFLAGS=""
            CAIRO_XRENDER_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            CAIRO_XRENDER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo-xlib-xrender >= $CAIRO_VERSION"`
            echo $CAIRO_XRENDER_PKG_ERRORS
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       { echo "configure: error: Library requirements (cairo-xlib-xrender >= $CAIRO_VERSION) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (cairo-xlib-xrender >= $CAIRO_VERSION) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; }
     fi
  fi

        MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS $XLDFLAGS $CAIRO_XRENDER_LIBS"
        MOZ_CAIRO_OSLIBS="$MOZ_CAIRO_LIBS"
        MOZ_CAIRO_CFLAGS="$MOZ_CAIRO_CFLAGS $CAIRO_XRENDER_CFLAGS"
    fi
fi

case "$MOZ_WIDGET_TOOLKIT" in
android|gonk)
    TK_CFLAGS="$MOZ_CAIRO_CFLAGS $MOZ_PIXMAN_CFLAGS"
    TK_LIBS="$MOZ_CAIRO_LIBS $MOZ_PIXMAN_LIBS"
    ;;
esac







if test "$MOZ_ENABLE_SKIA"; then
  SKIA_INCLUDES="/gfx/skia /gfx/skia/skia/include/config /gfx/skia/skia/include/core"
  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_ENABLE_SKIA ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ENABLE_SKIA 1
EOF

  cat >> confdefs.pytmp <<\EOF
    (''' USE_SKIA ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define USE_SKIA 1
EOF

  if test "${MOZ_WIDGET_TOOLKIT}" = "android" -o x"$MOZ_WIDGET_TOOLKIT" = x"gonk"; then
    cat >> confdefs.pytmp <<\EOF
    (''' SK_BUILD_FOR_ANDROID_NDK ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define SK_BUILD_FOR_ANDROID_NDK 1
EOF

  fi

  if test "${CPU_ARCH}" != "ppc" -a "${CPU_ARCH}" != "ppc64" -a "${CPU_ARCH}" != "sparc" -a "${CPU_ARCH}" != "sparc64" -a -z "$MOZ_DISABLE_SKIA_GPU" ; then
    SKIA_INCLUDES="$SKIA_INCLUDES /gfx/skia/skia/include/gpu /gfx/skia/skia/include/utils"
    MOZ_ENABLE_SKIA_GPU=1
    cat >> confdefs.pytmp <<\EOF
    (''' USE_SKIA_GPU ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define USE_SKIA_GPU 1
EOF

    
  fi
fi



# Check whether --enable-xul or --disable-xul was given.
if test "${enable_xul+set}" = set; then
  enableval="$enable_xul"
  if test "$enableval" = "no"; then
    MOZ_XUL= 
  elif test "$enableval" = "yes"; then
    :
  else
    { echo "configure: error: Option, xul, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, xul, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi

if test "$MOZ_XUL"; then
  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_XUL ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_XUL 1
EOF

else
    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's/inspector//' -e 's/irc//' -e 's/tasks//'`
fi




# Check whether --enable-necko-protocols or --disable-necko-protocols was given.
if test "${enable_necko_protocols+set}" = set; then
  enableval="$enable_necko_protocols"
   for option in `echo $enableval | sed 's/,/ /g'`; do
    if test "$option" = "yes" -o "$option" = "all"; then
        NECKO_PROTOCOLS="$NECKO_PROTOCOLS $NECKO_PROTOCOLS_DEFAULT"
    elif test "$option" = "no" -o "$option" = "none"; then
        NECKO_PROTOCOLS=""
    elif test "$option" = "default"; then
        NECKO_PROTOCOLS="$NECKO_PROTOCOLS $NECKO_PROTOCOLS_DEFAULT"
    elif test `echo "$option" | grep -c \^-` != 0; then
        option=`echo $option | sed 's/^-//'`
        NECKO_PROTOCOLS=`echo "$NECKO_PROTOCOLS" | sed "s/ ${option}//"`
    else
        NECKO_PROTOCOLS="$NECKO_PROTOCOLS $option"
    fi
done
else
  NECKO_PROTOCOLS="$NECKO_PROTOCOLS_DEFAULT"
fi


for p in $NECKO_PROTOCOLS; do
    cat >> confdefs.pytmp <<EOF
    (''' NECKO_PROTOCOL_$p ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define NECKO_PROTOCOL_$p 1
EOF

    _NON_GLOBAL_ACDEFINES="$_NON_GLOBAL_ACDEFINES NECKO_PROTOCOL_$p"
done


case "$OS_TARGET" in
  Android)
    if test -n "$gonkdir"; then
      NECKO_WIFI=1
    fi
    ;;
  Darwin)
    if test -z "$MOZ_IOS"; then
      NECKO_WIFI=1
    fi
    ;;
  DragonFly|FreeBSD|WINNT)
    NECKO_WIFI=1
    ;;
  Linux)
    NECKO_WIFI=1
    NECKO_WIFI_DBUS=1
    ;;
esac

# Check whether --enable-necko-wifi or --disable-necko-wifi was given.
if test "${enable_necko_wifi+set}" = set; then
  enableval="$enable_necko_wifi"
  if test "$enableval" = "no"; then
    NECKO_WIFI=
  elif test "$enableval" = "yes"; then
    NECKO_WIFI=1
  else
    { echo "configure: error: Option, necko-wifi, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, necko-wifi, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test "$NECKO_WIFI"; then
  if test -z "$MOZ_ENABLE_DBUS" -a -n "$NECKO_WIFI_DBUS"; then
    { echo "configure: error: Necko WiFi scanning needs DBus on your platform, remove --disable-dbus or use --disable-necko-wifi" 1>&2; echo "configure: error: Necko WiFi scanning needs DBus on your platform, remove --disable-dbus or use --disable-necko-wifi" 1>&5; exit 1; }
  fi
  cat >> confdefs.pytmp <<\EOF
    (''' NECKO_WIFI ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define NECKO_WIFI 1
EOF

  _NON_GLOBAL_ACDEFINES="$_NON_GLOBAL_ACDEFINES NECKO_WIFI"
fi



# Check whether --enable-cookies or --disable-cookies was given.
if test "${enable_cookies+set}" = set; then
  enableval="$enable_cookies"
  if test "$enableval" = "no"; then
    NECKO_COOKIES=
  elif test "$enableval" = "yes"; then
    NECKO_COOKIES=1
  else
    { echo "configure: error: Option, cookies, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, cookies, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test "$NECKO_COOKIES"; then
    cat >> confdefs.pytmp <<\EOF
    (''' NECKO_COOKIES ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define NECKO_COOKIES 1
EOF

    _NON_GLOBAL_ACDEFINES="$_NON_GLOBAL_ACDEFINES NECKO_COOKIES"
fi

if test "$OS_TARGET" != Android -a x"$MOZ_WIDGET_TOOLKIT" != x"gonk"; then
    cat >> confdefs.pytmp <<\EOF
    (''' ENABLE_MARIONETTE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define ENABLE_MARIONETTE 1
EOF

fi

if test "$ENABLE_MARIONETTE"; then
    cat >> confdefs.pytmp <<\EOF
    (''' ENABLE_MARIONETTE ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define ENABLE_MARIONETTE 1
EOF

fi

# Check whether --enable-ctypes or --disable-ctypes was given.
if test "${enable_ctypes+set}" = set; then
  enableval="$enable_ctypes"
  if test "$enableval" = "no"; then
    BUILD_CTYPES=
  elif test "$enableval" = "yes"; then
    BUILD_CTYPES=1
  else
    { echo "configure: error: Option, ctypes, does not take an argument ($enableval)." 1>&2; echo "configure: error: Option, ctypes, does not take an argument ($enableval)." 1>&5; exit 1; }
  fi
fi


if test "$BUILD_CTYPES"; then
    cat >> confdefs.pytmp <<\EOF
    (''' BUILD_CTYPES ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define BUILD_CTYPES 1
EOF

fi

if test "$MOZ_DEBUG" -o "$MOZ_DMD"; then
    MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
fi








































































if test -n "$MOZ_BINARY_EXTENSIONS"; then
  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_BINARY_EXTENSIONS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_BINARY_EXTENSIONS 1
EOF

fi


if test "$MOZ_ADDON_SIGNING" = 1; then
  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_ADDON_SIGNING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ADDON_SIGNING 1
EOF

fi

if test "$MOZ_REQUIRE_SIGNING" = 1; then
  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_REQUIRE_SIGNING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_REQUIRE_SIGNING 1
EOF

fi


if test -n "$MOZ_JSDOWNLOADS"; then
  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_JSDOWNLOADS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_JSDOWNLOADS 1
EOF

fi

# Check whether --with-macbundlename-prefix or --without-macbundlename-prefix was given.
if test "${with_macbundlename_prefix+set}" = set; then
  withval="$with_macbundlename_prefix"
   MOZ_MACBUNDLE_NAME_PREFIX="$withval"
fi


MOZ_MACBUNDLE_NAME=`echo $MOZ_APP_DISPLAYNAME | tr -d ' '`
if test "$MOZ_MACBUNDLE_NAME_PREFIX"; then
  MOZ_MACBUNDLE_NAME="${MOZ_MACBUNDLE_NAME_PREFIX}${MOZ_MACBUNDLE_NAME}"
fi

if test "$MOZ_DEBUG"; then
  MOZ_MACBUNDLE_NAME=${MOZ_MACBUNDLE_NAME}Debug.app
else
  MOZ_MACBUNDLE_NAME=${MOZ_MACBUNDLE_NAME}.app
fi


MOZ_MACBUNDLE_ID=`echo $MOZ_APP_DISPLAYNAME | tr 'A-Z' 'a-z'`
MOZ_MACBUNDLE_ID=${MOZ_DISTRIBUTION_ID}.${MOZ_MACBUNDLE_ID}
if test "$MOZ_DEBUG"; then
  MOZ_MACBUNDLE_ID=${MOZ_MACBUNDLE_ID}debug
fi

cat >> confdefs.pytmp <<EOF
    (''' MOZ_MACBUNDLE_ID ''', r''' $MOZ_MACBUNDLE_ID ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_MACBUNDLE_ID $MOZ_MACBUNDLE_ID
EOF



if test "$MOZ_WIDGET_TOOLKIT" != "android"; then
  MOZ_CHILD_PROCESS_NAME="plugin-container${BIN_SUFFIX}"
else
  # We want to let Android unpack the file at install time, but it only does
  # so if the file is named libsomething.so. The lib/ path is also required
  # because the unpacked file will be under the lib/ subdirectory and will
  # need to be executed from that path.
  MOZ_CHILD_PROCESS_NAME="libplugin-container.so"
  MOZ_CHILD_PROCESS_NAME_PIE="libplugin-container-pie.so"
  
fi
MOZ_CHILD_PROCESS_BUNDLE="plugin-container.app/Contents/MacOS/"




# The following variables are available to branding and application
# configuration ($BRANDING/configure.sh and $APPLICATION/confvars.sh):
# - MOZ_APP_VENDOR: Used for application.ini's "Vendor" field, which also
# impacts profile location and user-visible fields.
# - MOZ_APP_BASENAME: Typically stays consistent for multiple branded
# versions of a given application (e.g. Aurora and Firefox both use
# "Firefox"), but may vary for full rebrandings (e.g. Iceweasel). Used
# for application.ini's "Name" field, which controls profile location in
# the absence of a "Profile" field (see below), and various system
# integration hooks (Unix remoting, Windows MessageWindow name, etc.)
# - MOZ_APP_DISPLAYNAME: Used in user-visible fields (DLL properties,
# Mac Bundle name, Updater, Installer), it is typically used for nightly
# builds (e.g. Aurora for Firefox).
# - MOZ_APP_VERSION: Defines the application version number.
# - MOZ_APP_VERSION_DISPLAY: Defines the application version number. Used
# in the "About" window. If not set, defaults to MOZ_APP_VERSION.
# - MOZ_APP_NAME: Used for e.g. the binary program file name. If not set,
# defaults to a lowercase form of MOZ_APP_BASENAME.
# - MOZ_APP_REMOTINGNAME: Used for the internal program name, which affects
# profile name and remoting. If not set, defaults to MOZ_APP_NAME.
# - MOZ_APP_PROFILE: When set, used for application.ini's
# "Profile" field, which controls profile location.
# - MOZ_APP_ID: When set, used for application.ini's "ID" field, and
# crash reporter server url.
# - MOZ_APP_ANDROID_VERSION_CODE: On Android, "android:versionCode" for
# the main application is set to the value of this variable.  If not
# set, it falls back to a Mozilla-specific value derived from the
# build ID.
# - MOZ_ANDROID_SHARED_ID: On Android, "android:sharedUserId" for all Android
# packages produced.
# - MOZ_ANDROID_GCM_SENDERID: On Android, the Android GCM Sender ID used.  GCM
# sender IDs are not sensitive: see, http://stackoverflow.com/a/18216063.
# - MOZ_PROFILE_MIGRATOR: When set, enables profile migrator.

if test -z "$MOZ_APP_NAME"; then
   MOZ_APP_NAME=`echo $MOZ_APP_BASENAME | tr A-Z a-z`
fi

if test -z "$MOZ_APP_REMOTINGNAME"; then
   MOZ_APP_REMOTINGNAME=$MOZ_APP_NAME
fi

if test -z "$MOZ_APP_VERSION_DISPLAY"; then
   MOZ_APP_VERSION_DISPLAY=$MOZ_APP_VERSION
fi

if test -z "$ANDROID_PACKAGE_NAME" ; then
   ANDROID_PACKAGE_NAME="org.mozilla.$MOZ_APP_NAME"
fi

# Mozilla released Firefox for Android {Release,Beta} and {Aurora,Nightly} to
# the public with specific common shared IDs and we need to keep them
# consistent forever.  The specific common values are set by per-channel
# branding; all other channels use a generic sharedID, set below.
if test -z "$MOZ_ANDROID_SHARED_ID" ; then
   MOZ_ANDROID_SHARED_ID="${ANDROID_PACKAGE_NAME}.sharedID"
fi

# For extensions and langpacks, we require a max version that is compatible
# across security releases. MOZ_APP_MAXVERSION is our method for doing that.
# 24.0a1 and 24.0a2 aren't affected
# 24.0 becomes 24.*
# 24.1.1 becomes 24.*
IS_ALPHA=`echo $MOZ_APP_VERSION | grep a`
if test -z "$IS_ALPHA"; then
  
  if test "$(basename $MOZ_BUILD_APP)" = "suite"; then
    MOZ_APP_MAXVERSION=`echo $MOZ_APP_VERSION | sed "s|\(^[0-9]*\.[0-9]*\).*|\1|"`.*
  else
    MOZ_APP_MAXVERSION=`echo $MOZ_APP_VERSION | sed "s|\(^[0-9]*\).*|\1|"`.*
  fi
  
else
  MOZ_APP_MAXVERSION=$MOZ_APP_VERSION
fi

MOZ_B2G_VERSION=${MOZ_B2G_VERSION:-"1.0.0"}
cat >> confdefs.pytmp <<EOF
    (''' MOZ_B2G_VERSION ''', r''' "$MOZ_B2G_VERSION" ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_B2G_VERSION "$MOZ_B2G_VERSION"
EOF

cat >> confdefs.pytmp <<EOF
    (''' MOZ_B2G_OS_NAME ''', r''' "$MOZ_B2G_OS_NAME" ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_B2G_OS_NAME "$MOZ_B2G_OS_NAME"
EOF















cat >> confdefs.pytmp <<EOF
    (''' MOZ_APP_UA_NAME ''', r''' "$MOZ_APP_UA_NAME" ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_APP_UA_NAME "$MOZ_APP_UA_NAME"
EOF


cat >> confdefs.pytmp <<EOF
    (''' MOZ_APP_UA_VERSION ''', r''' "$MOZ_APP_VERSION" ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_APP_UA_VERSION "$MOZ_APP_VERSION"
EOF




cat >> confdefs.pytmp <<EOF
    (''' FIREFOX_VERSION ''', r''' $FIREFOX_VERSION ''')
EOF
cat >> confdefs.h <<EOF
#define FIREFOX_VERSION $FIREFOX_VERSION
EOF



if test -n "$MOZ_UA_OS_AGNOSTIC"; then
  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_UA_OS_AGNOSTIC ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_UA_OS_AGNOSTIC 1
EOF

fi







if test "$MOZILLA_OFFICIAL"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZILLA_OFFICIAL ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZILLA_OFFICIAL 1
EOF

    # Build revisions should always be present in official builds
    MOZ_INCLUDE_SOURCE_INFO=1
fi

# External builds (specifically Ubuntu) may drop the hg repo information, so we allow to
# explicitly set the repository and changeset information in.




if test "$MOZ_TELEMETRY_REPORTING"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_TELEMETRY_REPORTING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_TELEMETRY_REPORTING 1
EOF


    # Enable Telemetry by default for nightly and aurora channels
    if test -z "$RELEASE_BUILD"; then
      cat >> confdefs.pytmp <<\EOF
    (''' MOZ_TELEMETRY_ON_BY_DEFAULT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_TELEMETRY_ON_BY_DEFAULT 1
EOF

    fi
fi

if test -n "$MOZ_TELEMETRY_REPORTING" || test -n "$MOZ_SERVICES_HEALTHREPORT" || test -n "$MOZ_CRASHREPORTER"; then
  MOZ_DATA_REPORTING=1
  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_DATA_REPORTING ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_DATA_REPORTING 1
EOF

  
fi





CFLAGS=`echo \
    $_WARNINGS_CFLAGS \
    $CFLAGS`

CXXFLAGS=`echo \
    $_WARNINGS_CXXFLAGS \
    $CXXFLAGS`

COMPILE_CFLAGS=`echo \
    $_DEFINES_CFLAGS \
    $COMPILE_CFLAGS`

COMPILE_CXXFLAGS=`echo \
    $_DEFINES_CXXFLAGS \
    $COMPILE_CXXFLAGS`

HOST_CFLAGS=`echo \
    $HOST_CFLAGS`

HOST_CXXFLAGS=`echo \
    $HOST_CXXFLAGS`













if test "$MOZ_WIDGET_TOOLKIT" = gonk -a -n "$MOZ_NUWA_PROCESS"; then
    export MOZ_NUWA_PROCESS
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_NUWA_PROCESS ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_NUWA_PROCESS 1
EOF

fi

if test "$MOZ_WIDGET_TOOLKIT" = gonk -a -n "$MOZ_B2G_LOADER"; then
    if test -z "$MOZ_NUWA_PROCESS"; then
       { echo "configure: error: B2G loader works with Nuwa" 1>&2; echo "configure: error: B2G loader works with Nuwa" 1>&5; exit 1; };
    fi
    export MOZ_B2G_LOADER
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_B2G_LOADER ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_B2G_LOADER 1
EOF

fi







HOST_CMFLAGS=-fobjc-exceptions
HOST_CMMFLAGS=-fobjc-exceptions
OS_COMPILE_CMFLAGS=-fobjc-exceptions
OS_COMPILE_CMMFLAGS=-fobjc-exceptions
if test "$MOZ_WIDGET_TOOLKIT" = uikit; then
  OS_COMPILE_CMFLAGS="$OS_COMPILE_CMFLAGS -fobjc-abi-version=2 -fobjc-legacy-dispatch"
  OS_COMPILE_CMMFLAGS="$OS_COMPILE_CMMFLAGS -fobjc-abi-version=2 -fobjc-legacy-dispatch"
fi





OS_CFLAGS="$CFLAGS"
OS_CXXFLAGS="$CXXFLAGS"
OS_CPPFLAGS="$CPPFLAGS"
OS_COMPILE_CFLAGS="$COMPILE_CFLAGS"
OS_COMPILE_CXXFLAGS="$COMPILE_CXXFLAGS"
OS_LDFLAGS="$LDFLAGS"
OS_LIBS="$LIBS"






































cat >> confdefs.pytmp <<EOF
    (''' MOZ_DLL_SUFFIX ''', r''' "$DLL_SUFFIX" ''')
EOF
cat >> confdefs.h <<EOF
#define MOZ_DLL_SUFFIX "$DLL_SUFFIX"
EOF














































if test -n "$COMPILE_ENVIRONMENT"; then
for ac_func in posix_fadvise posix_fallocate
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:24042: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 24047 "configure"
#define $ac_func innocuous_$ac_func
#include "confdefs.h"
#undef $ac_func
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#define $ac_func innocuous_$ac_func
#include <assert.h>
#undef $ac_func
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:24074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.pytmp <<EOF
    (''' $ac_tr_func ''', ' 1 ')
EOF
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


if test "$MOZ_X11"; then
                _SAVE_CFLAGS=$CFLAGS
    CFLAGS="$CFLAGS $XCFLAGS"
    cat > conftest.$ac_ext <<EOF
#line 24106 "configure"
#include "confdefs.h"

        #include <stdio.h>
        #include <stdlib.h>
        #include <X11/Xlib.h>
        #include <X11/Intrinsic.h>
        #include <X11/extensions/XShm.h>
    
int main() {

        Display *dpy = 0;
        if ((dpy = XOpenDisplay(NULL)) == NULL) {
            fprintf(stderr, ": can't open %s\n", XDisplayName(NULL));
            exit(1);
        }
    
; return 0; }
EOF
if { (eval echo configure:24125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
   { echo "configure: error: Can't find X headers (install libxt-dev (Debian/Ubuntu), libXt-devel (Fedora), or xorg-x11-libXt-devel (SuSE))." 1>&2; echo "configure: error: Can't find X headers (install libxt-dev (Debian/Ubuntu), libXt-devel (Fedora), or xorg-x11-libXt-devel (SuSE))." 1>&5; exit 1; } 
fi
rm -f conftest*
    CFLAGS="$_SAVE_CFLAGS"

    if test -n "$MISSING_X"; then
        { echo "configure: error:  Could not find the following X libraries: $MISSING_X " 1>&2; echo "configure: error:  Could not find the following X libraries: $MISSING_X " 1>&5; exit 1; };
    fi

fi # MOZ_X11

fi # COMPILE_ENVIRONMENT


if test "$MOZ_DEBUG"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_REFLOW_PERF ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_REFLOW_PERF 1
EOF

    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_REFLOW_PERF_DSP ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_REFLOW_PERF_DSP 1
EOF

fi

if test "$ACCESSIBILITY" -a "$MOZ_ENABLE_GTK" ; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_ACCESSIBILITY_ATK ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ACCESSIBILITY_ATK 1
EOF

    ATK_FULL_VERSION=`$PKG_CONFIG --modversion atk`
    ATK_MAJOR_VERSION=`echo ${ATK_FULL_VERSION} | $AWK -F\. '{ print $1 }'`
    ATK_MINOR_VERSION=`echo ${ATK_FULL_VERSION} | $AWK -F\. '{ print $2 }'`
    ATK_REV_VERSION=`echo ${ATK_FULL_VERSION} | $AWK -F\. '{ print $3 }'`
    cat >> confdefs.pytmp <<EOF
    (''' ATK_MAJOR_VERSION ''', r''' $ATK_MAJOR_VERSION ''')
EOF
cat >> confdefs.h <<EOF
#define ATK_MAJOR_VERSION $ATK_MAJOR_VERSION
EOF

    cat >> confdefs.pytmp <<EOF
    (''' ATK_MINOR_VERSION ''', r''' $ATK_MINOR_VERSION ''')
EOF
cat >> confdefs.h <<EOF
#define ATK_MINOR_VERSION $ATK_MINOR_VERSION
EOF

    cat >> confdefs.pytmp <<EOF
    (''' ATK_REV_VERSION ''', r''' $ATK_REV_VERSION ''')
EOF
cat >> confdefs.h <<EOF
#define ATK_REV_VERSION $ATK_REV_VERSION
EOF

fi

if test -n "$MOZ_DEV_EDITION"; then
    cat >> confdefs.pytmp <<\EOF
    (''' MOZ_DEV_EDITION ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_DEV_EDITION 1
EOF

fi

if test "$MOZ_DEBUG"; then
    A11Y_LOG=1
fi
case "$MOZ_UPDATE_CHANNEL" in
aurora|beta|release|esr)
    ;;
*)
    A11Y_LOG=1
    ;;
esac

if test -n "$A11Y_LOG"; then
    cat >> confdefs.pytmp <<\EOF
    (''' A11Y_LOG ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define A11Y_LOG 1
EOF

fi




_NON_GLOBAL_ACDEFINES="$_NON_GLOBAL_ACDEFINES
CPP_THROW_NEW
HAVE_CPP_AMBIGUITY_RESOLVING_USING
HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR
HAVE_CPP_PARTIAL_SPECIALIZATION
HAVE_GETPAGESIZE
HAVE_ICONV
HAVE_ICONV_WITH_CONST_INPUT
HAVE_MBRTOWC
HAVE_WCRTOMB
HAVE_STATVFS64
HAVE_STATVFS
HAVE_STATFS64
HAVE_STATFS
HAVE_SYS_STATVFS_H
HAVE_SYS_STATFS_H
HAVE_SYS_VFS_H
HAVE_SYS_MOUNT_H
"


if test -z "$GNU_CC" -a "$OS_ARCH" = "WINNT"; then
    PREPROCESS_OPTION="-P -Fi"
else
    PREPROCESS_OPTION="-E -o "
fi




# Internationalization is not built or exposed on Fennec.
# See Bug 1215256

if test "$MOZ_BUILD_APP" = "mobile/android"; then
    _INTL_API=no
else
    _INTL_API=yes
fi

if test "$MOZ_WIDGET_TOOLKIT" = "cocoa"; then
    USE_ICU=1
fi



ICU_LIB_NAMES=
MOZ_SYSTEM_ICU=
# Check whether --with-system-icu or --without-system-icu was given.
if test "${with_system_icu+set}" = set; then
  withval="$with_system_icu"
  if test "$withval" = "yes"; then
    MOZ_SYSTEM_ICU=1
  elif test "$withval" = "no"; then
    :
  else
    { echo "configure: error: Option, system-icu, does not take an argument ($withval)." 1>&2; echo "configure: error: Option, system-icu, does not take an argument ($withval)." 1>&5; exit 1; }
  fi
fi


if test -n "$MOZ_SYSTEM_ICU"; then
    succeeded=no

  if test -z "$PKG_CONFIG"; then
     echo "*** The pkg-config script could not be found. Make sure it is"
     echo "*** in your path, or set the PKG_CONFIG environment variable"
     echo "*** to the full path to pkg-config."
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
     PKG_CONFIG_MIN_VERSION=0.9.0
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
        echo $ac_n "checking for icu-i18n >= 50.1""... $ac_c" 1>&6
echo "configure:24303: checking for icu-i18n >= 50.1" >&5

        if $PKG_CONFIG --exists "icu-i18n >= 50.1" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_ICU_CFLAGS""... $ac_c" 1>&6
echo "configure:24310: checking MOZ_ICU_CFLAGS" >&5
            MOZ_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-i18n >= 50.1"`
            echo "$ac_t""$MOZ_ICU_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_ICU_LIBS""... $ac_c" 1>&6
echo "configure:24315: checking MOZ_ICU_LIBS" >&5
            ## Remove evil flags like -Wl,--export-dynamic
            MOZ_ICU_LIBS="`$PKG_CONFIG --libs \"icu-i18n >= 50.1\" |sed s/-Wl,--export-dynamic//g`"
            echo "$ac_t""$MOZ_ICU_LIBS" 1>&6
        else
            MOZ_ICU_CFLAGS=""
            MOZ_ICU_LIBS=""
            ## If we have a custom action on failure, don't print errors, but 
            ## do set a variable so people can do so.
            MOZ_ICU_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "icu-i18n >= 50.1"`
            echo $MOZ_ICU_PKG_ERRORS
        fi

        
        
     else
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     if test "$COMPILE_ENVIRONMENT"; then 
       { echo "configure: error: Library requirements (icu-i18n >= 50.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; echo "configure: error: Library requirements (icu-i18n >= 50.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&5; exit 1; }
     fi
  fi

else
    MOZ_ICU_INCLUDES="/intl/icu/source/common /intl/icu/source/i18n"
fi




# Check whether --with-intl-api or --without-intl-api was given.
if test "${with_intl_api+set}" = set; then
  withval="$with_intl_api"
  _INTL_API=$withval
fi


ENABLE_INTL_API=
EXPOSE_INTL_API=
case "$_INTL_API" in
no)
    ;;
build)
    ENABLE_INTL_API=1
    ;;
yes)
    ENABLE_INTL_API=1
    EXPOSE_INTL_API=1
    ;;
*)
    { echo "configure: error: Invalid value passed to --with-intl-api: $_INTL_API" 1>&2; echo "configure: error: Invalid value passed to --with-intl-api: $_INTL_API" 1>&5; exit 1; }
    ;;
esac

if test -n "$ENABLE_INTL_API"; then
    USE_ICU=1
fi

if test -n "$EXPOSE_INTL_API"; then
    cat >> confdefs.pytmp <<\EOF
    (''' EXPOSE_INTL_API ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define EXPOSE_INTL_API 1
EOF

fi

if test -n "$ENABLE_INTL_API"; then
    cat >> confdefs.pytmp <<\EOF
    (''' ENABLE_INTL_API ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define ENABLE_INTL_API 1
EOF

fi

if test -n "$USE_ICU"; then
    icudir="$_topsrcdir/intl/icu/source"
    if test ! -d "$icudir"; then
        icudir="$_topsrcdir/../../intl/icu/source"
        if test ! -d "$icudir"; then
            { echo "configure: error: Cannot find the ICU directory" 1>&2; echo "configure: error: Cannot find the ICU directory" 1>&5; exit 1; }
        fi
    fi

    version=`sed -n 's/^[:space:]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"`
    if test x"$version" = x; then
       { echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&2; echo "configure: error: cannot determine icu version number from uvernum.h header file $lineno" 1>&5; exit 1; }
    fi
    MOZ_ICU_VERSION="$version"

    # TODO: the l is actually endian-dependent
    # We could make this set as 'l' or 'b' for little or big, respectively,
    # but we'd need to check in a big-endian version of the file.
    ICU_DATA_FILE="icudt${version}l.dat"

                        if test -z "$JS_STANDALONE" -a -z "$MOZ_SYSTEM_ICU" -a "$OS_TARGET" != WINNT; then
        MOZ_ICU_DATA_ARCHIVE=1
    else
        MOZ_ICU_DATA_ARCHIVE=
    fi
fi







if test -n "$USE_ICU" -a -z "$MOZ_SYSTEM_ICU"; then
    if test -z "$YASM" -a -z "$GNU_AS" -a "$COMPILE_ENVIRONMENT"; then
      { echo "configure: error: Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api" 1>&2; echo "configure: error: Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api" 1>&5; exit 1; }
    fi
        cat >> confdefs.pytmp <<\EOF
    (''' U_STATIC_IMPLEMENTATION ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define U_STATIC_IMPLEMENTATION 1
EOF

            cat >> confdefs.pytmp <<\EOF
    (''' U_USING_ICU_NAMESPACE ''', r''' 0 ''')
EOF
cat >> confdefs.h <<\EOF
#define U_USING_ICU_NAMESPACE 0
EOF

fi


if test "$MOZ_ENABLE_MASK_AS_SHORTHAND"; then
  cat >> confdefs.pytmp <<\EOF
    (''' MOZ_ENABLE_MASK_AS_SHORTHAND ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define MOZ_ENABLE_MASK_AS_SHORTHAND 1
EOF

fi


# Avoid using obsolete NSPR features
cat >> confdefs.pytmp <<\EOF
    (''' NO_NSPR_10_SUPPORT ''', ' 1 ')
EOF
cat >> confdefs.h <<\EOF
#define NO_NSPR_10_SUPPORT 1
EOF


WIN_TOP_SRC=
case "$host_os" in
mingw*)
    WIN_TOP_SRC=`cd $srcdir; pwd -W`
    ;;
esac


top_srcdir=$srcdir


trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs.  It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already.  You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
  case `(ac_space=' '; set | grep ac_space) 2>&1` in
  *ac_space=\ *)
    # `set' does not quote correctly, so add quotes (double-quote substitution
    # turns \\\\ into \\, and sed turns \\ into \).
    sed -n \
      -e "s/'/'\\\\''/g" \
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
    ;;
  *)
    # `set' quotes correctly as required by POSIX, so do not add quotes.
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
    ;;
  esac >> confcache
if cmp -s $cache_file confcache; then
  :
else
  if test -w $cache_file; then
    echo "updating cache $cache_file"
    cat confcache > $cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
fi
rm -f confcache


trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
: ${CONFIG_STATUS=./config.data}

echo creating $CONFIG_STATUS

cat > $CONFIG_STATUS <<EOF
def unique_list(l):
    result = []
    for i in l:
        if l not in result:
            result.append(i)
    return result

defines = [
EOF

sed 's/$/,/' confdefs.pytmp >> $CONFIG_STATUS
rm confdefs.pytmp confdefs.h

cat >> $CONFIG_STATUS <<\EOF
]

substs = [
EOF

sed 's/$/,/' >> $CONFIG_STATUS <<EOF
    (''' SHELL ''', r''' $SHELL ''')
    (''' exec_prefix ''', r''' $exec_prefix ''')
    (''' prefix ''', r''' $prefix ''')
    (''' program_transform_name ''', r''' $program_transform_name ''')
    (''' bindir ''', r''' $bindir ''')
    (''' sbindir ''', r''' $sbindir ''')
    (''' libexecdir ''', r''' $libexecdir ''')
    (''' datadir ''', r''' $datadir ''')
    (''' sysconfdir ''', r''' $sysconfdir ''')
    (''' sharedstatedir ''', r''' $sharedstatedir ''')
    (''' localstatedir ''', r''' $localstatedir ''')
    (''' libdir ''', r''' $libdir ''')
    (''' includedir ''', r''' $includedir ''')
    (''' oldincludedir ''', r''' $oldincludedir ''')
    (''' infodir ''', r''' $infodir ''')
    (''' mandir ''', r''' $mandir ''')
    (''' host ''', r''' $host ''')
    (''' host_alias ''', r''' $host_alias ''')
    (''' host_cpu ''', r''' $host_cpu ''')
    (''' host_vendor ''', r''' $host_vendor ''')
    (''' host_os ''', r''' $host_os ''')
    (''' target ''', r''' $target ''')
    (''' target_alias ''', r''' $target_alias ''')
    (''' target_cpu ''', r''' $target_cpu ''')
    (''' target_vendor ''', r''' $target_vendor ''')
    (''' target_os ''', r''' $target_os ''')
    (''' build ''', r''' $build ''')
    (''' build_alias ''', r''' $build_alias ''')
    (''' build_cpu ''', r''' $build_cpu ''')
    (''' build_vendor ''', r''' $build_vendor ''')
    (''' build_os ''', r''' $build_os ''')
    (''' CC ''', r''' $CC ''')
    (''' CXX ''', r''' $CXX ''')
    (''' MOZ_OMX_DECODER ''', r''' $MOZ_OMX_DECODER ''')
    (''' MOZ_OMX_ENCODER ''', r''' $MOZ_OMX_ENCODER ''')
    (''' MOZ_AUDIO_OFFLOAD ''', r''' $MOZ_AUDIO_OFFLOAD ''')
    (''' ANDROID_VERSION ''', r''' $ANDROID_VERSION ''')
    (''' ANDROID_PLATFORM ''', r''' $ANDROID_PLATFORM ''')
    (''' OBJCOPY ''', r''' $OBJCOPY ''')
    (''' MOZ_IOS ''', r''' $MOZ_IOS ''')
    (''' ANDROID_SOURCE ''', r''' $ANDROID_SOURCE ''')
    (''' ANDROID_PACKAGE_NAME ''', r''' $ANDROID_PACKAGE_NAME ''')
    (''' HOST_RANLIB ''', r''' $HOST_RANLIB ''')
    (''' HOST_AR ''', r''' $HOST_AR ''')
    (''' RANLIB ''', r''' $RANLIB ''')
    (''' AR ''', r''' $AR ''')
    (''' AS ''', r''' $AS ''')
    (''' LD ''', r''' $LD ''')
    (''' STRIP ''', r''' $STRIP ''')
    (''' WINDRES ''', r''' $WINDRES ''')
    (''' OTOOL ''', r''' $OTOOL ''')
    (''' CLANG_CXX ''', r''' $CLANG_CXX ''')
    (''' CLANG_CL ''', r''' $CLANG_CL ''')
    (''' RUSTC ''', r''' $RUSTC ''')
    (''' MOZ_RUST ''', r''' $MOZ_RUST ''')
    (''' CPP ''', r''' $CPP ''')
    (''' CXXCPP ''', r''' $CXXCPP ''')
    (''' MIDL ''', r''' $MIDL ''')
    (''' MSVS_VERSION ''', r''' $MSVS_VERSION ''')
    (''' MSVC_HAS_DIA_SDK ''', r''' $MSVC_HAS_DIA_SDK ''')
    (''' MSVC_C_RUNTIME_DLL ''', r''' $MSVC_C_RUNTIME_DLL ''')
    (''' MSVC_CXX_RUNTIME_DLL ''', r''' $MSVC_CXX_RUNTIME_DLL ''')
    (''' MOZ_WINSDK_MAXVER ''', r''' $MOZ_WINSDK_MAXVER ''')
    (''' MIDL_FLAGS ''', r''' $MIDL_FLAGS ''')
    (''' _MSC_VER ''', r''' $_MSC_VER ''')
    (''' GNU_AS ''', r''' $GNU_AS ''')
    (''' GNU_LD ''', r''' $GNU_LD ''')
    (''' GNU_CC ''', r''' $GNU_CC ''')
    (''' GNU_CXX ''', r''' $GNU_CXX ''')
    (''' STL_FLAGS ''', r''' $STL_FLAGS ''')
    (''' WRAP_STL_INCLUDES ''', r''' $WRAP_STL_INCLUDES ''')
    (''' MOZ_MSVC_STL_WRAP_RAISE ''', r''' $MOZ_MSVC_STL_WRAP_RAISE ''')
    (''' NSINSTALL_BIN ''', r''' $NSINSTALL_BIN ''')
    (''' UNIVERSAL_BINARY ''', r''' $UNIVERSAL_BINARY ''')
    (''' UNIFY_DIST ''', r''' $UNIFY_DIST ''')
    (''' MACOS_SDK_DIR ''', r''' $MACOS_SDK_DIR ''')
    (''' MACOS_PRIVATE_FRAMEWORKS_DIR ''', r''' $MACOS_PRIVATE_FRAMEWORKS_DIR ''')
    (''' GMAKE ''', r''' $GMAKE ''')
    (''' X_CFLAGS ''', r''' $X_CFLAGS ''')
    (''' X_PRE_LIBS ''', r''' $X_PRE_LIBS ''')
    (''' X_LIBS ''', r''' $X_LIBS ''')
    (''' X_EXTRA_LIBS ''', r''' $X_EXTRA_LIBS ''')
    (''' MOZ_THUMB2 ''', r''' $MOZ_THUMB2 ''')
    (''' HAVE_ARM_SIMD ''', r''' $HAVE_ARM_SIMD ''')
    (''' HAVE_ARM_NEON ''', r''' $HAVE_ARM_NEON ''')
    (''' BUILD_ARM_NEON ''', r''' $BUILD_ARM_NEON ''')
    (''' ARM_ARCH ''', r''' $ARM_ARCH ''')
    (''' ANDROID_CPU_ARCH ''', r''' $ANDROID_CPU_ARCH ''')
    (''' MOZ_ANDROID_CXX_STL ''', r''' $MOZ_ANDROID_CXX_STL ''')
    (''' STLPORT_LIBS ''', r''' $STLPORT_LIBS ''')
    (''' MOZ_CLANG_RT_ASAN_LIB_PATH ''', r''' $MOZ_CLANG_RT_ASAN_LIB_PATH ''')
    (''' LLVM_SYMBOLIZER ''', r''' $LLVM_SYMBOLIZER ''')
    (''' MOZ_ASAN ''', r''' $MOZ_ASAN ''')
    (''' MOZ_MSAN ''', r''' $MOZ_MSAN ''')
    (''' MOZ_TSAN ''', r''' $MOZ_TSAN ''')
    (''' MOZ_NO_WLZDEFS ''', r''' $MOZ_NO_WLZDEFS ''')
    (''' MOZ_CFLAGS_NSS ''', r''' $MOZ_CFLAGS_NSS ''')
    (''' HAVE_64BIT_BUILD ''', r''' $HAVE_64BIT_BUILD ''')
    (''' MOZ_VALGRIND ''', r''' $MOZ_VALGRIND ''')
    (''' MOZILLA_SYMBOLVERSION ''', r''' $MOZILLA_SYMBOLVERSION ''')
    (''' MMX_FLAGS ''', list(r''' $MMX_FLAGS '''.split()))
    (''' SSE_FLAGS ''', list(r''' $SSE_FLAGS '''.split()))
    (''' SSE2_FLAGS ''', list(r''' $SSE2_FLAGS '''.split()))
    (''' SSSE3_FLAGS ''', list(r''' $SSSE3_FLAGS '''.split()))
    (''' MOZ_LINKER ''', r''' $MOZ_LINKER ''')
    (''' MOZ_DEBUG_FLAGS ''', r''' $MOZ_DEBUG_FLAGS ''')
    (''' MOZ_NO_DEBUG_RTL ''', r''' $MOZ_NO_DEBUG_RTL ''')
    (''' MOZ_DEBUG_DEFINES ''', list(r''' $MOZ_DEBUG_DEFINES '''.split()))
    (''' LD_IS_BFD ''', r''' $LD_IS_BFD ''')
    (''' LD_PRINT_ICF_SECTIONS ''', r''' $LD_PRINT_ICF_SECTIONS ''')
    (''' MOZ_PROGRAM_LDFLAGS ''', r''' $MOZ_PROGRAM_LDFLAGS ''')
    (''' MOZ_NEEDS_LIBATOMIC ''', r''' $MOZ_NEEDS_LIBATOMIC ''')
    (''' WRAP_SYSTEM_INCLUDES ''', r''' $WRAP_SYSTEM_INCLUDES ''')
    (''' VISIBILITY_FLAGS ''', list(r''' $VISIBILITY_FLAGS '''.split()))
    (''' HAVE_DTRACE ''', r''' $HAVE_DTRACE ''')
    (''' HAVE_LINUX_PERF_EVENT_H ''', r''' $HAVE_LINUX_PERF_EVENT_H ''')
    (''' LINUX_HEADERS_INCLUDES ''', r''' $LINUX_HEADERS_INCLUDES ''')
    (''' XCFLAGS ''', list(r''' $XCFLAGS '''.split()))
    (''' XLDFLAGS ''', list(r''' $XLDFLAGS '''.split()))
    (''' XLIBS ''', list(r''' $XLIBS '''.split()))
    (''' XEXT_LIBS ''', list(r''' $XEXT_LIBS '''.split()))
    (''' XT_LIBS ''', list(r''' $XT_LIBS '''.split()))
    (''' XSS_LIBS ''', list(r''' $XSS_LIBS '''.split()))
    (''' MOZ_USE_PTHREADS ''', r''' $MOZ_USE_PTHREADS ''')
    (''' LIBOBJS ''', r''' $LIBOBJS ''')
    (''' HAVE_CLOCK_MONOTONIC ''', r''' $HAVE_CLOCK_MONOTONIC ''')
    (''' REALTIME_LIBS ''', list(r''' $REALTIME_LIBS '''.split()))
    (''' ICONV_LIBS ''', list(r''' $ICONV_LIBS '''.split()))
    (''' HAVE_LANGINFO_CODESET ''', r''' $HAVE_LANGINFO_CODESET ''')
    (''' MOZ_BUILD_NSPR ''', r''' $MOZ_BUILD_NSPR ''')
    (''' JS_POSIX_NSPR ''', r''' $JS_POSIX_NSPR ''')
    (''' NSPR_CONFIG ''', r''' $NSPR_CONFIG ''')
    (''' NSPR_CFLAGS ''', list(r''' $NSPR_CFLAGS '''.split()))
    (''' NSPR_LIBS ''', list(r''' $NSPR_LIBS '''.split()))
    (''' NSPR_INCLUDE_DIR ''', r''' $NSPR_INCLUDE_DIR ''')
    (''' NSPR_LIB_DIR ''', r''' $NSPR_LIB_DIR ''')
    (''' NSPR_PKGCONF_CHECK ''', r''' $NSPR_PKGCONF_CHECK ''')
    (''' MOZ_LIBEVENT_CFLAGS ''', list(r''' $MOZ_LIBEVENT_CFLAGS '''.split()))
    (''' MOZ_LIBEVENT_LIBS ''', list(r''' $MOZ_LIBEVENT_LIBS '''.split()))
    (''' MOZ_SYSTEM_LIBEVENT ''', r''' $MOZ_SYSTEM_LIBEVENT ''')
    (''' NSS_CONFIG ''', r''' $NSS_CONFIG ''')
    (''' NSS_CFLAGS ''', list(r''' $NSS_CFLAGS '''.split()))
    (''' NSS_LIBS ''', list(r''' $NSS_LIBS '''.split()))
    (''' MOZ_ZLIB_CFLAGS ''', list(r''' $MOZ_ZLIB_CFLAGS '''.split()))
    (''' MOZ_ZLIB_LIBS ''', list(r''' $MOZ_ZLIB_LIBS '''.split()))
    (''' MOZ_SYSTEM_ZLIB ''', r''' $MOZ_SYSTEM_ZLIB ''')
    (''' MOZ_PNG_ARM_NEON ''', r''' $MOZ_PNG_ARM_NEON ''')
    (''' MOZ_FFI_CFLAGS ''', list(r''' $MOZ_FFI_CFLAGS '''.split()))
    (''' MOZ_FFI_LIBS ''', list(r''' $MOZ_FFI_LIBS '''.split()))
    (''' MOZ_SYSTEM_FFI ''', r''' $MOZ_SYSTEM_FFI ''')
    (''' MOZ_MOZILLA_API_KEY ''', r''' $MOZ_MOZILLA_API_KEY ''')
    (''' MOZ_GOOGLE_API_KEY ''', r''' $MOZ_GOOGLE_API_KEY ''')
    (''' MOZ_GOOGLE_OAUTH_API_CLIENTID ''', r''' $MOZ_GOOGLE_OAUTH_API_CLIENTID ''')
    (''' MOZ_GOOGLE_OAUTH_API_KEY ''', r''' $MOZ_GOOGLE_OAUTH_API_KEY ''')
    (''' MOZ_BING_API_CLIENTID ''', r''' $MOZ_BING_API_CLIENTID ''')
    (''' MOZ_BING_API_KEY ''', r''' $MOZ_BING_API_KEY ''')
    (''' MOZ_INSTALL_TRACKING_ADJUST_SDK_APP_TOKEN ''', r''' $MOZ_INSTALL_TRACKING_ADJUST_SDK_APP_TOKEN ''')
    (''' MOZ_ANDROID_DISTRIBUTION_DIRECTORY ''', r''' $MOZ_ANDROID_DISTRIBUTION_DIRECTORY ''')
    (''' EARLY_BETA_OR_EARLIER ''', r''' $EARLY_BETA_OR_EARLIER ''')
    (''' MOZ_PHOENIX ''', r''' $MOZ_PHOENIX ''')
    (''' MOZ_XULRUNNER ''', r''' $MOZ_XULRUNNER ''')
    (''' MOZ_B2G ''', r''' $MOZ_B2G ''')
    (''' MOZ_MULET ''', r''' $MOZ_MULET ''')
    (''' MOZ_B2G_VERSION ''', r''' $MOZ_B2G_VERSION ''')
    (''' ZIPALIGN ''', r''' $ZIPALIGN ''')
    (''' DX ''', r''' $DX ''')
    (''' AAPT ''', r''' $AAPT ''')
    (''' AIDL ''', r''' $AIDL ''')
    (''' ADB ''', r''' $ADB ''')
    (''' EMULATOR ''', r''' $EMULATOR ''')
    (''' ANDROID_TARGET_SDK ''', r''' $ANDROID_TARGET_SDK ''')
    (''' ANDROID_SDK_ROOT ''', r''' $ANDROID_SDK_ROOT ''')
    (''' ANDROID_SDK ''', r''' $ANDROID_SDK ''')
    (''' ANDROID_TOOLS ''', r''' $ANDROID_TOOLS ''')
    (''' ANDROID_BUILD_TOOLS_VERSION ''', r''' $ANDROID_BUILD_TOOLS_VERSION ''')
    (''' ANDROID_APPCOMPAT_V7_AAR ''', r''' $ANDROID_APPCOMPAT_V7_AAR ''')
    (''' ANDROID_APPCOMPAT_V7_AAR_LIB ''', r''' $ANDROID_APPCOMPAT_V7_AAR_LIB ''')
    (''' ANDROID_APPCOMPAT_V7_AAR_RES ''', r''' $ANDROID_APPCOMPAT_V7_AAR_RES ''')
    (''' ANDROID_CARDVIEW_V7_AAR ''', r''' $ANDROID_CARDVIEW_V7_AAR ''')
    (''' ANDROID_CARDVIEW_V7_AAR_LIB ''', r''' $ANDROID_CARDVIEW_V7_AAR_LIB ''')
    (''' ANDROID_CARDVIEW_V7_AAR_RES ''', r''' $ANDROID_CARDVIEW_V7_AAR_RES ''')
    (''' ANDROID_DESIGN_AAR ''', r''' $ANDROID_DESIGN_AAR ''')
    (''' ANDROID_DESIGN_AAR_LIB ''', r''' $ANDROID_DESIGN_AAR_LIB ''')
    (''' ANDROID_DESIGN_AAR_RES ''', r''' $ANDROID_DESIGN_AAR_RES ''')
    (''' ANDROID_RECYCLERVIEW_V7_AAR ''', r''' $ANDROID_RECYCLERVIEW_V7_AAR ''')
    (''' ANDROID_RECYCLERVIEW_V7_AAR_LIB ''', r''' $ANDROID_RECYCLERVIEW_V7_AAR_LIB ''')
    (''' ANDROID_RECYCLERVIEW_V7_AAR_RES ''', r''' $ANDROID_RECYCLERVIEW_V7_AAR_RES ''')
    (''' ANDROID_SUPPORT_V4_AAR ''', r''' $ANDROID_SUPPORT_V4_AAR ''')
    (''' ANDROID_SUPPORT_V4_AAR_LIB ''', r''' $ANDROID_SUPPORT_V4_AAR_LIB ''')
    (''' ANDROID_SUPPORT_V4_AAR_RES ''', r''' $ANDROID_SUPPORT_V4_AAR_RES ''')
    (''' ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB ''', r''' $ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB ''')
    (''' ANDROID_SUPPORT_ANNOTATIONS_JAR ''', r''' $ANDROID_SUPPORT_ANNOTATIONS_JAR ''')
    (''' ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB ''', r''' $ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB ''')
    (''' MOZ_ANDROID_MIN_SDK_VERSION ''', r''' $MOZ_ANDROID_MIN_SDK_VERSION ''')
    (''' MOZ_ANDROID_MAX_SDK_VERSION ''', r''' $MOZ_ANDROID_MAX_SDK_VERSION ''')
    (''' MOZ_GTK3_CFLAGS ''', list(r''' $MOZ_GTK3_CFLAGS '''.split()))
    (''' MOZ_GTK3_LIBS ''', list(r''' $MOZ_GTK3_LIBS '''.split()))
    (''' MOZ_GTK2_CFLAGS ''', list(r''' $MOZ_GTK2_CFLAGS '''.split()))
    (''' MOZ_GTK2_LIBS ''', list(r''' $MOZ_GTK2_LIBS '''.split()))
    (''' MOZ_FS_LAYOUT ''', r''' $MOZ_FS_LAYOUT ''')
    (''' MOZ_STARTUP_NOTIFICATION_CFLAGS ''', list(r''' $MOZ_STARTUP_NOTIFICATION_CFLAGS '''.split()))
    (''' MOZ_STARTUP_NOTIFICATION_LIBS ''', list(r''' $MOZ_STARTUP_NOTIFICATION_LIBS '''.split()))
    (''' MOZ_ENABLE_STARTUP_NOTIFICATION ''', r''' $MOZ_ENABLE_STARTUP_NOTIFICATION ''')
    (''' HOST_QMAKE ''', r''' $HOST_QMAKE ''')
    (''' MOZ_QT_CFLAGS ''', list(r''' $MOZ_QT_CFLAGS '''.split()))
    (''' MOZ_QT_LIBS ''', list(r''' $MOZ_QT_LIBS '''.split()))
    (''' MOZ_QT_WIDGETS_CFLAGS ''', list(r''' $MOZ_QT_WIDGETS_CFLAGS '''.split()))
    (''' MOZ_QT_WIDGETS_LIBS ''', list(r''' $MOZ_QT_WIDGETS_LIBS '''.split()))
    (''' HOST_MOC ''', r''' $HOST_MOC ''')
    (''' HOST_RCC ''', r''' $HOST_RCC ''')
    (''' _QMSYSTEM2_CFLAGS ''', list(r''' $_QMSYSTEM2_CFLAGS '''.split()))
    (''' _QMSYSTEM2_LIBS ''', list(r''' $_QMSYSTEM2_LIBS '''.split()))
    (''' _QTNETWORK_CFLAGS ''', list(r''' $_QTNETWORK_CFLAGS '''.split()))
    (''' _QTNETWORK_LIBS ''', list(r''' $_QTNETWORK_LIBS '''.split()))
    (''' _QTMOBILITY_CFLAGS ''', list(r''' $_QTMOBILITY_CFLAGS '''.split()))
    (''' _QTMOBILITY_LIBS ''', list(r''' $_QTMOBILITY_LIBS '''.split()))
    (''' _QT5FEEDBACK_CFLAGS ''', list(r''' $_QT5FEEDBACK_CFLAGS '''.split()))
    (''' _QT5FEEDBACK_LIBS ''', list(r''' $_QT5FEEDBACK_LIBS '''.split()))
    (''' MOZ_ENABLE_QT5FEEDBACK ''', r''' $MOZ_ENABLE_QT5FEEDBACK ''')
    (''' _QT5GEOPOSITION_CFLAGS ''', list(r''' $_QT5GEOPOSITION_CFLAGS '''.split()))
    (''' _QT5GEOPOSITION_LIBS ''', list(r''' $_QT5GEOPOSITION_LIBS '''.split()))
    (''' MOZ_ENABLE_QT5GEOPOSITION ''', r''' $MOZ_ENABLE_QT5GEOPOSITION ''')
    (''' LIBCONTENTACTION_CFLAGS ''', list(r''' $LIBCONTENTACTION_CFLAGS '''.split()))
    (''' LIBCONTENTACTION_LIBS ''', list(r''' $LIBCONTENTACTION_LIBS '''.split()))
    (''' MOZ_ENABLE_CONTENTACTION ''', r''' $MOZ_ENABLE_CONTENTACTION ''')
    (''' TK_CFLAGS ''', list(r''' $TK_CFLAGS '''.split()))
    (''' TK_LIBS ''', list(r''' $TK_LIBS '''.split()))
    (''' MOZ_ENABLE_QT ''', r''' $MOZ_ENABLE_QT ''')
    (''' MOZ_ENABLE_QTNETWORK ''', r''' $MOZ_ENABLE_QTNETWORK ''')
    (''' MOZ_ENABLE_QMSYSTEM2 ''', r''' $MOZ_ENABLE_QMSYSTEM2 ''')
    (''' MOC ''', r''' $MOC ''')
    (''' RCC ''', r''' $RCC ''')
    (''' MOZ_UI_LOCALE ''', r''' $MOZ_UI_LOCALE ''')
    (''' MOZ_OFFICIAL_BRANDING ''', r''' $MOZ_OFFICIAL_BRANDING ''')
    (''' MOZ_BRANDING_DIRECTORY ''', r''' $MOZ_BRANDING_DIRECTORY ''')
    (''' MOZ_DISTRIBUTION_ID ''', r''' $MOZ_DISTRIBUTION_ID ''')
    (''' MOZ_NATIVE_DEVICES ''', r''' $MOZ_NATIVE_DEVICES ''')
    (''' ANDROID_PLAY_SERVICES_BASE_AAR ''', r''' $ANDROID_PLAY_SERVICES_BASE_AAR ''')
    (''' ANDROID_PLAY_SERVICES_BASE_AAR_LIB ''', r''' $ANDROID_PLAY_SERVICES_BASE_AAR_LIB ''')
    (''' ANDROID_PLAY_SERVICES_BASE_AAR_RES ''', r''' $ANDROID_PLAY_SERVICES_BASE_AAR_RES ''')
    (''' ANDROID_PLAY_SERVICES_BASEMENT_AAR ''', r''' $ANDROID_PLAY_SERVICES_BASEMENT_AAR ''')
    (''' ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB ''', r''' $ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB ''')
    (''' ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES ''', r''' $ANDROID_PLAY_SERVICES_BASEMENT_AAR_RES ''')
    (''' ANDROID_PLAY_SERVICES_CAST_AAR ''', r''' $ANDROID_PLAY_SERVICES_CAST_AAR ''')
    (''' ANDROID_PLAY_SERVICES_CAST_AAR_LIB ''', r''' $ANDROID_PLAY_SERVICES_CAST_AAR_LIB ''')
    (''' ANDROID_PLAY_SERVICES_CAST_AAR_RES ''', r''' $ANDROID_PLAY_SERVICES_CAST_AAR_RES ''')
    (''' ANDROID_MEDIAROUTER_V7_AAR ''', r''' $ANDROID_MEDIAROUTER_V7_AAR ''')
    (''' ANDROID_MEDIAROUTER_V7_AAR_LIB ''', r''' $ANDROID_MEDIAROUTER_V7_AAR_LIB ''')
    (''' ANDROID_MEDIAROUTER_V7_AAR_RES ''', r''' $ANDROID_MEDIAROUTER_V7_AAR_RES ''')
    (''' ANDROID_MEDIAROUTER_V7_AAR_INTERNAL_LIB ''', r''' $ANDROID_MEDIAROUTER_V7_AAR_INTERNAL_LIB ''')
    (''' ANDROID_PLAY_SERVICES_GCM_AAR ''', r''' $ANDROID_PLAY_SERVICES_GCM_AAR ''')
    (''' ANDROID_PLAY_SERVICES_GCM_AAR_LIB ''', r''' $ANDROID_PLAY_SERVICES_GCM_AAR_LIB ''')
    (''' ANDROID_PLAY_SERVICES_GCM_AAR_RES ''', r''' $ANDROID_PLAY_SERVICES_GCM_AAR_RES ''')
    (''' ANDROID_PLAY_SERVICES_MEASUREMENT_AAR ''', r''' $ANDROID_PLAY_SERVICES_MEASUREMENT_AAR ''')
    (''' ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_LIB ''', r''' $ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_LIB ''')
    (''' ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_RES ''', r''' $ANDROID_PLAY_SERVICES_MEASUREMENT_AAR_RES ''')
    (''' MOZ_INSTALL_TRACKING ''', r''' $MOZ_INSTALL_TRACKING ''')
    (''' ANDROID_PLAY_SERVICES_ADS_AAR ''', r''' $ANDROID_PLAY_SERVICES_ADS_AAR ''')
    (''' ANDROID_PLAY_SERVICES_ADS_AAR_LIB ''', r''' $ANDROID_PLAY_SERVICES_ADS_AAR_LIB ''')
    (''' ANDROID_PLAY_SERVICES_ADS_AAR_RES ''', r''' $ANDROID_PLAY_SERVICES_ADS_AAR_RES ''')
    (''' _PANGOCHK_CFLAGS ''', list(r''' $_PANGOCHK_CFLAGS '''.split()))
    (''' _PANGOCHK_LIBS ''', list(r''' $_PANGOCHK_LIBS '''.split()))
    (''' MOZ_PANGO_CFLAGS ''', list(r''' $MOZ_PANGO_CFLAGS '''.split()))
    (''' MOZ_PANGO_LIBS ''', list(r''' $MOZ_PANGO_LIBS '''.split()))
    (''' _GTKCHECK_CFLAGS ''', list(r''' $_GTKCHECK_CFLAGS '''.split()))
    (''' _GTKCHECK_LIBS ''', list(r''' $_GTKCHECK_LIBS '''.split()))
    (''' MOZ_GIO_CFLAGS ''', list(r''' $MOZ_GIO_CFLAGS '''.split()))
    (''' MOZ_GIO_LIBS ''', list(r''' $MOZ_GIO_LIBS '''.split()))
    (''' MOZ_ENABLE_GIO ''', r''' $MOZ_ENABLE_GIO ''')
    (''' MOZ_GCONF_CFLAGS ''', list(r''' $MOZ_GCONF_CFLAGS '''.split()))
    (''' MOZ_GCONF_LIBS ''', list(r''' $MOZ_GCONF_LIBS '''.split()))
    (''' MOZ_ENABLE_GCONF ''', r''' $MOZ_ENABLE_GCONF ''')
    (''' MOZ_LIBPROXY_CFLAGS ''', list(r''' $MOZ_LIBPROXY_CFLAGS '''.split()))
    (''' MOZ_LIBPROXY_LIBS ''', list(r''' $MOZ_LIBPROXY_LIBS '''.split()))
    (''' MOZ_ENABLE_LIBPROXY ''', r''' $MOZ_ENABLE_LIBPROXY ''')
    (''' MOZ_GNOMEUI_CFLAGS ''', list(r''' $MOZ_GNOMEUI_CFLAGS '''.split()))
    (''' MOZ_GNOMEUI_LIBS ''', list(r''' $MOZ_GNOMEUI_LIBS '''.split()))
    (''' MOZ_ENABLE_GNOMEUI ''', r''' $MOZ_ENABLE_GNOMEUI ''')
    (''' MOZ_DBUS_CFLAGS ''', list(r''' $MOZ_DBUS_CFLAGS '''.split()))
    (''' MOZ_DBUS_LIBS ''', list(r''' $MOZ_DBUS_LIBS '''.split()))
    (''' MOZ_DBUS_GLIB_CFLAGS ''', list(r''' $MOZ_DBUS_GLIB_CFLAGS '''.split()))
    (''' MOZ_DBUS_GLIB_LIBS ''', list(r''' $MOZ_DBUS_GLIB_LIBS '''.split()))
    (''' MOZ_ENABLE_DBUS ''', r''' $MOZ_ENABLE_DBUS ''')
    (''' MOZ_SYNTH_SPEECHD ''', r''' $MOZ_SYNTH_SPEECHD ''')
    (''' MOZ_IPDL_TESTS ''', r''' $MOZ_IPDL_TESTS ''')
    (''' MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI ''', r''' $MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI ''')
    (''' MOZ_WEBRTC ''', r''' $MOZ_WEBRTC ''')
    (''' MOZ_WEBRTC_SIGNALING ''', r''' $MOZ_WEBRTC_SIGNALING ''')
    (''' MOZ_PEERCONNECTION ''', r''' $MOZ_PEERCONNECTION ''')
    (''' MOZ_WEBRTC_ASSERT_ALWAYS ''', r''' $MOZ_WEBRTC_ASSERT_ALWAYS ''')
    (''' MOZ_WEBRTC_HARDWARE_AEC_NS ''', r''' $MOZ_WEBRTC_HARDWARE_AEC_NS ''')
    (''' MOZ_SCTP ''', r''' $MOZ_SCTP ''')
    (''' MOZ_SRTP ''', r''' $MOZ_SRTP ''')
    (''' MOZ_WEBRTC_X11_LIBS ''', list(r''' $MOZ_WEBRTC_X11_LIBS '''.split()))
    (''' MOZ_SAMPLE_TYPE_S16 ''', r''' $MOZ_SAMPLE_TYPE_S16 ''')
    (''' MOZ_SAMPLE_TYPE_FLOAT32 ''', r''' $MOZ_SAMPLE_TYPE_FLOAT32 ''')
    (''' MOZ_WEBSPEECH_POCKETSPHINX ''', r''' $MOZ_WEBSPEECH_POCKETSPHINX ''')
    (''' MOZ_WEBSPEECH ''', r''' $MOZ_WEBSPEECH ''')
    (''' MOZ_WEBSPEECH_TEST_BACKEND ''', r''' $MOZ_WEBSPEECH_TEST_BACKEND ''')
    (''' MOZ_WEBSPEECH_MODELS ''', r''' $MOZ_WEBSPEECH_MODELS ''')
    (''' MOZ_RAW ''', r''' $MOZ_RAW ''')
    (''' MOZ_GONK_MEDIACODEC ''', r''' $MOZ_GONK_MEDIACODEC ''')
    (''' MOZ_LIBVPX_CFLAGS ''', list(r''' $MOZ_LIBVPX_CFLAGS '''.split()))
    (''' MOZ_LIBVPX_LIBS ''', list(r''' $MOZ_LIBVPX_LIBS '''.split()))
    (''' MOZ_SYSTEM_LIBVPX ''', r''' $MOZ_SYSTEM_LIBVPX ''')
    (''' MOZ_WEBM_ENCODER ''', r''' $MOZ_WEBM_ENCODER ''')
    (''' MOZ_ALSA_CFLAGS ''', list(r''' $MOZ_ALSA_CFLAGS '''.split()))
    (''' MOZ_ALSA_LIBS ''', list(r''' $MOZ_ALSA_LIBS '''.split()))
    (''' MOZ_ALSA ''', r''' $MOZ_ALSA ''')
    (''' MOZ_PULSEAUDIO_CFLAGS ''', list(r''' $MOZ_PULSEAUDIO_CFLAGS '''.split()))
    (''' MOZ_PULSEAUDIO_LIBS ''', list(r''' $MOZ_PULSEAUDIO_LIBS '''.split()))
    (''' MOZ_PULSEAUDIO ''', r''' $MOZ_PULSEAUDIO ''')
    (''' MOZ_PERMISSIONS ''', r''' $MOZ_PERMISSIONS ''')
    (''' MOZ_CHILD_PERMISSIONS ''', r''' $MOZ_CHILD_PERMISSIONS ''')
    (''' MOZ_GAMEPAD ''', r''' $MOZ_GAMEPAD ''')
    (''' MOZ_GAMEPAD_BACKEND ''', r''' $MOZ_GAMEPAD_BACKEND ''')
    (''' MOZ_GTHREAD_CFLAGS ''', list(r''' $MOZ_GTHREAD_CFLAGS '''.split()))
    (''' MOZ_GTHREAD_LIBS ''', list(r''' $MOZ_GTHREAD_LIBS '''.split()))
    (''' MOZ_GIO_COMPONENT ''', r''' $MOZ_GIO_COMPONENT ''')
    (''' MOZ_TREE_FREETYPE ''', r''' $MOZ_TREE_FREETYPE ''')
    (''' CAIRO_FT_CFLAGS ''', list(r''' $CAIRO_FT_CFLAGS '''.split()))
    (''' MAKENSISU ''', r''' $MAKENSISU ''')
    (''' WGET ''', r''' $WGET ''')
    (''' MOZ_DISABLE_PARENTAL_CONTROLS ''', r''' $MOZ_DISABLE_PARENTAL_CONTROLS ''')
    (''' MOZ_NO_SMART_CARDS ''', r''' $MOZ_NO_SMART_CARDS ''')
    (''' MOZ_NO_EV_CERTS ''', r''' $MOZ_NO_EV_CERTS ''')
    (''' MOZ_CONTENT_SANDBOX ''', r''' $MOZ_CONTENT_SANDBOX ''')
    (''' MOZ_GMP_SANDBOX ''', r''' $MOZ_GMP_SANDBOX ''')
    (''' MOZ_SANDBOX ''', r''' $MOZ_SANDBOX ''')
    (''' SQLITE_CFLAGS ''', list(r''' $SQLITE_CFLAGS '''.split()))
    (''' SQLITE_LIBS ''', list(r''' $SQLITE_LIBS '''.split()))
    (''' MOZ_SYSTEM_SQLITE ''', r''' $MOZ_SYSTEM_SQLITE ''')
    (''' MOZ_SAFE_BROWSING ''', r''' $MOZ_SAFE_BROWSING ''')
    (''' MOZ_URL_CLASSIFIER ''', r''' $MOZ_URL_CLASSIFIER ''')
    (''' MOZ_ZIPWRITER ''', r''' $MOZ_ZIPWRITER ''')
    (''' MOZ_THEME_FASTSTRIPE ''', r''' $MOZ_THEME_FASTSTRIPE ''')
    (''' MOZ_GFX_OPTIMIZE_MOBILE ''', r''' $MOZ_GFX_OPTIMIZE_MOBILE ''')
    (''' MOZ_OPTIMIZE ''', r''' $MOZ_OPTIMIZE ''')
    (''' MOZ_FRAMEPTR_FLAGS ''', r''' $MOZ_FRAMEPTR_FLAGS ''')
    (''' MOZ_OPTIMIZE_FLAGS ''', r''' $MOZ_OPTIMIZE_FLAGS ''')
    (''' MOZ_OPTIMIZE_RUSTFLAGS ''', r''' $MOZ_OPTIMIZE_RUSTFLAGS ''')
    (''' MOZ_OPTIMIZE_LDFLAGS ''', r''' $MOZ_OPTIMIZE_LDFLAGS ''')
    (''' MOZ_ALLOW_HEAP_EXECUTE_FLAGS ''', list(r''' $MOZ_ALLOW_HEAP_EXECUTE_FLAGS '''.split()))
    (''' MOZ_PGO ''', r''' $MOZ_PGO ''')
    (''' MOZ_PGO_OPTIMIZE_FLAGS ''', r''' $MOZ_PGO_OPTIMIZE_FLAGS ''')
    (''' MOZ_STACKWALKING ''', r''' $MOZ_STACKWALKING ''')
    (''' MOZ_REPLACE_MALLOC_LINKAGE ''', r''' $MOZ_REPLACE_MALLOC_LINKAGE ''')
    (''' MOZ_SYSTEM_JEMALLOC ''', r''' $MOZ_SYSTEM_JEMALLOC ''')
    (''' MOZ_CRT ''', r''' $MOZ_CRT ''')
    (''' MOZ_GLUE_IN_PROGRAM ''', r''' $MOZ_GLUE_IN_PROGRAM ''')
    (''' WIN32_CRT_LIBS ''', list(r''' $WIN32_CRT_LIBS '''.split()))
    (''' MOZ_GLUE_WRAP_LDFLAGS ''', list(r''' $MOZ_GLUE_WRAP_LDFLAGS '''.split()))
    (''' LLVM_CXXFLAGS ''', r''' $LLVM_CXXFLAGS ''')
    (''' LLVM_LDFLAGS ''', r''' $LLVM_LDFLAGS ''')
    (''' CLANG_LDFLAGS ''', r''' $CLANG_LDFLAGS ''')
    (''' ENABLE_CLANG_PLUGIN ''', r''' $ENABLE_CLANG_PLUGIN ''')
    (''' MOZ_LIBSTDCXX_TARGET_VERSION ''', r''' $MOZ_LIBSTDCXX_TARGET_VERSION ''')
    (''' MOZ_LIBSTDCXX_HOST_VERSION ''', r''' $MOZ_LIBSTDCXX_HOST_VERSION ''')
    (''' DEBUG_JS_MODULES ''', r''' $DEBUG_JS_MODULES ''')
    (''' MOZ_TASK_TRACER ''', r''' $MOZ_TASK_TRACER ''')
    (''' MOZ_HORIZON ''', r''' $MOZ_HORIZON ''')
    (''' MOZ_DISABLE_STARTUPCACHE ''', r''' $MOZ_DISABLE_STARTUPCACHE ''')
    (''' GAIADIR ''', r''' $GAIADIR ''')
    (''' FXOS_SIMULATOR ''', r''' $FXOS_SIMULATOR ''')
    (''' MOZ_B2G_RIL ''', r''' $MOZ_B2G_RIL ''')
    (''' MOZ_B2G_FM ''', r''' $MOZ_B2G_FM ''')
    (''' MOZ_B2G_BT ''', r''' $MOZ_B2G_BT ''')
    (''' MOZ_B2G_BT_BLUEZ ''', r''' $MOZ_B2G_BT_BLUEZ ''')
    (''' MOZ_B2G_BT_DAEMON ''', r''' $MOZ_B2G_BT_DAEMON ''')
    (''' MOZ_NFC ''', r''' $MOZ_NFC ''')
    (''' MOZ_SYNTH_PICO ''', r''' $MOZ_SYNTH_PICO ''')
    (''' MOZ_TIME_MANAGER ''', r''' $MOZ_TIME_MANAGER ''')
    (''' MOZ_B2G_CAMERA ''', r''' $MOZ_B2G_CAMERA ''')
    (''' MOZ_SIMPLEPUSH ''', r''' $MOZ_SIMPLEPUSH ''')
    (''' MOZ_PAY ''', r''' $MOZ_PAY ''')
    (''' MOZ_ACTIVITIES ''', r''' $MOZ_ACTIVITIES ''')
    (''' MOZ_AUDIO_CHANNEL_MANAGER ''', r''' $MOZ_AUDIO_CHANNEL_MANAGER ''')
    (''' MOZ_SECUREELEMENT ''', r''' $MOZ_SECUREELEMENT ''')
    (''' MOZ_DEMANGLE_SYMBOLS ''', r''' $MOZ_DEMANGLE_SYMBOLS ''')
    (''' DISABLE_MOZ_RIL_GEOLOC ''', r''' $DISABLE_MOZ_RIL_GEOLOC ''')
    (''' MOZ_SERVO_LIBS ''', list(r''' $MOZ_SERVO_LIBS '''.split()))
    (''' MOZ_DOC_INPUT_DIRS ''', r''' $MOZ_DOC_INPUT_DIRS ''')
    (''' MOZ_DOC_INCLUDE_DIRS ''', r''' $MOZ_DOC_INCLUDE_DIRS ''')
    (''' MOZ_DOC_OUTPUT_DIR ''', r''' $MOZ_DOC_OUTPUT_DIR ''')
    (''' PROFILE_GEN_CFLAGS ''', r''' $PROFILE_GEN_CFLAGS ''')
    (''' PROFILE_GEN_LDFLAGS ''', r''' $PROFILE_GEN_LDFLAGS ''')
    (''' PROFILE_USE_CFLAGS ''', r''' $PROFILE_USE_CFLAGS ''')
    (''' PROFILE_USE_LDFLAGS ''', r''' $PROFILE_USE_LDFLAGS ''')
    (''' LIBS_DESC_SUFFIX ''', r''' $LIBS_DESC_SUFFIX ''')
    (''' EXPAND_LIBS_LIST_STYLE ''', r''' $EXPAND_LIBS_LIST_STYLE ''')
    (''' EXPAND_LIBS_ORDER_STYLE ''', r''' $EXPAND_LIBS_ORDER_STYLE ''')
    (''' CL_INCLUDES_PREFIX ''', r''' $CL_INCLUDES_PREFIX ''')
    (''' NONASCII ''', r''' $NONASCII ''')
    (''' ZLIB_IN_MOZGLUE ''', r''' $ZLIB_IN_MOZGLUE ''')
    (''' GLIB_CFLAGS ''', list(r''' $GLIB_CFLAGS '''.split()))
    (''' GLIB_LIBS ''', list(r''' $GLIB_LIBS '''.split()))
    (''' GLIB_GMODULE_LIBS ''', list(r''' $GLIB_GMODULE_LIBS '''.split()))
    (''' FT2_CFLAGS ''', list(r''' $FT2_CFLAGS '''.split()))
    (''' FT2_LIBS ''', list(r''' $FT2_LIBS '''.split()))
    (''' _FONTCONFIG_CFLAGS ''', list(r''' $_FONTCONFIG_CFLAGS '''.split()))
    (''' _FONTCONFIG_LIBS ''', list(r''' $_FONTCONFIG_LIBS '''.split()))
    (''' MOZ_PIXMAN_CFLAGS ''', list(r''' $MOZ_PIXMAN_CFLAGS '''.split()))
    (''' MOZ_PIXMAN_LIBS ''', list(r''' $MOZ_PIXMAN_LIBS '''.split()))
    (''' HAVE_INTTYPES_H ''', r''' $HAVE_INTTYPES_H ''')
    (''' MOZ_ENABLE_CAIRO_FT ''', r''' $MOZ_ENABLE_CAIRO_FT ''')
    (''' MOZ_ENABLE_DWRITE_FONT ''', r''' $MOZ_ENABLE_DWRITE_FONT ''')
    (''' MOZ_ENABLE_D2D_SURFACE ''', r''' $MOZ_ENABLE_D2D_SURFACE ''')
    (''' MOZ_ENABLE_D3D9_LAYER ''', r''' $MOZ_ENABLE_D3D9_LAYER ''')
    (''' MOZ_ENABLE_D3D10_LAYER ''', r''' $MOZ_ENABLE_D3D10_LAYER ''')
    (''' PS_SURFACE_FEATURE ''', r''' $PS_SURFACE_FEATURE ''')
    (''' SVG_SURFACE_FEATURE ''', r''' $SVG_SURFACE_FEATURE ''')
    (''' XLIB_SURFACE_FEATURE ''', r''' $XLIB_SURFACE_FEATURE ''')
    (''' XLIB_XRENDER_SURFACE_FEATURE ''', r''' $XLIB_XRENDER_SURFACE_FEATURE ''')
    (''' QUARTZ_SURFACE_FEATURE ''', r''' $QUARTZ_SURFACE_FEATURE ''')
    (''' QUARTZ_IMAGE_SURFACE_FEATURE ''', r''' $QUARTZ_IMAGE_SURFACE_FEATURE ''')
    (''' WIN32_SURFACE_FEATURE ''', r''' $WIN32_SURFACE_FEATURE ''')
    (''' OS2_SURFACE_FEATURE ''', r''' $OS2_SURFACE_FEATURE ''')
    (''' DIRECTFB_SURFACE_FEATURE ''', r''' $DIRECTFB_SURFACE_FEATURE ''')
    (''' FT_FONT_FEATURE ''', r''' $FT_FONT_FEATURE ''')
    (''' FC_FONT_FEATURE ''', r''' $FC_FONT_FEATURE ''')
    (''' WIN32_FONT_FEATURE ''', r''' $WIN32_FONT_FEATURE ''')
    (''' WIN32_DWRITE_FONT_FEATURE ''', r''' $WIN32_DWRITE_FONT_FEATURE ''')
    (''' WIN32_D2D_SURFACE_FEATURE ''', r''' $WIN32_D2D_SURFACE_FEATURE ''')
    (''' QUARTZ_FONT_FEATURE ''', r''' $QUARTZ_FONT_FEATURE ''')
    (''' PNG_FUNCTIONS_FEATURE ''', r''' $PNG_FUNCTIONS_FEATURE ''')
    (''' QT_SURFACE_FEATURE ''', r''' $QT_SURFACE_FEATURE ''')
    (''' TEE_SURFACE_FEATURE ''', r''' $TEE_SURFACE_FEATURE ''')
    (''' CAIRO_CFLAGS ''', list(r''' $CAIRO_CFLAGS '''.split()))
    (''' CAIRO_LIBS ''', list(r''' $CAIRO_LIBS '''.split()))
    (''' CAIRO_TEE_CFLAGS ''', list(r''' $CAIRO_TEE_CFLAGS '''.split()))
    (''' CAIRO_TEE_LIBS ''', list(r''' $CAIRO_TEE_LIBS '''.split()))
    (''' CAIRO_XRENDER_CFLAGS ''', list(r''' $CAIRO_XRENDER_CFLAGS '''.split()))
    (''' CAIRO_XRENDER_LIBS ''', list(r''' $CAIRO_XRENDER_LIBS '''.split()))
    (''' MOZ_TREE_CAIRO ''', r''' $MOZ_TREE_CAIRO ''')
    (''' MOZ_CAIRO_CFLAGS ''', list(r''' $MOZ_CAIRO_CFLAGS '''.split()))
    (''' MOZ_CAIRO_LIBS ''', list(r''' $MOZ_CAIRO_LIBS '''.split()))
    (''' MOZ_CAIRO_OSLIBS ''', list(r''' $MOZ_CAIRO_OSLIBS '''.split()))
    (''' MOZ_TREE_PIXMAN ''', r''' $MOZ_TREE_PIXMAN ''')
    (''' MOZ_ENABLE_SKIA_GPU ''', r''' $MOZ_ENABLE_SKIA_GPU ''')
    (''' MOZ_ENABLE_SKIA ''', r''' $MOZ_ENABLE_SKIA ''')
    (''' SKIA_INCLUDES ''', list(r''' $SKIA_INCLUDES '''.split()))
    (''' MOZ_XUL ''', r''' $MOZ_XUL ''')
    (''' NECKO_PROTOCOLS ''', unique_list(r''' $NECKO_PROTOCOLS '''.split()))
    (''' NECKO_WIFI ''', r''' $NECKO_WIFI ''')
    (''' NECKO_WIFI_DBUS ''', r''' $NECKO_WIFI_DBUS ''')
    (''' NECKO_COOKIES ''', r''' $NECKO_COOKIES ''')
    (''' ENABLE_MARIONETTE ''', r''' $ENABLE_MARIONETTE ''')
    (''' BUILD_CTYPES ''', r''' $BUILD_CTYPES ''')
    (''' AR_FLAGS ''', r''' $AR_FLAGS ''')
    (''' AR_EXTRACT ''', r''' $AR_EXTRACT ''')
    (''' ASFLAGS ''', r''' $ASFLAGS ''')
    (''' AS_DASH_C_FLAG ''', r''' $AS_DASH_C_FLAG ''')
    (''' RC ''', r''' $RC ''')
    (''' RCFLAGS ''', r''' $RCFLAGS ''')
    (''' MC ''', r''' $MC ''')
    (''' IMPLIB ''', r''' $IMPLIB ''')
    (''' FILTER ''', r''' $FILTER ''')
    (''' BIN_FLAGS ''', r''' $BIN_FLAGS ''')
    (''' MOZ_AUTH_EXTENSION ''', r''' $MOZ_AUTH_EXTENSION ''')
    (''' MOZ_PREF_EXTENSIONS ''', r''' $MOZ_PREF_EXTENSIONS ''')
    (''' MOZ_DEBUG ''', r''' $MOZ_DEBUG ''')
    (''' MOZ_DEBUG_SYMBOLS ''', r''' $MOZ_DEBUG_SYMBOLS ''')
    (''' MOZ_DEBUG_LDFLAGS ''', r''' $MOZ_DEBUG_LDFLAGS ''')
    (''' WARNINGS_AS_ERRORS ''', r''' $WARNINGS_AS_ERRORS ''')
    (''' MOZ_EXTENSIONS ''', unique_list(r''' $MOZ_EXTENSIONS '''.split()))
    (''' LIBICONV ''', r''' $LIBICONV ''')
    (''' MOZ_TOOLKIT_SEARCH ''', r''' $MOZ_TOOLKIT_SEARCH ''')
    (''' MOZ_FEEDS ''', r''' $MOZ_FEEDS ''')
    (''' NS_PRINTING ''', r''' $NS_PRINTING ''')
    (''' MOZ_HELP_VIEWER ''', r''' $MOZ_HELP_VIEWER ''')
    (''' MOZ_UNIVERSALCHARDET ''', r''' $MOZ_UNIVERSALCHARDET ''')
    (''' ACCESSIBILITY ''', r''' $ACCESSIBILITY ''')
    (''' MOZ_SPELLCHECK ''', r''' $MOZ_SPELLCHECK ''')
    (''' MOZ_ANDROID_ANR_REPORTER ''', r''' $MOZ_ANDROID_ANR_REPORTER ''')
    (''' MOZ_CRASHREPORTER ''', r''' $MOZ_CRASHREPORTER ''')
    (''' MOZ_CRASHREPORTER_INJECTOR ''', r''' $MOZ_CRASHREPORTER_INJECTOR ''')
    (''' MOZ_CRASHREPORTER_UPLOAD_FULL_SYMBOLS ''', r''' $MOZ_CRASHREPORTER_UPLOAD_FULL_SYMBOLS ''')
    (''' MOZ_MAINTENANCE_SERVICE ''', r''' $MOZ_MAINTENANCE_SERVICE ''')
    (''' MOZ_STUB_INSTALLER ''', r''' $MOZ_STUB_INSTALLER ''')
    (''' MOZ_VERIFY_MAR_SIGNATURE ''', r''' $MOZ_VERIFY_MAR_SIGNATURE ''')
    (''' MOZ_ENABLE_SIGNMAR ''', r''' $MOZ_ENABLE_SIGNMAR ''')
    (''' MOZ_UPDATER ''', r''' $MOZ_UPDATER ''')
    (''' MOZ_ANGLE_RENDERER ''', r''' $MOZ_ANGLE_RENDERER ''')
    (''' MOZ_D3D_CPU_SUFFIX ''', r''' $MOZ_D3D_CPU_SUFFIX ''')
    (''' MOZ_HAS_WINSDK_WITH_D3D ''', r''' $MOZ_HAS_WINSDK_WITH_D3D ''')
    (''' MOZ_D3DCOMPILER_VISTA_DLL ''', r''' $MOZ_D3DCOMPILER_VISTA_DLL ''')
    (''' MOZ_D3DCOMPILER_VISTA_DLL_PATH ''', r''' $MOZ_D3DCOMPILER_VISTA_DLL_PATH ''')
    (''' MOZ_DIRECTX_SDK_PATH ''', r''' $MOZ_DIRECTX_SDK_PATH ''')
    (''' MOZ_D3DCOMPILER_XP_DLL ''', r''' $MOZ_D3DCOMPILER_XP_DLL ''')
    (''' MOZ_D3DCOMPILER_XP_CAB ''', r''' $MOZ_D3DCOMPILER_XP_CAB ''')
    (''' MOZ_WEBSMS_BACKEND ''', r''' $MOZ_WEBSMS_BACKEND ''')
    (''' MOZ_DISABLE_GECKOVIEW ''', r''' $MOZ_DISABLE_GECKOVIEW ''')
    (''' MOZ_ANDROID_GECKOLIBS_AAR ''', r''' $MOZ_ANDROID_GECKOLIBS_AAR ''')
    (''' MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER ''', r''' $MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER ''')
    (''' MOZ_ANDROID_APPLICATION_CLASS ''', r''' $MOZ_ANDROID_APPLICATION_CLASS ''')
    (''' MOZ_ANDROID_BROWSER_INTENT_CLASS ''', r''' $MOZ_ANDROID_BROWSER_INTENT_CLASS ''')
    (''' MOZ_ANDROID_SEARCH_INTENT_CLASS ''', r''' $MOZ_ANDROID_SEARCH_INTENT_CLASS ''')
    (''' MOZ_EXCLUDE_HYPHENATION_DICTIONARIES ''', r''' $MOZ_EXCLUDE_HYPHENATION_DICTIONARIES ''')
    (''' ENABLE_STRIP ''', r''' $ENABLE_STRIP ''')
    (''' PKG_SKIP_STRIP ''', r''' $PKG_SKIP_STRIP ''')
    (''' STRIP_FLAGS ''', r''' $STRIP_FLAGS ''')
    (''' USE_ELF_HACK ''', r''' $USE_ELF_HACK ''')
    (''' INCREMENTAL_LINKER ''', r''' $INCREMENTAL_LINKER ''')
    (''' MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS ''', r''' $MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS ''')
    (''' MOZ_FIX_LINK_PATHS ''', r''' $MOZ_FIX_LINK_PATHS ''')
    (''' MOZ_POST_PROGRAM_COMMAND ''', r''' $MOZ_POST_PROGRAM_COMMAND ''')
    (''' MOZ_LINKER_EXTRACT ''', r''' $MOZ_LINKER_EXTRACT ''')
    (''' MOZ_ADDON_SIGNING ''', r''' $MOZ_ADDON_SIGNING ''')
    (''' MOZ_REQUIRE_SIGNING ''', r''' $MOZ_REQUIRE_SIGNING ''')
    (''' MOZ_JSDOWNLOADS ''', r''' $MOZ_JSDOWNLOADS ''')
    (''' MOZ_MACBUNDLE_NAME ''', r''' $MOZ_MACBUNDLE_NAME ''')
    (''' MOZ_MACBUNDLE_ID ''', r''' $MOZ_MACBUNDLE_ID ''')
    (''' MOZ_CHILD_PROCESS_NAME_PIE ''', r''' $MOZ_CHILD_PROCESS_NAME_PIE ''')
    (''' MOZ_CHILD_PROCESS_NAME ''', r''' $MOZ_CHILD_PROCESS_NAME ''')
    (''' MOZ_CHILD_PROCESS_BUNDLE ''', r''' $MOZ_CHILD_PROCESS_BUNDLE ''')
    (''' MOZ_APP_NAME ''', r''' $MOZ_APP_NAME ''')
    (''' MOZ_APP_REMOTINGNAME ''', r''' $MOZ_APP_REMOTINGNAME ''')
    (''' MOZ_APP_DISPLAYNAME ''', r''' $MOZ_APP_DISPLAYNAME ''')
    (''' MOZ_APP_BASENAME ''', r''' $MOZ_APP_BASENAME ''')
    (''' MOZ_APP_VENDOR ''', r''' $MOZ_APP_VENDOR ''')
    (''' MOZ_APP_PROFILE ''', r''' $MOZ_APP_PROFILE ''')
    (''' MOZ_APP_ID ''', r''' $MOZ_APP_ID ''')
    (''' MOZ_APP_ANDROID_VERSION_CODE ''', r''' $MOZ_APP_ANDROID_VERSION_CODE ''')
    (''' MOZ_ANDROID_SHARED_ID ''', r''' $MOZ_ANDROID_SHARED_ID ''')
    (''' MOZ_ANDROID_GCM_SENDERID ''', r''' $MOZ_ANDROID_GCM_SENDERID ''')
    (''' MAR_CHANNEL_ID ''', r''' $MAR_CHANNEL_ID ''')
    (''' ACCEPTED_MAR_CHANNEL_IDS ''', r''' $ACCEPTED_MAR_CHANNEL_IDS ''')
    (''' MOZ_PROFILE_MIGRATOR ''', r''' $MOZ_PROFILE_MIGRATOR ''')
    (''' MOZ_APP_UA_NAME ''', r''' $MOZ_APP_UA_NAME ''')
    (''' MOZ_APP_VERSION ''', r''' $MOZ_APP_VERSION ''')
    (''' MOZ_APP_VERSION_DISPLAY ''', r''' $MOZ_APP_VERSION_DISPLAY ''')
    (''' MOZ_APP_MAXVERSION ''', r''' $MOZ_APP_MAXVERSION ''')
    (''' FIREFOX_VERSION ''', r''' $FIREFOX_VERSION ''')
    (''' MOZ_UA_OS_AGNOSTIC ''', r''' $MOZ_UA_OS_AGNOSTIC ''')
    (''' MOZ_APP_STATIC_INI ''', r''' $MOZ_APP_STATIC_INI ''')
    (''' MOZ_PKG_SPECIAL ''', r''' $MOZ_PKG_SPECIAL ''')
    (''' MOZ_SIMPLE_PACKAGE_NAME ''', r''' $MOZ_SIMPLE_PACKAGE_NAME ''')
    (''' MOZILLA_OFFICIAL ''', r''' $MOZILLA_OFFICIAL ''')
    (''' MOZ_SOURCE_REPO ''', r''' $MOZ_SOURCE_REPO ''')
    (''' MOZ_SOURCE_CHANGESET ''', r''' $MOZ_SOURCE_CHANGESET ''')
    (''' MOZ_INCLUDE_SOURCE_INFO ''', r''' $MOZ_INCLUDE_SOURCE_INFO ''')
    (''' MOZ_DATA_REPORTING ''', r''' $MOZ_DATA_REPORTING ''')
    (''' WIN32_REDIST_DIR ''', r''' $WIN32_REDIST_DIR ''')
    (''' WIN_UCRT_REDIST_DIR ''', r''' $WIN_UCRT_REDIST_DIR ''')
    (''' _DEPEND_CFLAGS ''', r''' $_DEPEND_CFLAGS ''')
    (''' MOZ_SYSTEM_JPEG ''', r''' $MOZ_SYSTEM_JPEG ''')
    (''' MOZ_SYSTEM_PNG ''', r''' $MOZ_SYSTEM_PNG ''')
    (''' MOZ_SYSTEM_BZ2 ''', r''' $MOZ_SYSTEM_BZ2 ''')
    (''' MOZ_JPEG_CFLAGS ''', list(r''' $MOZ_JPEG_CFLAGS '''.split()))
    (''' MOZ_JPEG_LIBS ''', list(r''' $MOZ_JPEG_LIBS '''.split()))
    (''' MOZ_BZ2_CFLAGS ''', list(r''' $MOZ_BZ2_CFLAGS '''.split()))
    (''' MOZ_BZ2_LIBS ''', list(r''' $MOZ_BZ2_LIBS '''.split()))
    (''' MOZ_PNG_CFLAGS ''', list(r''' $MOZ_PNG_CFLAGS '''.split()))
    (''' MOZ_PNG_LIBS ''', list(r''' $MOZ_PNG_LIBS '''.split()))
    (''' MOZ_NUWA_PROCESS ''', r''' $MOZ_NUWA_PROCESS ''')
    (''' MOZ_B2G_LOADER ''', r''' $MOZ_B2G_LOADER ''')
    (''' MOZ_SYSTEM_NSPR ''', r''' $MOZ_SYSTEM_NSPR ''')
    (''' MOZ_SYSTEM_NSS ''', r''' $MOZ_SYSTEM_NSS ''')
    (''' NSS_DISABLE_DBM ''', r''' $NSS_DISABLE_DBM ''')
    (''' HOST_CMFLAGS ''', r''' $HOST_CMFLAGS ''')
    (''' HOST_CMMFLAGS ''', r''' $HOST_CMMFLAGS ''')
    (''' OS_COMPILE_CMFLAGS ''', r''' $OS_COMPILE_CMFLAGS ''')
    (''' OS_COMPILE_CMMFLAGS ''', r''' $OS_COMPILE_CMMFLAGS ''')
    (''' OS_CFLAGS ''', r''' $OS_CFLAGS ''')
    (''' OS_CXXFLAGS ''', r''' $OS_CXXFLAGS ''')
    (''' OS_CPPFLAGS ''', r''' $OS_CPPFLAGS ''')
    (''' OS_COMPILE_CFLAGS ''', r''' $OS_COMPILE_CFLAGS ''')
    (''' OS_COMPILE_CXXFLAGS ''', r''' $OS_COMPILE_CXXFLAGS ''')
    (''' OS_LDFLAGS ''', r''' $OS_LDFLAGS ''')
    (''' OS_LIBS ''', r''' $OS_LIBS ''')
    (''' HOST_CC ''', r''' $HOST_CC ''')
    (''' HOST_CXX ''', r''' $HOST_CXX ''')
    (''' HOST_CFLAGS ''', r''' $HOST_CFLAGS ''')
    (''' HOST_CPPFLAGS ''', r''' $HOST_CPPFLAGS ''')
    (''' HOST_CXXFLAGS ''', r''' $HOST_CXXFLAGS ''')
    (''' HOST_LDFLAGS ''', r''' $HOST_LDFLAGS ''')
    (''' HOST_OPTIMIZE_FLAGS ''', r''' $HOST_OPTIMIZE_FLAGS ''')
    (''' HOST_AR_FLAGS ''', r''' $HOST_AR_FLAGS ''')
    (''' HOST_LD ''', r''' $HOST_LD ''')
    (''' HOST_BIN_SUFFIX ''', r''' $HOST_BIN_SUFFIX ''')
    (''' RUSTFLAGS ''', r''' $RUSTFLAGS ''')
    (''' TARGET_XPCOM_ABI ''', r''' $TARGET_XPCOM_ABI ''')
    (''' HAVE_TOOLCHAIN_SUPPORT_MSSSE3 ''', r''' $HAVE_TOOLCHAIN_SUPPORT_MSSSE3 ''')
    (''' HAVE_TOOLCHAIN_SUPPORT_MSSE4_1 ''', r''' $HAVE_TOOLCHAIN_SUPPORT_MSSE4_1 ''')
    (''' HAVE_X86_AVX2 ''', r''' $HAVE_X86_AVX2 ''')
    (''' GCC_USE_GNU_LD ''', r''' $GCC_USE_GNU_LD ''')
    (''' WRAP_LDFLAGS ''', r''' $WRAP_LDFLAGS ''')
    (''' MKSHLIB ''', r''' $MKSHLIB ''')
    (''' MKCSHLIB ''', r''' $MKCSHLIB ''')
    (''' DSO_CFLAGS ''', r''' $DSO_CFLAGS ''')
    (''' DSO_PIC_CFLAGS ''', r''' $DSO_PIC_CFLAGS ''')
    (''' DSO_LDOPTS ''', r''' $DSO_LDOPTS ''')
    (''' LIB_PREFIX ''', r''' $LIB_PREFIX ''')
    (''' DLL_PREFIX ''', r''' $DLL_PREFIX ''')
    (''' DLL_SUFFIX ''', r''' $DLL_SUFFIX ''')
    (''' LIB_SUFFIX ''', r''' $LIB_SUFFIX ''')
    (''' OBJ_SUFFIX ''', r''' $OBJ_SUFFIX ''')
    (''' BIN_SUFFIX ''', r''' $BIN_SUFFIX ''')
    (''' IMPORT_LIB_SUFFIX ''', r''' $IMPORT_LIB_SUFFIX ''')
    (''' USE_N32 ''', r''' $USE_N32 ''')
    (''' CC_VERSION ''', r''' $CC_VERSION ''')
    (''' MSMANIFEST_TOOL ''', r''' $MSMANIFEST_TOOL ''')
    (''' NS_ENABLE_TSF ''', r''' $NS_ENABLE_TSF ''')
    (''' WIN32_CONSOLE_EXE_LDFLAGS ''', r''' $WIN32_CONSOLE_EXE_LDFLAGS ''')
    (''' WIN32_GUI_EXE_LDFLAGS ''', r''' $WIN32_GUI_EXE_LDFLAGS ''')
    (''' MOZ_VORBIS ''', r''' $MOZ_VORBIS ''')
    (''' MOZ_TREMOR ''', r''' $MOZ_TREMOR ''')
    (''' MOZ_FFVPX ''', r''' $MOZ_FFVPX ''')
    (''' FFVPX_ASFLAGS ''', list(r''' $FFVPX_ASFLAGS '''.split()))
    (''' MOZ_DIRECTSHOW ''', r''' $MOZ_DIRECTSHOW ''')
    (''' MOZ_ANDROID_OMX ''', r''' $MOZ_ANDROID_OMX ''')
    (''' MOZ_OMX_PLUGIN ''', r''' $MOZ_OMX_PLUGIN ''')
    (''' MOZ_VPX_ERROR_CONCEALMENT ''', r''' $MOZ_VPX_ERROR_CONCEALMENT ''')
    (''' VPX_USE_YASM ''', r''' $VPX_USE_YASM ''')
    (''' VPX_ASFLAGS ''', list(r''' $VPX_ASFLAGS '''.split()))
    (''' VPX_AS_CONVERSION ''', r''' $VPX_AS_CONVERSION ''')
    (''' VPX_X86_ASM ''', r''' $VPX_X86_ASM ''')
    (''' VPX_ARM_ASM ''', r''' $VPX_ARM_ASM ''')
    (''' MOZ_CODE_COVERAGE ''', r''' $MOZ_CODE_COVERAGE ''')
    (''' LIBJPEG_TURBO_USE_YASM ''', r''' $LIBJPEG_TURBO_USE_YASM ''')
    (''' LIBJPEG_TURBO_ASFLAGS ''', list(r''' $LIBJPEG_TURBO_ASFLAGS '''.split()))
    (''' MOZ_LIBAV_FFT ''', r''' $MOZ_LIBAV_FFT ''')
    (''' LIBAV_FFT_ASFLAGS ''', list(r''' $LIBAV_FFT_ASFLAGS '''.split()))
    (''' MOZ_DEVTOOLS ''', r''' $MOZ_DEVTOOLS ''')
    (''' MOZ_PACKAGE_JSSHELL ''', r''' $MOZ_PACKAGE_JSSHELL ''')
    (''' MOZ_FOLD_LIBS ''', r''' $MOZ_FOLD_LIBS ''')
    (''' MOZ_FOLD_LIBS_FLAGS ''', r''' $MOZ_FOLD_LIBS_FLAGS ''')
    (''' SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE ''', r''' $SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE ''')
    (''' MOZ_ENABLE_SZIP ''', r''' $MOZ_ENABLE_SZIP ''')
    (''' MOZ_SZIP_FLAGS ''', r''' $MOZ_SZIP_FLAGS ''')
    (''' DMG_TOOL ''', r''' $DMG_TOOL ''')
    (''' JS_BINARY ''', r''' $JS_BINARY ''')
    (''' NSS_EXTRA_SYMBOLS_FILE ''', r''' $NSS_EXTRA_SYMBOLS_FILE ''')
    (''' A11Y_LOG ''', r''' $A11Y_LOG ''')
    (''' MOZILLA_VERSION ''', r''' $MOZILLA_VERSION ''')
    (''' PREPROCESS_OPTION ''', r''' $PREPROCESS_OPTION ''')
    (''' MOZ_ICU_CFLAGS ''', list(r''' $MOZ_ICU_CFLAGS '''.split()))
    (''' MOZ_ICU_LIBS ''', list(r''' $MOZ_ICU_LIBS '''.split()))
    (''' MOZ_ICU_INCLUDES ''', list(r''' $MOZ_ICU_INCLUDES '''.split()))
    (''' MOZ_SYSTEM_ICU ''', r''' $MOZ_SYSTEM_ICU ''')
    (''' MOZ_ICU_VERSION ''', r''' $MOZ_ICU_VERSION ''')
    (''' ENABLE_INTL_API ''', r''' $ENABLE_INTL_API ''')
    (''' USE_ICU ''', r''' $USE_ICU ''')
    (''' ICU_DATA_FILE ''', r''' $ICU_DATA_FILE ''')
    (''' MOZ_ICU_DATA_ARCHIVE ''', r''' $MOZ_ICU_DATA_ARCHIVE ''')
    (''' MOZ_ENABLE_MASK_AS_SHORTHAND ''', r''' $MOZ_ENABLE_MASK_AS_SHORTHAND ''')
    (''' WIN_TOP_SRC ''', r''' $WIN_TOP_SRC ''')
    (''' top_srcdir ''', r''' $top_srcdir ''')
EOF

for ac_subst_arg in $_subconfigure_ac_subst_args; do
  variable='$'$ac_subst_arg
  echo "    (''' $ac_subst_arg ''', r''' `eval echo $variable` ''')," >> $CONFIG_STATUS
done

cat >> $CONFIG_STATUS <<\EOF
]

non_global_defines = [
EOF

if test -n "$_NON_GLOBAL_ACDEFINES"; then
  for var in $_NON_GLOBAL_ACDEFINES; do
    echo "    '$var'," >> $CONFIG_STATUS
  done
fi

cat >> $CONFIG_STATUS <<EOF
]

flags = [
    '--enable-release',
    '--with-android-cxx-stl',
    '--with-android-version',
    '--with-ios-sdk',
    '--enable-ios-target',
    '--enable-rust',
    '--with-windows-version',
    '--with-unify-dist',
    '--with-macos-sdk',
    '--with-macos-private-frameworks',
    '--with-arch',
    '--with-thumb',
    '--with-thumb-interwork',
    '--with-fpu',
    '--with-float-abi',
    '--with-soft-float',
    '--enable-address-sanitizer',
    '--enable-memory-sanitizer',
    '--enable-thread-sanitizer',
    '--enable-llvm-hacks',
    '--enable-warnings-as-errors',
    '--enable-valgrind',
    '--enable-debug',
    '--with-debug-label',
    '--enable-debug-symbols',
    '--enable-cpp-rtti',
    '--enable-gold',
    '--enable-icf',
    '--enable-pie',
    '--enable-dtrace',
    '--with-linux-headers',
    '--with-pthreads',
    '--with-nspr-cflags',
    '--with-nspr-libs',
    '--enable-nspr-build',
    '--with-system-nspr',
    '--enable-posix-nspr-emulation',
    '--with-system-libevent',
    '--with-system-nss',
    '--with-system-jpeg',
    '--with-system-zlib',
    '--with-system-bz2',
    '--with-system-png',
    '--enable-png-arm-neon-support',
    '--enable-system-ffi',
    '--with-mozilla-api-keyfile',
    '--with-google-api-keyfile',
    '--with-google-oauth-api-keyfile',
    '--with-bing-api-keyfile',
    '--with-adjust-sdk-keyfile',
    '--with-android-distribution-directory',
    '--enable-official-branding',
    '--with-app-name',
    '--with-app-basename',
    '--with-android-sdk',
    '--with-android-min-sdk',
    '--with-android-max-sdk',
    '--enable-startup-notification',
    '--enable-printing',
    '--with-qtdir',
    '--enable-ui-locale',
    '--with-branding',
    '--with-distribution-id',
    '--enable-gio',
    '--enable-gconf',
    '--enable-libproxy',
    '--enable-gnomeui',
    '--enable-dbus',
    '--enable-synth-speechd',
    '--enable-websms-backend',
    '--enable-ipdl-tests',
    '--enable-dbm',
    '--enable-accessibility',
    '--enable-webrtc',
    '--enable-hardware-aec-ns',
    '--enable-webspeech',
    '--enable-webspeechtestbackend',
    '--enable-raw',
    '--enable-directshow',
    '--enable-android-omx',
    '--enable-omx-plugin',
    '--with-system-libvpx',
    '--enable-alsa',
    '--enable-pulseaudio',
    '--enable-permissions',
    '--enable-negotiateauth',
    '--enable-pref-extensions',
    '--enable-system-extension-dirs',
    '--enable-universalchardet',
    '--enable-require-all-d3dc-versions',
    '--enable-gamepad',
    '--enable-crashreporter',
    '--with-crashreporter-enable-percent',
    '--enable-libjpeg-turbo',
    '--enable-extensions',
    '--enable-tree-freetype',
    '--enable-maintenance-service',
    '--enable-bundled-fonts',
    '--enable-verify-mar',
    '--enable-signmar',
    '--enable-updater',
    '--enable-parental-controls',
    '--enable-sandbox',
    '--enable-content-sandbox',
    '--enable-feeds',
    '--enable-system-sqlite',
    '--enable-safe-browsing',
    '--enable-url-classifier',
    '--enable-zipwriter',
    '--enable-faststripe',
    '--enable-mobile-optimize',
    '--enable-optimize',
    '--enable-logrefcnt',
    '--enable-approximate-location',
    '--enable-gps-debug',
    '--enable-dump-painting',
    '--enable-clang-plugin',
    '--enable-strip',
    '--enable-install-strip',
    '--enable-elf-hack',
    '--enable-stdcxx-compat',
    '--enable-debug-js-modules',
    '--enable-tasktracer',
    '--enable-reflow-perf',
    '--enable-startupcache',
    '--enable-b2g-ril',
    '--enable-b2g-bt',
    '--enable-nfc',
    '--enable-synth-pico',
    '--enable-b2g-camera',
    '--with-jitreport-granularity',
    '--enable-mozril-geoloc',
    '--with-servo',
    '--with-default-mozilla-five-home',
    '--with-user-appdir',
    '--with-doc-input-dirs',
    '--with-doc-include-dirs',
    '--with-doc-output-dir',
    '--enable-skia',
    '--enable-skia-gpu',
    '--enable-system-cairo',
    '--enable-system-pixman',
    '--enable-xul',
    '--enable-necko-protocols',
    '--enable-necko-wifi',
    '--enable-cookies',
    '--enable-ctypes',
    '--with-macbundlename-prefix',
    '--with-system-icu',
    '--with-intl-api',
]
EOF




if test "$COMPILE_ENVIRONMENT"; then
  
if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; then

  if test "$BUILD_CTYPES" -a -z "$MOZ_SYSTEM_FFI"; then
    # Run the libffi 'configure' script.
    ac_configure_args="--disable-shared --enable-static --disable-raw-api"
    if test "$MOZ_DEBUG"; then
      ac_configure_args="$ac_configure_args --enable-debug"
    fi
    if test "$DSO_PIC_CFLAGS"; then
      ac_configure_args="$ac_configure_args --with-pic"
    fi
    for var in AS CC CXX CPP LD AR RANLIB STRIP; do
      ac_configure_args="$ac_configure_args $var='`eval echo \\${${var}}`'"
    done
    if test "$CROSS_COMPILE"; then
      export CPPFLAGS CFLAGS LDFLAGS
    fi
    ac_configure_args="$ac_configure_args --build=$build --host=$target"
    if test "$_MSC_VER"; then
      # Use a wrapper script for cl and ml that looks more like gcc.
      # autotools can't quite handle an MSVC build environment yet.
      LDFLAGS=
      CFLAGS=
      ac_configure_args="$ac_configure_args LD=link CPP=\"$CC -nologo -EP\" \
                         CXXCPP=\"$CXX -nologo -EP\" SHELL=sh.exe"
      flags=
      if test -z "$MOZ_NO_DEBUG_RTL" -a -n "$MOZ_DEBUG"; then
        flags=" -DUSE_DEBUG_RTL"
      fi
      if test -n "$CLANG_CL"; then
        flags="$flags -clang-cl"
      fi
      case "${target_cpu}" in
      x86_64)
        # Need target since MSYS tools into mozilla-build may be 32bit
        ac_configure_args="$ac_configure_args \
                           CC=\"$_topsrcdir/js/src/ctypes/libffi/msvcc.sh -m64$flags\" \
                           CXX=\"$_topsrcdir/js/src/ctypes/libffi/msvcc.sh -m64$flags\""
        ;;
      *)
        ac_configure_args="$ac_configure_args \
                           CC=\"$_topsrcdir/js/src/ctypes/libffi/msvcc.sh$flags\" \
                           CXX=\"$_topsrcdir/js/src/ctypes/libffi/msvcc.sh$flags\""
        ;;
      esac
    fi

    # Use a separate cache file for libffi, since it does things differently
    # from our configure.
    old_config_files=$CONFIG_FILES
    unset CONFIG_FILES
    for moz_config_dir in js/src/ctypes/libffi; do
  _CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  case "$moz_config_dir" in
  *:*)
    objdir=$(echo $moz_config_dir | awk -F: '{print $2}')
    ;;
  *)
    objdir=$moz_config_dir
    ;;
  esac
          echo $objdir >> subconfigures

  dumpenv="true | "
  case "$host" in
  *-mingw*)
    _CONFIG_SHELL=$(cd $(dirname $_CONFIG_SHELL); pwd -W)/$(basename $_CONFIG_SHELL)
    if test ! -e "$_CONFIG_SHELL" -a -e "${_CONFIG_SHELL}.exe"; then
        _CONFIG_SHELL="${_CONFIG_SHELL}.exe"
    fi
                        dumpenv="$PERL $_topsrcdir/build/win32/dumpenv4python.pl $ac_configure_args | "
    ;;
  esac

  eval $dumpenv $PYTHON $_topsrcdir/build/subconfigure.py --prepare "$srcdir" "$moz_config_dir" "$_CONFIG_SHELL" $ac_configure_args 

  done

    ac_configure_args="$_SUBDIR_CONFIG_ARGS"
    CONFIG_FILES=$old_config_files
  fi

fi

  

if test "$MOZ_BUILD_APP" != js -o -n "$JS_STANDALONE"; then

  # Run jemalloc configure script

  if test -z "$MOZ_SYSTEM_JEMALLOC" -a "$MOZ_MEMORY" && test -n "$MOZ_JEMALLOC4" -o -n "$MOZ_REPLACE_MALLOC"; then
    ac_configure_args="--build=$build --host=$target --enable-stats --with-jemalloc-prefix=je_ --disable-valgrind"
    # We're using memalign for _aligned_malloc in memory/build/mozmemory_wrap.c
    # on Windows, so just export memalign on all platforms.
    ac_configure_args="$ac_configure_args ac_cv_func_memalign=yes"
    if test -n "$MOZ_REPLACE_MALLOC"; then
      # When using replace_malloc, we always want valloc exported from jemalloc.
      ac_configure_args="$ac_configure_args ac_cv_func_valloc=yes"
      if test "${OS_ARCH}" = Darwin; then
        # We also need to enable pointer validation on Mac because jemalloc's
        # zone allocator is not used.
        ac_configure_args="$ac_configure_args --enable-ivsalloc"
      fi
    fi
    if test -n "$MOZ_JEMALLOC4"; then
      case "${OS_ARCH}" in
        WINNT|Darwin)
          # We want jemalloc functions to be kept hidden on both Mac and Windows
          # See memory/build/mozmemory_wrap.h for details.
          ac_configure_args="$ac_configure_args --without-export"
          ;;
      esac
      if test "${OS_ARCH}" = WINNT; then
        # Lazy lock initialization doesn't play well with lazy linking of
        # mozglue.dll on Windows XP (leads to startup crash), so disable it.
        ac_configure_args="$ac_configure_args --disable-lazy-lock"

        # 64-bit Windows builds require a minimum 16-byte alignment.
        if test -n "$HAVE_64BIT_BUILD"; then
          ac_configure_args="$ac_configure_args --with-lg-tiny-min=4"
        fi
      fi
    elif test "${OS_ARCH}" = Darwin; then
      # When building as a replace-malloc lib, disabling the zone allocator
      # forces to use pthread_atfork.
      ac_configure_args="$ac_configure_args --disable-zone-allocator"
    fi
    _MANGLE="malloc posix_memalign aligned_alloc calloc realloc free memalign valloc malloc_usable_size"
    JEMALLOC_WRAPPER=
    if test -z "$MOZ_REPLACE_MALLOC"; then
      case "$OS_ARCH" in
        Linux|DragonFly|FreeBSD|NetBSD|OpenBSD)
          MANGLE=$_MANGLE
          ;;
      esac
    elif test -z "$MOZ_JEMALLOC4"; then
      MANGLE=$_MANGLE
      JEMALLOC_WRAPPER=replace_
    fi
    if test -n "$MANGLE"; then
      MANGLED=
      for mangle in ${MANGLE}; do
        if test -n "$MANGLED"; then
          MANGLED="$mangle:$JEMALLOC_WRAPPER$mangle,$MANGLED"
        else
          MANGLED="$mangle:$JEMALLOC_WRAPPER$mangle"
        fi
      done
      ac_configure_args="$ac_configure_args --with-mangling=$MANGLED"
    fi
    unset CONFIG_FILES
    if test -z "$MOZ_TLS"; then
      ac_configure_args="$ac_configure_args --disable-tls"
    fi
    EXTRA_CFLAGS="$CFLAGS"
    for var in AS CC CXX CPP LD AR RANLIB STRIP CPPFLAGS EXTRA_CFLAGS LDFLAGS; do
      ac_configure_args="$ac_configure_args $var='`eval echo \\${${var}}`'"
    done
    # Force disable DSS support in jemalloc.
    ac_configure_args="$ac_configure_args ac_cv_func_sbrk=false"

    # Make Linux builds munmap freed chunks instead of recycling them.
    ac_configure_args="$ac_configure_args --enable-munmap"

    # Disable cache oblivious behavior that appears to have a performance
    # impact on Firefox.
    ac_configure_args="$ac_configure_args --disable-cache-oblivious"

    if ! test -e memory/jemalloc; then
      mkdir -p memory/jemalloc
    fi

    # jemalloc's configure runs git to determine the version. But when building
    # from a gecko git clone, the git commands it uses is going to pick gecko's
    # information, not jemalloc's, which is useless. So pretend we don't have git
    # at all. That will make jemalloc's configure pick the in-tree VERSION file.
    (PATH="$srcdir/memory/jemalloc/helper:$PATH";
    for moz_config_dir in memory/jemalloc/src; do
  _CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  case "$moz_config_dir" in
  *:*)
    objdir=$(echo $moz_config_dir | awk -F: '{print $2}')
    ;;
  *)
    objdir=$moz_config_dir
    ;;
  esac
          echo $objdir >> subconfigures

  dumpenv="true | "
  case "$host" in
  *-mingw*)
    _CONFIG_SHELL=$(cd $(dirname $_CONFIG_SHELL); pwd -W)/$(basename $_CONFIG_SHELL)
    if test ! -e "$_CONFIG_SHELL" -a -e "${_CONFIG_SHELL}.exe"; then
        _CONFIG_SHELL="${_CONFIG_SHELL}.exe"
    fi
                        dumpenv="$PERL $_topsrcdir/build/win32/dumpenv4python.pl $ac_configure_args | "
    ;;
  esac

  eval $dumpenv $PYTHON $_topsrcdir/build/subconfigure.py --prepare "$srcdir" "$moz_config_dir" "$_CONFIG_SHELL" $ac_configure_args 

  done

    ) || exit 1
    ac_configure_args="$_SUBDIR_CONFIG_ARGS"
  fi

fi


fi

# Run freetype configure script

if test "$MOZ_TREE_FREETYPE"; then
   export CFLAGS="$CFLAGS $MOZ_DEBUG_FLAGS -std=c99"
   export CPPFLAGS="$CPPFLAGS $MOZ_DEBUG_FLAGS"
   export CXXFLAGS="$CXXFLAGS $MOZ_DEBUG_FLAGS"
   export LDFLAGS="$LDFLAGS $MOZ_DEBUG_LDFLAGS"
   # Spaces in the *_CFLAGS and *_LIBS variables are intentionally placed
   # to force freetype to use our settings rather than autodetecting
   if test -n "$MOZ_SYSTEM_PNG"; then
     export LIBPNG_CFLAGS="$MOZ_PNG_CFLAGS "
   else
     export LIBPNG_CFLAGS="-I$_objdir/dist/include"
   fi
   export LIBPNG_LIBS="$MOZ_PNG_LIBS "
   export ZLIB_CFLAGS="$MOZ_ZLIB_CFLAGS "
   export ZLIB_LIBS="$MOZ_ZLIB_LIBS "
   export CONFIG_FILES="unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in freetype-config freetype2.pc:freetype2.in"
   ac_configure_args="$ac_configure_args --host=$target --disable-shared --with-pic=yes --with-zlib=yes --without-bzip2 --with-png=yes --without-harfbuzz"

   if ! test -e modules; then
     mkdir modules
   fi
   # Only export CC, CXX and RANLIB for the subconfigure, and avoid spilling
   # that further down the road.
   (export CC CXX RANLIB;
    for moz_config_dir in modules/freetype2; do
  _CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  case "$moz_config_dir" in
  *:*)
    objdir=$(echo $moz_config_dir | awk -F: '{print $2}')
    ;;
  *)
    objdir=$moz_config_dir
    ;;
  esac
          echo $objdir >> subconfigures

  dumpenv="true | "
  case "$host" in
  *-mingw*)
    _CONFIG_SHELL=$(cd $(dirname $_CONFIG_SHELL); pwd -W)/$(basename $_CONFIG_SHELL)
    if test ! -e "$_CONFIG_SHELL" -a -e "${_CONFIG_SHELL}.exe"; then
        _CONFIG_SHELL="${_CONFIG_SHELL}.exe"
    fi
                        dumpenv="$PERL $_topsrcdir/build/win32/dumpenv4python.pl $ac_configure_args | "
    ;;
  esac

  eval $dumpenv $PYTHON $_topsrcdir/build/subconfigure.py --prepare "$srcdir" "$moz_config_dir" "$_CONFIG_SHELL" $ac_configure_args 

  done

   ) || exit 1
fi

if test -z "$direct_nspr_config"; then
                    CC="$_SUBDIR_CC"
    CXX="$_SUBDIR_CXX"
    CFLAGS="$_SUBDIR_CFLAGS"
    CPPFLAGS="$_SUBDIR_CPPFLAGS"
    CXXFLAGS="$_SUBDIR_CXXFLAGS"
    LDFLAGS="$_SUBDIR_LDFLAGS"
    HOST_CC="$_SUBDIR_HOST_CC"
    HOST_CFLAGS="$_SUBDIR_HOST_CFLAGS"
    HOST_CXXFLAGS="$_SUBDIR_HOST_CXXFLAGS"
    HOST_LDFLAGS="$_SUBDIR_HOST_LDFLAGS"
    RC=
fi

unset MAKEFILES
unset CONFIG_FILES

# Run all configure scripts specified by a subconfigure
if test -n "$_subconfigure_subdir"; then
  _save_srcdir="$srcdir"
  srcdir="$srcdir/.."
  _save_ac_configure_args="$ac_configure_args"
  ac_configure_args="$_subconfigure_config_args"
  
for moz_config_dir_ in "$_subconfigure_subdir"; do
  for moz_config_dir in $moz_config_dir_; do
  _CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  case "$moz_config_dir" in
  *:*)
    objdir=$(echo $moz_config_dir | awk -F: '{print $2}')
    ;;
  *)
    objdir=$moz_config_dir
    ;;
  esac
          echo $objdir >> subconfigures

  dumpenv="true | "
  case "$host" in
  *-mingw*)
    _CONFIG_SHELL=$(cd $(dirname $_CONFIG_SHELL); pwd -W)/$(basename $_CONFIG_SHELL)
    if test ! -e "$_CONFIG_SHELL" -a -e "${_CONFIG_SHELL}.exe"; then
        _CONFIG_SHELL="${_CONFIG_SHELL}.exe"
    fi
                        dumpenv="$PERL $_topsrcdir/build/win32/dumpenv4python.pl $ac_configure_args | "
    ;;
  esac

  eval $dumpenv $PYTHON $_topsrcdir/build/subconfigure.py --prepare "$srcdir" "$moz_config_dir" "$_CONFIG_SHELL" $ac_configure_args --cache-file="$cache_file"

  done

  tail -1 subconfigures >> skip_subconfigures
  if test "$no_recursion" != yes; then
  trap '' EXIT
  if ! $PYTHON $_topsrcdir/build/subconfigure.py `tail -1 skip_subconfigures`; then
      exit 1
  fi
fi

done

  ac_configure_args="$_save_ac_configure_args"
  srcdir="$_save_srcdir"
fi

if test "$COMPILE_ENVIRONMENT"; then

export WRAP_LDFLAGS

CC="$_SUBDIR_CC"
CXX="$_SUBDIR_CXX"
CFLAGS="$_SUBDIR_CFLAGS"
CPPFLAGS="$_SUBDIR_CPPFLAGS"
CXXFLAGS="$_SUBDIR_CXXFLAGS"
LDFLAGS="$_SUBDIR_LDFLAGS"
HOST_CC="$_SUBDIR_HOST_CC"
HOST_CFLAGS="$_SUBDIR_HOST_CFLAGS"
HOST_CXXFLAGS="$_SUBDIR_HOST_CXXFLAGS"
HOST_LDFLAGS="$_SUBDIR_HOST_LDFLAGS"
RC=

# Run the SpiderMonkey 'configure' script.
dist=$MOZ_BUILD_ROOT/dist
ac_configure_args="$_SUBDIR_CONFIG_ARGS"

# --with-system-nspr will have been converted into the relevant $NSPR_CFLAGS
# and $NSPR_LIBS.
ac_configure_args="`echo $ac_configure_args | sed -e 's/--with-system-nspr\S* *//'`"

if test "$_INTL_API" = no; then
    ac_configure_args="$ac_configure_args --without-intl-api"
fi

if test "$BUILD_CTYPES"; then
    # Build js-ctypes on the platforms we can.
    ac_configure_args="$ac_configure_args --enable-ctypes"
fi
if test -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then
    ac_configure_args="$ac_configure_args --with-nspr-cflags='$NSPR_CFLAGS'"
    ac_configure_args="$ac_configure_args --with-nspr-libs='$NSPR_LIBS'"
fi
ac_configure_args="$ac_configure_args --prefix=$dist"
if test -n "$ZLIB_IN_MOZGLUE"; then
   MOZ_ZLIB_LIBS=
fi
export MOZ_SYSTEM_ZLIB
export MOZ_ZLIB_CFLAGS
export MOZ_ZLIB_LIBS
export MOZ_APP_NAME
export MOZ_APP_REMOTINGNAME
export RUSTC
export MOZILLA_CENTRAL_PATH=$_topsrcdir
export STLPORT_CPPFLAGS
export STLPORT_LIBS
export JS_STANDALONE=
unset MOZ_BUILD_APP
export DIST
export MOZ_LINKER
export ZLIB_IN_MOZGLUE
export AR
export RANLIB
export CPP
export CC
export CXX
export LD
export ARFLAGS
export CPPFLAGS
export CFLAGS
export CXXFLAGS
export LDFLAGS
export RUSTFLAGS
export HOST_CC
export HOST_CXX
export HOST_CFLAGS
export HOST_CPPFLAGS
export HOST_CXXFLAGS
export HOST_LDFLAGS

if ! test -e js; then
    mkdir js
fi

for moz_config_dir in js/src; do
  _CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  case "$moz_config_dir" in
  *:*)
    objdir=$(echo $moz_config_dir | awk -F: '{print $2}')
    ;;
  *)
    objdir=$moz_config_dir
    ;;
  esac
          echo $objdir >> subconfigures

  dumpenv="true | "
  case "$host" in
  *-mingw*)
    _CONFIG_SHELL=$(cd $(dirname $_CONFIG_SHELL); pwd -W)/$(basename $_CONFIG_SHELL)
    if test ! -e "$_CONFIG_SHELL" -a -e "${_CONFIG_SHELL}.exe"; then
        _CONFIG_SHELL="${_CONFIG_SHELL}.exe"
    fi
                        dumpenv="$PERL $_topsrcdir/build/win32/dumpenv4python.pl $ac_configure_args | "
    ;;
  esac

  eval $dumpenv $PYTHON $_topsrcdir/build/subconfigure.py --prepare "$srcdir" "$moz_config_dir" "$_CONFIG_SHELL" $ac_configure_args --cache-file="$cache_file"

  done

ac_configure_args="$_SUBDIR_CONFIG_ARGS"

fi # COMPILE_ENVIRONMENT


if test "$no_recursion" != yes; then
  trap '' EXIT
  if ! $PYTHON $_topsrcdir/build/subconfigure.py --list subconfigures --skip skip_subconfigures; then
      exit 1
  fi
fi



rm -fr confdefs* $ac_clean_files
