#! /bin/sh

# Read in '.mozconfig' script to set the initial options.
# See the mozconfig2configure script for more details.
_AUTOCONF_TOOLS_DIR=`dirname $0`/./build/autoconf
. $_AUTOCONF_TOOLS_DIR/mozconfig2configure

# 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
  --with-x                use the X Window System"
ac_help="$ac_help
  --with-pthreads         Force use of system pthread library with NSPR "
ac_help="$ac_help
  --without-system-nspr   Do not use system installed NSPR"
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-jpeg[=PFX]
                          Use installed libjpeg [installed at prefix PFX]"
ac_help="$ac_help
  --with-system-zlib[=PFX]
                          Use installed libz [installed at prefix PFX]"
ac_help="$ac_help
  --with-system-png[=PFX]
                          Use installed libpng [installed at prefix PFX]"
ac_help="$ac_help
  --with-system-mng[=PFX]
                          Use installed libmng [installed at prefix PFX]"
ac_help="$ac_help
  --enable-default-toolkit=TK
                          Select default toolkit (default=<platform specific>)"
ac_help="$ac_help
  --enable-toolkit-gtk    Enable GTK+ toolkit support "
ac_help="$ac_help
  --enable-toolkit-xlib   Enable xlib toolkit support "
ac_help="$ac_help
  --enable-toolkit-qt     Enable Qt Toolkit support "
ac_help="$ac_help
  --with-gtk-prefix=PFX   Prefix where GTK is installed (optional)"
ac_help="$ac_help
  --with-gtk-exec-prefix=PFX 
                          Exec prefix where GTK is installed (optional)"
ac_help="$ac_help
  --disable-gtktest       Do not try to compile and run a test GTK program"
ac_help="$ac_help
  --enable-gle-support
                          GLE support (for debugging gtk widgets) "
ac_help="$ac_help
  --with-static-gtk       Link GTK statically if possible"
ac_help="$ac_help
  --with-qtdir=\$dir       Specify Qt directory "
ac_help="$ac_help
  --with-static-qt        Link qt statically if possible"
ac_help="$ac_help
  --enable-calendar       Enable building of the calendar client"
ac_help="$ac_help
  --disable-mailnews      Disable building of mail & news components"
ac_help="$ac_help
  --disable-ldap          Disable LDAP support"
ac_help="$ac_help
  --disable-freetype2     Disable FreeType2 support "
ac_help="$ac_help
  --with-ft-prefix=PFX    Prefix where FreeType is installed (optional)"
ac_help="$ac_help
  --with-ft-exec-prefix=PFX
                          Exec prefix where FreeType is installed (optional)"
ac_help="$ac_help
  --disable-freetypetest
                          Do not try to compile and run a test FreeType program"
ac_help="$ac_help
  --with-ft-prefix=PFX    Prefix where FreeType is installed (optional)"
ac_help="$ac_help
  --with-ft-exec-prefix=PFX
                          Exec prefix where FreeType is installed (optional)"
ac_help="$ac_help
  --disable-freetypetest
                          Do not try to compile and run a test FreeType program"
ac_help="$ac_help
  --enable-xft            Enable Xft support "
ac_help="$ac_help
  --disable-postscript    Disable PostScript printing support "
ac_help="$ac_help
  --disable-xprint        Disable Xprint printing support "
ac_help="$ac_help
  --enable-crypto         Enable crypto support (Personal Security Manager)"
ac_help="$ac_help
  --disable-jsd           Disable JavaScript debug library"
ac_help="$ac_help
  --enable-java-supplement
                          Enable Blackwood Java Code"
ac_help="$ac_help
  --enable-xinerama       Enable Xinerama support
                           ( not safe for Red Hat 7.0 ) "
ac_help="$ac_help
  --disable-bidi          Disable bi-directional support"
ac_help="$ac_help
  --enable-ctl            Enable Thai Complex Script support"
ac_help="$ac_help
  --disable-accessibility Disable accessibility support"
ac_help="$ac_help
  --enable-plaintext-editor-only
                          Allow only plaintext editing"
ac_help="$ac_help
  --enable-extensions     Enable extensions"
ac_help="$ac_help
  --enable-ldap-experimental
                          Enable LDAP experimental features"
ac_help="$ac_help
  --disable-mathml        Disable MathML"
ac_help="$ac_help
  --enable-svg            Enable SVG "
ac_help="$ac_help
  --disable-tests         Do not build test libraries & programs"
ac_help="$ac_help
  --enable-xpcom-lea      Enable Lea malloc in xpcom "
ac_help="$ac_help
  --enable-js-ultrasparc  Enable UltraSPARC optimizations in JS"
ac_help="$ac_help
  --enable-leaky          Enable leaky memory tool (needs mozilla/tools/leaky)"
ac_help="$ac_help
  --enable-jprof          Enable jprof profiling tool (needs mozilla/tools/jprof)"
ac_help="$ac_help
  --enable-xpctools       Build JS profiling tool (needs mozilla/js/src/xpconnect/tools)"
ac_help="$ac_help
  --disable-debug         Disable building with debug info"
ac_help="$ac_help
  --enable-optimize[=OPT] Enable compiler optimizations (default=-O) "
ac_help="$ac_help
  --enable-debug-modules  Enable/disable debug info for specific modules"
ac_help="$ac_help
  --enable-debugger-info-modules
                          Enable/disable debugger info for specific modules"
ac_help="$ac_help
  --disable-dtd-debug     Disable DTD debugging code in the parser"
ac_help="$ac_help
  --enable-boehm          Enable the Boehm Garbage Collector"
ac_help="$ac_help
  --disable-logging       Disable logging facilities"
ac_help="$ac_help
  --enable-crash-on-assert
                          Make NS_ASSERTION crash on Unix"
ac_help="$ac_help
  --enable-reorder        Enable function reordering (requires GNU ld) "
ac_help="$ac_help
  --enable-logrefcnt      Enable logging of refcounts (default=debug) "
ac_help="$ac_help
  --enable-detect-webshell-leaks
                          Enable detection of webshell leaks 
                          (default=debug)"
ac_help="$ac_help
  --disable-double-buffer Disable double buffering"
ac_help="$ac_help
  --enable-wrap-malloc    Wrap malloc calls (gnu linker only)"
ac_help="$ac_help
  --with-wrap-malloc=DIR  Location of malloc wrapper library"
ac_help="$ac_help
  --enable-efence         Link with Electric Fence"
ac_help="$ac_help
  --enable-strip          Enable stripping of libs & executables "
ac_help="$ac_help
  --enable-elf-dynstr-gc  Enable elf dynstr garbage collector (opt builds only)"
ac_help="$ac_help
  --enable-timeline       Enable timeline services "
ac_help="$ac_help
  --enable-reflow-perf    Enable reflow performance tracing"
ac_help="$ac_help
  --enable-perf-metrics   Enable performance metrics"
ac_help="$ac_help
  --enable-trace-malloc   Enable malloc tracing"
ac_help="$ac_help
  --enable-eazel-profiler-support
                          Enable Corel/Eazel profiler support"
ac_help="$ac_help
  --enable-profile-modules
                          Enable/disable profiling for specific modules"
ac_help="$ac_help
  --enable-insure         Enable insure++ instrumentation (linux only)"
ac_help="$ac_help
  --with-insure-dirs=DIRS
                          Dirs to instrument with insure "
ac_help="$ac_help
  --with-insure-exclude-dirs=DIRS
                          Dirs to not instrument with insure "
ac_help="$ac_help
  --enable-xterm-updates  Update XTERM titles with current command."
ac_help="$ac_help
  --enable-chrome-format=FORMAT
                          Select FORMAT of chrome files (default=jar)"
ac_help="$ac_help
  --enable-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
  --disable-verbose-config-defs
                          Do not output the contents of config-defs.h"
ac_help="$ac_help
  --disable-pedantic      Issue all warnings demanded by strict ANSI C "
ac_help="$ac_help
  --enable-long-long-warning 
                          Warn about use of non-ANSI long long type"
ac_help="$ac_help
  --enable-cpp-rtti       Enable C++ RTTI "
ac_help="$ac_help
  --enable-cpp-exceptions Enable C++ exceptions "
ac_help="$ac_help
  --with-os2emx=FORMAT    Build for OS/2 with emx+gcc, set to OMF or A.OUT"
ac_help="$ac_help
  --with-os2vacpp         Build for OS/2 with VAC++"
ac_help="$ac_help
  --disable-auto-deps     Do not automatically generate dependency info"
ac_help="$ac_help
  --disable-md            Do not use compiler-based dependencies "
ac_help="$ac_help
  --disable-shared        Disable building of internal shared libs"
ac_help="$ac_help
  --enable-static         Enable building of internal static libs"
ac_help="$ac_help
  --enable-meta-component-modules=mod1[,mod2]
                          Build single meta-component from specified modules"
ac_help="$ac_help
  --enable-meta-components
                          Build predefined meta-components"
ac_help="$ac_help
  --enable-standalone-modules=mod1[,mod2]
                          Enable standalone build of specific modules"
ac_help="$ac_help
  --without-libIDL        Skip check for libIDL (standalone modules only)"
ac_help="$ac_help
  --with-libIDL-prefix=PFX
                          Prefix where libIDL is installed (optional)"
ac_help="$ac_help
  --with-libIDL-exec-prefix=PFX
                          Exec prefix where libIDL is installed (optional)"
ac_help="$ac_help
  --disable-libIDLtest    Do not try to compile and run a test libIDL program"
ac_help="$ac_help
  --with-glib-prefix=PFX  Prefix where GLIB is installed (optional)"
ac_help="$ac_help
  --with-glib-exec-prefix=PFX
                          Exec prefix where GLIB is installed (optional)"
ac_help="$ac_help
  --disable-glibtest      Do not try to compile and run a test GLIB program"
ac_help="$ac_help
  --with-glib-prefix=PFX  Prefix where GLIB is installed (optional)"
ac_help="$ac_help
  --with-glib-exec-prefix=PFX
                          Exec prefix where GLIB is installed (optional)"
ac_help="$ac_help
  --disable-glibtest      Do not try to compile and run a test GLIB program"
ac_help="$ac_help
  --disable-xul           Disable XUL (standalone modules only)"

# 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; 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; 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; 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; 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; 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; 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; 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; exit 1; }
  else
    { echo "configure: error: can not find sources in $srcdir" 1>&2; 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


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; 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; 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; exit 1; }
fi

echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:824: 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; 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:845: 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:863: 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}-

TARGET_CPU="${target_cpu}"
TARGET_VENDOR="${target_vendor}"
TARGET_OS="${target_os}"
MOZILLA_VERSION='0.9.9'


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

_SUBDIR_CC="$CC"
_SUBDIR_CXX="$CXX"
_SUBDIR_CFLAGS="$CFLAGS"
_SUBDIR_CPPFLAGS="$CPPFLAGS"
_SUBDIR_CXXFLAGS="$CFLAGS"
_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=10009
MOZMNG="((1<<16)|(0<<8)|(4))"
NSPR_VERSION=4

GLIB_VERSION=1.2.0
GTK_VERSION=1.2.0
LIBIDL_VERSION=0.6.3
PERL_VERSION=5.004
QT_VERSION=2.2.0
QT_VERSION_NUM=220
LIBART_VERSION=2.3.4
GTK2_VERSION=1.3.7

MISSING_X=

USE_PTHREADS=
_PTHREAD_LDFLAGS=""

_topsrcdir=`cd \`dirname $0\`; pwd`
_objdir=`pwd`
if test "$_topsrcdir" != "$_objdir"
then
  # Check for a couple representative files in the source tree
  _conflict_files=
  for file in $_topsrcdir/Makefile $_topsrcdir/config/autoconf.mk; do
    if test -f $file; then
      _conflict_files="$_conflict_files $file"
    fi
  done
  if test "$_conflict_files"; then
    echo "***"
    echo "*   Your source tree contains these files:"
    for file in $_conflict_files; do
      echo "*         $file"
    done
    cat 1>&2 <<-EOF
	*   This indicates that you previously built in the source tree.
	*   A source tree build can confuse the separate objdir build.
	*
	*   To clean up the source tree:
	*     1. cd $_topsrcdir
	*     2. gmake distclean
	***
	EOF
    exit 1
    break
  fi
fi
MOZ_BUILD_ROOT=`pwd`

case "$target" in
*-cygwin*)
    # Check to see if we are really running in a msvc environemnt
    _WIN32_MSVC=
    if test "$CC" = "cl" || test "$CXX" = "cl"; then
        _WIN32_MSVC=1
    elif test -z "$CC"; then
        echo 'main() { return 0; }' > dummy.c
        cl -o dummy dummy.c >/dev/null 2>&1
        if test $? = 0; then
            _WIN32_MSVC=1
        else
            echo "configure: warning: cl.exe test failed.  Using normal feature tests" 1>&2
        fi
        rm -f dummy dummy.o dummy.obj dummy.exe dummy.c
    fi
    ;;
*-msvc*|*-mksnt*)
    _WIN32_MSVC=1
    ;;
esac

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

if test -z "$SKIP_COMPILER_CHECKS"; then
if test -n "$CROSS_COMPILE" && test "$target" != "$host"; then
    echo "cross compiling from $host to $target"
    cross_compiling=yes

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

    echo $ac_n "checking for host c compiler""... $ac_c" 1>&6
echo "configure:1000: checking for host c compiler" >&5
    if test -z "$HOST_CC"; then
	for ac_prog in gcc cc /usr/ucb/cc icc
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:1007: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$HOST_CC"; then
  ac_cv_prog_HOST_CC="$HOST_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_HOST_CC="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
HOST_CC="$ac_cv_prog_HOST_CC"
if test -n "$HOST_CC"; then
  echo "$ac_t""$HOST_CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$HOST_CC" && break
done
test -n "$HOST_CC" || HOST_CC=""""

	if test -z "$HOST_CC"; then
	    { echo "configure: error: no acceptable c compiler found in \$PATH" 1>&2; exit 1; }
	fi
    fi
    echo "$ac_t""$HOST_CC" 1>&6
    echo $ac_n "checking for host c++ compiler""... $ac_c" 1>&6
echo "configure:1043: checking for host c++ compiler" >&5
    if test -z "$HOST_CXX"; then
	for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl icc
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:1050: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_HOST_CXX'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$HOST_CXX"; then
  ac_cv_prog_HOST_CXX="$HOST_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_HOST_CXX="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
HOST_CXX="$ac_cv_prog_HOST_CXX"
if test -n "$HOST_CXX"; then
  echo "$ac_t""$HOST_CXX" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$HOST_CXX" && break
done
test -n "$HOST_CXX" || HOST_CXX=""""

	if test -z "$HOST_CXX"; then
	    { echo "configure: error: no acceptable c++ compiler found in \$PATH" 1>&2; exit 1; }
	fi
    fi
    echo "$ac_t""$HOST_CXX" 1>&6

    if test -z "$HOST_CFLAGS"; then
	HOST_CFLAGS="$CFLAGS"
    fi
    if test -z "$HOST_CXXFLAGS"; then
	HOST_CXXFLAGS="$CXXFLAGS"
    fi
    if test -z "$HOST_LDFLAGS"; then
	HOST_LDFLAGS="$LDFLAGS"
    fi
    if test -z "$HOST_RANLIB"; then
	# 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:1099: 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="$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_RANLIB="ranlib"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_HOST_RANLIB" && ac_cv_prog_HOST_RANLIB=":"
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

    fi
    if test -z "$HOST_AR"; then
	# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1131: 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="$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_AR="ar"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_HOST_AR" && ac_cv_prog_HOST_AR=":"
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

    fi
    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:1164: checking whether the host c compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
    cat > conftest.$ac_ext <<EOF
#line 1166 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:1173: \"$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; 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:1188: checking whether the host c++ compiler ($HOST_CXX $HOST_CXXFLAGS $HOST_LDFLAGS) works" >&5
    cat > conftest.$ac_ext <<EOF
#line 1190 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:1197: \"$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; exit 1; } 
fi
rm -f conftest*
    
    CC=$_SAVE_CC
    CFLAGS=$_SAVE_CFLAGS
    LDFLAGS=$_SAVE_LDFLAGS

    if test -z "$CC"; then
	for ac_prog in "${target_alias}-gcc" "${target}-gcc"
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:1218: 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="$ac_prog"
      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

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

    fi
    unset ac_cv_prog_CC
    # 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:1253: 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:1283: 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:1334: 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; exit 1; }
fi

echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1366: 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 1377 "configure"
#include "confdefs.h"

main(){return(0);}
EOF
if { (eval echo configure:1382: \"$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; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1408: 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:1413: 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:1422: \"$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:1441: 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

    if test -z "$CXX"; then
	for ac_prog in "${target_alias}-g++" "${target}-g++"
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:1478: 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=":"

    fi
    unset ac_cv_prog_CXX
    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:1515: 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:1547: 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 1558 "configure"
#include "confdefs.h"

int main(){return(0);}
EOF
if { (eval echo configure:1563: \"$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; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1589: 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:1594: 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:1603: \"$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:1622: 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

    if test -z "$RANLIB"; then
	for ac_prog in "${target_alias}-ranlib" "${target}-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:1659: 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=":"

    fi
    if test -z "$AR"; then
	for ac_prog in "${target_alias}-ar" "${target}-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:1696: 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=":"

    fi
    if test -z "$AS"; then
	for ac_prog in "${target_alias}-as" "${target}-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:1733: 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=":"

    fi
    if test -z "$LD"; then
	for ac_prog in "${target_alias}-ld" "${target}-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:1770: 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=":"

    fi
    if test -z "$STRIP"; then
	for ac_prog in "${target_alias}-strip" "${target}-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:1807: 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=":"

    fi
    if test -z "$DLLTOOL"; then
	for ac_prog in "${target_alias}-dlltool" "${target}-dlltool"
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:1844: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$DLLTOOL"; then
  ac_cv_prog_DLLTOOL="$DLLTOOL" # 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_DLLTOOL="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
DLLTOOL="$ac_cv_prog_DLLTOOL"
if test -n "$DLLTOOL"; then
  echo "$ac_t""$DLLTOOL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

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

    fi
    if test -z "$WINDRES"; then
	for ac_prog in "${target_alias}-windres" "${target}-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:1881: 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=":"

    fi
    cat >> confdefs.h <<\EOF
#define CROSS_COMPILE 1
EOF

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:1920: 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:1950: 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:2001: 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; exit 1; }
fi

echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:2033: 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 2044 "configure"
#include "confdefs.h"

main(){return(0);}
EOF
if { (eval echo configure:2049: \"$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; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:2075: 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:2080: 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:2089: \"$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:2108: 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:2144: 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:2176: 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 2187 "configure"
#include "confdefs.h"

int main(){return(0);}
EOF
if { (eval echo configure:2192: \"$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; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:2218: 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:2223: 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:2232: \"$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:2251: 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

    # 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:2285: 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
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:2317: 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"

    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:2358: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$AR" in
  /*)
  ac_cv_path_AR="$AR" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_AR="$AR" # 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_AR="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
AR="$ac_cv_path_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:2399: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$LD" in
  /*)
  ac_cv_path_LD="$LD" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_LD="$LD" # 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_LD="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
LD="$ac_cv_path_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:2440: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$STRIP" in
  /*)
  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_STRIP="$STRIP" # 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_STRIP="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
STRIP="$ac_cv_path_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 dlltool
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:2481: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_DLLTOOL'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$DLLTOOL" in
  /*)
  ac_cv_path_DLLTOOL="$DLLTOOL" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_DLLTOOL="$DLLTOOL" # 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_DLLTOOL="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
DLLTOOL="$ac_cv_path_DLLTOOL"
if test -n "$DLLTOOL"; then
  echo "$ac_t""$DLLTOOL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

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

    if test -z "$HOST_CC"; then
	HOST_CC="$CC"
    fi
    if test -z "$HOST_CFLAGS"; then
	HOST_CFLAGS="$CFLAGS"
    fi
    if test -z "$HOST_CXX"; then
	HOST_CXX="$CXX"
    fi
    if test -z "$HOST_CXXFLAGS"; then
	HOST_CXXFLAGS="$CXXFLAGS"
    fi
    if test -z "$HOST_LDFLAGS"; then
	HOST_LDFLAGS="$LDFLAGS"
    fi
    if test -z "$HOST_RANLIB"; then
	HOST_RANLIB="$RANLIB"
    fi
    if test -z "$HOST_AR"; then
	HOST_AR="$AR"
    fi
fi

if test "$CC" != "icc"; then
    if test "x$CC" != xcc; then
  echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
echo "configure:2543: checking whether $CC and cc understand -c and -o together" >&5
else
  echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
echo "configure:2546: checking whether cc understands -c and -o together" >&5
fi
set dummy $CC; ac_cc="`echo $2 |
		       sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'foo(){}' > conftest.c
# Make sure it works both with $CC and with simple cc.
# We do the test twice because some compilers refuse to overwrite an
# existing .o file with -o, though they will create one.
ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
if { (eval echo configure:2558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
   test -f conftest.o && { (eval echo configure:2559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
then
  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
  if test "x$CC" != xcc; then
    # Test first that cc exists at all.
    if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:2564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
      ac_try='cc -c conftest.c -o conftest.o 1>&5'
      if { (eval echo configure:2566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
	 test -f conftest.o && { (eval echo configure:2567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
      then
        # cc works too.
        :
      else
        # cc exists but doesn't like -o.
        eval ac_cv_prog_cc_${ac_cc}_c_o=no
      fi
    fi
  fi
else
  eval ac_cv_prog_cc_${ac_cc}_c_o=no
fi
rm -f conftest*

fi
if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
  cat >> confdefs.h <<\EOF
#define NO_MINUS_C_MINUS_O 1
EOF

fi

    if grep "NO_MINUS_C_MINUS_O 1" ./confdefs.h >/dev/null; then
        USING_HCC=1
        _OLDCC=$CC
        _OLDCXX=$CXX
        CC="${srcdir}/build/hcc '$CC'"
        CXX="${srcdir}/build/hcpp '$CXX'"
    fi
fi

GNU_AS=
GNU_LD=
GNU_CC=
GNU_CXX=
if test "$GCC" = "yes"; then
    GNU_CC=1
fi
if test "$GXX" = "yes"; then
    GNU_CXX=1
fi
if test "`echo | $AS -v 2>&1 | grep -c GNU`" != "0"; then
    GNU_AS=1
fi
if test "`echo | $LD -v 2>&1 | grep -c GNU`" != "0"; then
    GNU_LD=1
fi
rm -f a.out
fi # SKIP_COMPILER_CHECKS






if test -z "$SKIP_PATH_CHECKS"; then
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:2628: 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 2643 "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:2649: \"$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 2660 "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:2666: \"$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 2677 "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:2683: \"$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:2708: 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 2721 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2726: \"$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

# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:2762: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
  for ac_dir in $PATH; do
    # Account for people who put trailing slashes in PATH elements.
    case "$ac_dir/" in
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      # Don't use installbsd from OSF since it installs stuff as root
      # by default.
      for ac_prog in ginstall scoinst install; do
        if test -f $ac_dir/$ac_prog; then
	  if test $ac_prog = install &&
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    :
	  else
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done
  IFS="$ac_save_IFS"

fi
  if test "${ac_cv_path_install+set}" = set; then
    INSTALL="$ac_cv_path_install"
  else
    # As a last resort, use the slow shell script.  We don't cache a
    # path for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the path is relative.
    INSTALL="$ac_install_sh"
  fi
fi
echo "$ac_t""$INSTALL" 1>&6

# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'

test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'

test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'

echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:2815: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  rm -f conftestdata
if ln -s X conftestdata 2>/dev/null
then
  rm -f conftestdata
  ac_cv_prog_LN_S="ln -s"
else
  ac_cv_prog_LN_S=ln
fi
fi
LN_S="$ac_cv_prog_LN_S"
if test "$ac_cv_prog_LN_S" = "ln -s"; then
  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

for ac_prog in gawk mawk nawk awk
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:2840: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$AWK"; then
  ac_cv_prog_AWK="$AWK" # 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_AWK="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
AWK="$ac_cv_prog_AWK"
if test -n "$AWK"; then
  echo "$ac_t""$AWK" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$AWK" && break
done

for ac_prog in xemacs lemacs emacs
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:2874: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_EMACS'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$EMACS" in
  /*)
  ac_cv_path_EMACS="$EMACS" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_EMACS="$EMACS" # 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_EMACS="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
EMACS="$ac_cv_path_EMACS"
if test -n "$EMACS"; then
  echo "$ac_t""$EMACS" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

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

for ac_prog in $PERL perl5 perl 
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:2915: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$PERL" in
  /*)
  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_PERL="$PERL" # 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_PERL="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
PERL="$ac_cv_path_PERL"
if test -n "$PERL"; then
  echo "$ac_t""$PERL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$PERL" && break
done

if test -z "$PERL" || test "$PERL" = ":"; then
    { echo "configure: error: perl not found in \$PATH" 1>&2; exit 1; }
fi

echo $ac_n "checking for minimum required perl version >= $PERL_VERSION""... $ac_c" 1>&6
echo "configure:2955: checking for minimum required perl version >= $PERL_VERSION" >&5
_perl_version=`PERL_VERSION=$PERL_VERSION $PERL -e 'print "$]"; if ($] >= $ENV{PERL_VERSION}) { exit(0); } else { exit(1); }' 2>&5`
_perl_res=$?
echo "$ac_t""$_perl_version" 1>&6

if test "$_perl_res" != 0; then
    { echo "configure: error: Perl $PERL_VERSION or higher is required." 1>&2; exit 1; }
fi

echo $ac_n "checking for full perl installation""... $ac_c" 1>&6
echo "configure:2965: checking for full perl installation" >&5
_perl_archlib=`$PERL -e 'use Config; if ( -d $Config{archlib} ) { exit(0); } else { exit(1); }' 2>&5`
_perl_res=$?
if test "$_perl_res" != 0; then
    echo "$ac_t""no" 1>&6
    { echo "configure: error: Cannot find Config.pm or \$Config{archlib}.  A full perl installation is required." 1>&2; exit 1; }
else
    echo "$ac_t""yes" 1>&6    
fi

# Extract the first word of "whoami", so it can be a program name with args.
set dummy whoami; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2978: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$WHOAMI" in
  /*)
  ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_WHOAMI="$WHOAMI" # 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_WHOAMI="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_WHOAMI" && ac_cv_path_WHOAMI=":"
  ;;
esac
fi
WHOAMI="$ac_cv_path_WHOAMI"
if test -n "$WHOAMI"; then
  echo "$ac_t""$WHOAMI" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

# Extract the first word of "autoconf", so it can be a program name with args.
set dummy autoconf; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3014: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AUTOCONF'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$AUTOCONF" in
  /*)
  ac_cv_path_AUTOCONF="$AUTOCONF" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_AUTOCONF="$AUTOCONF" # 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_AUTOCONF="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_AUTOCONF" && ac_cv_path_AUTOCONF=":"
  ;;
esac
fi
AUTOCONF="$ac_cv_path_AUTOCONF"
if test -n "$AUTOCONF"; then
  echo "$ac_t""$AUTOCONF" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

# Extract the first word of "unzip", so it can be a program name with args.
set dummy unzip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3050: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_UNZIP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$UNZIP" in
  /*)
  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_UNZIP="$UNZIP" # 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_UNZIP="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_UNZIP" && ac_cv_path_UNZIP=":"
  ;;
esac
fi
UNZIP="$ac_cv_path_UNZIP"
if test -n "$UNZIP"; then
  echo "$ac_t""$UNZIP" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

for ac_prog in zip
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:3088: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_ZIP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$ZIP" in
  /*)
  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_ZIP="$ZIP" # 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_ZIP="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
ZIP="$ac_cv_path_ZIP"
if test -n "$ZIP"; then
  echo "$ac_t""$ZIP" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$ZIP" && break
done

if test -z "$ZIP" || test "$ZIP" = ":"; then
    { echo "configure: error: zip not found in \$PATH" 1>&2; exit 1; }
fi
# Extract the first word of "makedepend", so it can be a program name with args.
set dummy makedepend; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3129: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SYSTEM_MAKEDEPEND'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$SYSTEM_MAKEDEPEND" in
  /*)
  ac_cv_path_SYSTEM_MAKEDEPEND="$SYSTEM_MAKEDEPEND" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_SYSTEM_MAKEDEPEND="$SYSTEM_MAKEDEPEND" # 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_SYSTEM_MAKEDEPEND="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
SYSTEM_MAKEDEPEND="$ac_cv_path_SYSTEM_MAKEDEPEND"
if test -n "$SYSTEM_MAKEDEPEND"; then
  echo "$ac_t""$SYSTEM_MAKEDEPEND" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

# Extract the first word of "xargs", so it can be a program name with args.
set dummy xargs; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3164: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XARGS'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$XARGS" in
  /*)
  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_XARGS="$XARGS" # 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_XARGS="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
XARGS="$ac_cv_path_XARGS"
if test -n "$XARGS"; then
  echo "$ac_t""$XARGS" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test -z "$XARGS" || test "$XARGS" = ":"; then
    { echo "configure: error: xargs not found in \$PATH ." 1>&2; exit 1; }
fi
# Extract the first word of "doxygen", so it can be a program name with args.
set dummy doxygen; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3202: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_DOXYGEN'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$DOXYGEN" in
  /*)
  ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_DOXYGEN="$DOXYGEN" # 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_DOXYGEN="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_DOXYGEN" && ac_cv_path_DOXYGEN=":"
  ;;
esac
fi
DOXYGEN="$ac_cv_path_DOXYGEN"
if test -n "$DOXYGEN"; then
  echo "$ac_t""$DOXYGEN" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


for ac_prog in 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:3241: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MAKE'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$MAKE" in
  /*)
  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_MAKE="$MAKE" # 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_MAKE="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
MAKE="$ac_cv_path_MAKE"
if test -n "$MAKE"; then
  echo "$ac_t""$MAKE" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

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

_make_try=`$MAKE --version 2>/dev/null`
if test ! "$_make_try"
then
	echo
	echo "*** $MAKE is not GNU Make.  You will not be able to build Mozilla without GNU Make."
	echo
	exit 1
fi
_make_vers=`$MAKE --version | grep Make | $AWK '{ print \$4 }' | sed 's/,//'`
if test "$_make_vers" = "3.77"
then
	echo
	echo "*** Found GNU Make 3.77.  This version is known to have problems with the"
	echo "*** wildcard function in certain circumstances.  You may experience infinite"
	echo "*** looping while building Mozilla with 3.77.  If this happens, you can"
	echo "*** either downgrade to 3.76.1 or try configuring with --disable-md."
	echo
fi

echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:3297: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftestmake <<\EOF
all:
	@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
  eval ac_cv_prog_make_${ac_make}_set=yes
else
  eval ac_cv_prog_make_${ac_make}_set=no
fi
rm -f conftestmake
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  SET_MAKE=
else
  echo "$ac_t""no" 1>&6
  SET_MAKE="MAKE=${MAKE-make}"
fi


# 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:3329: 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 3391 "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:3396: \"$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 3465 "configure"
#include "confdefs.h"

int main() {
${x_direct_test_function}()
; return 0; }
EOF
if { (eval echo configure:3472: \"$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.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:3578: 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 3581 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:3588: \"$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 3604 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:3611: \"$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:3643: 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 3651 "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:3662: \"$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:3684: 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 3692 "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:3703: \"$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:3732: 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 3737 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gethostbyname(); below.  */
#include <assert.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() {

/* 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:3760: \"$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:3781: 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 3789 "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:3800: \"$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:3830: 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 3835 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char connect(); below.  */
#include <assert.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() {

/* 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:3858: \"$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:3879: 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 3887 "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:3898: \"$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:3922: 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 3927 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char remove(); below.  */
#include <assert.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() {

/* 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:3950: \"$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:3971: 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 3979 "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:3990: \"$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:4014: 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 4019 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char shmat(); below.  */
#include <assert.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() {

/* 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:4042: \"$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:4063: 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 4071 "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:4082: \"$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:4115: 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 4123 "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:4134: \"$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


if test "$no_x" != "yes"; then
    CPPFLAGS="$CPPFLAGS $X_CFLAGS"
fi

XCFLAGS="$X_CFLAGS"

fi # SKIP_PATH_CHECKS

AS_BIN=$AS
AR_FLAGS='cr $@'
AR_LIST='$(AR) t'
AR_EXTRACT='$(AR) x'
AR_DELETE='$(AR) d'
AS='$(CC)'
AS_DASH_C_FLAG='-c'
LIB_PREFIX=lib
DLL_SUFFIX=.so
OBJ_SUFFIX=o
LIB_SUFFIX=a
ASM_SUFFIX=s
TARGET_MD_ARCH=unix
DIRENT_INO=d_ino

MOZ_JPEG_CFLAGS=
MOZ_JPEG_LIBS='-L$(DIST)/lib -lmozjpeg'
MOZ_ZLIB_CFLAGS=
MOZ_ZLIB_LIBS='-L$(DIST)/lib -lmozz'
MOZ_PNG_CFLAGS=
MOZ_PNG_LIBS='-L$(DIST)/lib -lmozpng'
MOZ_MNG_CFLAGS=
MOZ_MNG_LIBS='-L$(DIST)/lib -lmozmng'

MOZ_JS_LIBS='-L$(DIST)/bin -lmozjs'
XPCOM_LIBS='-L$(DIST)/bin -lxpcom'

MOZ_COMPONENT_NSPR_LIBS='-L$(DIST)/bin $(NSPR_LIBS)'
MOZ_COMPONENT_XPCOM_LIBS='-L$(DIST)/bin -lxpcom'

_PLATFORM_DEFAULT_TOOLKIT=gtk
MOZ_WIDGET_TOOLKIT_LDFLAGS='-lwidget_$(MOZ_WIDGET_TOOLKIT)'
MOZ_GFX_TOOLKIT_LDFLAGS='-lgfx_$(MOZ_WIDGET_TOOLKIT) $(MOZ_XLIBRGB_LDFLAGS)'
WIDGET_DLL='\"libwidget_$(MOZ_WIDGET_TOOLKIT)$(DLL_SUFFIX)\"'
GFXWIN_DLL='\"libgfx_$(MOZ_GFX_TOOLKIT)$(DLL_SUFFIX)\"'

MOZ_ENABLE_POSTSCRIPT=1 

if test -n "$CROSS_COMPILE"; then
    OS_TARGET="${target_os}"
    OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
    OS_RELEASE=
    OS_TEST="${target_cpu}"
    case "${target_os}" in
        linux*)       OS_ARCH=Linux ;;
        solaris*)     OS_ARCH=SunOS OS_RELEASE=5 ;;
        openvms*)     OS_TARGET=`uname -s`
                      OS_ARCH=`uname -s | sed -e 's|/|_|g'`
                      OS_RELEASE=`uname -r`
                      OS_TEST=`uname -Wh`;;
    esac
else
    OS_TARGET=`uname -s`
    OS_ARCH=`uname -s | sed -e 's|/|_|g'`
    OS_RELEASE=`uname -r`
    OS_TEST=`uname -m`
fi
_COMPILER_PREFIX=

#######################################################################
# Master "Core Components" macros for getting the OS target           #
#######################################################################

#
# Note: OS_TARGET should be specified on the command line for gmake.
# When OS_TARGET=WIN95 is specified, then a Windows 95 target is built.
# The difference between the Win95 target and the WinNT target is that
# the WinNT target uses Windows NT specific features not available
# in Windows 95. The Win95 target will run on Windows NT, but (supposedly)
# at lesser performance (the Win95 target uses threads; the WinNT target
# uses fibers).
#
# When OS_TARGET=WIN16 is specified, then a Windows 3.11 (16bit) target
# is built. See: win16_3.11.mk for lots more about the Win16 target.
#
# If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
# cross-compilation.
#

#
# The following hack allows one to build on a WIN95 machine (as if
# s/he were cross-compiling on a WINNT host for a WIN95 target).
# It also accomodates for MKS's uname.exe.  If you never intend
# to do development on a WIN95 machine, you don't need this hack.
#
if test "$OS_ARCH" = "WIN95"; then
    OS_ARCH=WINNT
    OS_TARGET=WIN95
elif test "$OS_ARCH" = 'Windows_95'; then
    OS_ARCH=Windows_NT
    OS_TARGET=WIN95
elif test "$OS_ARCH" = 'Windows_98'; then
    OS_ARCH=Windows_NT
    OS_TARGET=WIN95
elif test "$OS_ARCH" = "CYGWIN_95-4.0"; then
    OS_ARCH='CYGWIN_NT-4.0'
    OS_TARGET=WIN95
elif test "$OS_ARCH" = "CYGWIN_98-4.10"; then
    OS_ARCH='CYGWIN_NT-4.0'
    OS_TARGET=WIN95
elif test "$OS_ARCH" = "OS_2"; then
    OS_ARCH=OS2
    OS_TARGET=OS2
fi

#
# On WIN32, we also define the variable CPU_ARCH.
#

if test "$OS_ARCH" = "WINNT"; then
    CPU_ARCH=`uname -p`
    if test "$CPU_ARCH" = "I386"; then
        CPU_ARCH=x86
    fi
elif test "$OS_ARCH" = "Windows_NT"; then
#
# If uname -s returns "Windows_NT", we assume that we are using
# the uname.exe in MKS toolkit.
#
# The -r option of MKS uname only returns the major version number.
# So we need to use its -v option to get the minor version number.
# Moreover, it doesn't have the -p option, so we need to use uname -m.
#
    OS_ARCH=WINNT
    OS_MINOR_RELEASE=`uname -v`
    if test "$OS_MINOR_RELEASE" = "00"; then
        OS_MINOR_RELEASE=0
    fi
    OS_RELEASE="${OS_RELEASE}.${OS_MINOR_RELEASE}"
    CPU_ARCH=`uname -m`
    #
    # MKS's uname -m returns "586" on a Pentium machine.
    #
    if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
        CPU_ARCH=x86
    fi
elif echo "$OS_ARCH" | grep -c CYGWIN_NT >/dev/null; then
#
# If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
# the uname.exe in the Cygwin tools.
#
    OS_RELEASE=`echo $OS_ARCH | sed 's|^CYGWIN_NT-||'`
    OS_ARCH=WINNT
    CPU_ARCH=`uname -m`
    #
    # Cygwin's uname -m returns "i686" on a Pentium Pro machine.
    #
    if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
        CPU_ARCH=x86
    fi
elif test "$OS_ARCH" = "CYGWIN32_NT"; then
#
# Prior to the Beta 20 release, Cygwin was called GNU-Win32.
# If uname -s returns "CYGWIN32/NT", we assume that we are using
# the uname.exe in the GNU-Win32 tools.
#
    OS_ARCH=WINNT
    CPU_ARCH=`uname -m`
    #
    # GNU-Win32's uname -m returns "i686" on a Pentium Pro machine.
    #
    if echo "$CPU_ARCH" | grep -c 86 >/dev/null; then
        CPU_ARCH=x86
    fi
fi

if test -n "$MOZILLA_CLIENT" && test "$OS_ARCH" = "WINNT"; then
    OS_TARGET=WIN95
    if test -n "$MOZ_DEBUG"; then
        USE_DEBUG_RTL=1
    fi
fi
if test -z "$OS_TARGET"; then
    OS_TARGET=$OS_ARCH
fi
if test "$OS_TARGET" = "WIN95"; then
    OS_RELEASE="4.0"
fi
if test "$OS_TARGET" = "WIN16"; then
    OS_RELEASE=
fi
OS_CONFIG="${OS_TARGET}${OS_RELEASE}"

if test "$GNU_CC"; then
    MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
    MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
    DSO_LDOPTS='-shared -Wl,-h -Wl,$@'
    DSO_CFLAGS=''
    DSO_PIC_CFLAGS='-fPIC'

    # Turn on GNU specific features
    # -Wall - turn on all warnings
    # -pedantic - make compiler warn about non-ANSI stuff, and
    #             be a little bit stricter
    # Warnings slamm took out for now (these were giving more noise than help):
    # -Wbad-function-cast - warns when casting a function to a new return type
    # -Wconversion - complained when char's or short's were used a function args
    # -Wshadow - removed because it generates more noise than help --pete
    _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wall -W -Wno-unused -Wpointer-arith -Wcast-align"

        _PEDANTIC=1
    _IGNORE_LONG_LONG_WARNINGS=1

    _DEFINES_CFLAGS='-include $(DEPTH)/config-defs.h -DMOZILLA_CLIENT'
    _USE_CPP_INCLUDE_FLAG=1
else
    MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
    MKCSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
    DSO_LDOPTS='-shared -h $@'
    DSO_CFLAGS=''
    DSO_PIC_CFLAGS='-KPIC'
    _DEFINES_CFLAGS='$(ACDEFINES) -DMOZILLA_CLIENT'
fi

if test "$GNU_CXX"; then
    # Turn on GNU specific features
    _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wall -Wconversion -Wpointer-arith -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy"

		if test ! "$QTDIR"; then
    	_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS}"
	fi

    _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -include $(DEPTH)/config-defs.h'
    _USE_CPP_INCLUDE_FLAG=1
else
    _DEFINES_CXXFLAGS='-DMOZILLA_CLIENT $(ACDEFINES)'
fi

MKSHLIB_FORCE_ALL=
MKSHLIB_UNFORCE_ALL=
if test "$GNU_CC"; then
  echo $ac_n "checking whether ld has archive extraction flags""... $ac_c" 1>&6
echo "configure:4399: checking whether ld has archive extraction flags" >&5
  if eval "test \"`echo '$''{'ac_cv_mkshlib_force_and_unforce'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  _SAVE_LDFLAGS=$LDFLAGS; _SAVE_LIBS=$LIBS
    ac_cv_mkshlib_force_and_unforce="no"
    exec 3<&0 <<LOOP_INPUT
	force="-Wl,--whole-archive";   unforce="-Wl,--no-whole-archive"
	force="-Wl,-z -Wl,allextract"; unforce="-Wl,-z -Wl,defaultextract"
	force="-Wl,-all";              unforce="-Wl,-none"
LOOP_INPUT
    while read line
    do
      eval $line
      LDFLAGS=$force
      LIBS=$unforce
      cat > conftest.$ac_ext <<EOF
#line 4416 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_mkshlib_force_and_unforce=$line; break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
    done
    exec 0<&3 3<&-
    LDFLAGS=$_SAVE_LDFLAGS; LIBS=$_SAVE_LIBS
   
fi

  if test "$ac_cv_mkshlib_force_and_unforce" = "no"; then
    echo "$ac_t""no" 1>&6
  else
    echo "$ac_t""yes" 1>&6
    eval $ac_cv_mkshlib_force_and_unforce
    MKSHLIB_FORCE_ALL=$force
    MKSHLIB_UNFORCE_ALL=$unforce
  fi
fi

case "$host" in
*-linux*)
    HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
    ;;

*-osf*)
    HOST_NSPR_MDCPUCFG='\"md/_osf1.cfg\"'
    ;;

esac

case "$target" in
*-aix*)
    if test ! "$GNU_CC"; then
	    # DSO_LDOPTS='-ldl -bM:SRE -p1 -brtl -bso -bexpall -bnoentry'
	    DSO_LDOPTS='-ldl -p1 -brtl -bso -bsymbolic -bnortllib'
	    DSO_CFLAGS='-qflag=w:w'
	    DSO_PIC_CFLAGS='-DPIC'
    fi
    case "${target_os}" in
    aix4.1*)
        DLL_SUFFIX='_shr.a'
        ;;
    esac
    MKSHLIB='$(AIX_SHLIB_BIN) $(DSO_LDOPTS) -o $@'
    MKCSHLIB='$(AIX_SHLIB_BIN) $(DSO_LDOPTS) -o $@'
    cat >> confdefs.h <<\EOF
#define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
EOF

    ;;

*-beos*)
    no_x=yes
    MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@'
    _PLATFORM_DEFAULT_TOOLKIT="beos"
    DSO_LDOPTS='-nostart -Wl,-h -Wl,$@'
    TK_LIBS='-lbe -lroot'
    LIBS="$LIBS -lbe"
    echo $ac_n "checking for main in -lbind""... $ac_c" 1>&6
echo "configure:4487: checking for main in -lbind" >&5
ac_lib_var=`echo bind'_'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="-lbind  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4495 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
if { (eval echo configure:4502: \"$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 -lbind"
else
  echo "$ac_t""no" 1>&6
fi

    _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-multichar"
    _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-multichar"
    ;;

*-bsdi*)
        _PEDANTIC=
    _IGNORE_LONG_LONG_WARNINGS=
    case $OS_RELEASE in
	4.*)
            STRIP="$STRIP -d"
            ;;
	*)
	    DSO_CFLAGS=''
	    DSO_LDOPTS='-r'
	    _WARNINGS_CFLAGS="-Wall"
	    _WARNINGS_CXXFLAGS="-Wall"
	    # The test above doesn't work properly, at least on 3.1.
	    MKSHLIB_FORCE_ALL=''
	    MKSHLIB_UNFORCE_ALL=''
	;;
    esac
    ;;

*-darwin*) 
    cat >> confdefs.h <<\EOF
#define DARWIN 1
EOF

    cat >> confdefs.h <<\EOF
#define TARGET_CARBON 1
EOF

    cat >> confdefs.h <<\EOF
#define TARGET_API_MAC_CARBON 1
EOF

    _PEDANTIC=
    CFLAGS="$CFLAGS -fpascal-strings -traditional-cpp -fno-common"
    CXXFLAGS="$CXXFLAGS -fpascal-strings -traditional-cpp -fno-common"
    DLL_SUFFIX=".dylib"
    DSO_LDOPTS='-compatibility_version 1 -current_version 1'
    STRIP="$STRIP -x -S"
    case "${target_cpu}" in
    powerpc*)
        cat >> confdefs.h <<\EOF
#define NO_X11 1
EOF

        cat >> confdefs.h <<\EOF
#define XP_MACOSX 1
EOF

        cat >> confdefs.h <<\EOF
#define TARGET_CARBON 1
EOF

        cat >> confdefs.h <<\EOF
#define TARGET_API_MAC_CARBON 1
EOF

        no_x=yes
        MACOSX=1
        _PLATFORM_DEFAULT_TOOLKIT='mac'
        DSO_LDOPTS="$DSO_LDOPTS -arch ppc -install_name @executable_path/\$@"
        TK_LIBS='-framework Carbon /System/Library/Frameworks/Carbon.framework/Carbon'
        TK_CFLAGS="-I/Developer/Headers/FlatCarbon -F/System/Library/Frameworks"
        CFLAGS="$CFLAGS $TK_CFLAGS"
        CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
        ;;
    esac
    ;;

*-freebsd*)
    if test `test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` != "elf"; then
	DLL_SUFFIX=".so.1.0"
	DSO_LDOPTS="-shared"
    fi
    if test ! "$GNU_CC"; then
	DSO_LDOPTS="-Bshareable $DSO_LDOPTS"
    fi
# Can't have force w/o an unforce.
#    # Hack for FreeBSD 2.2
#    if test -z "$MKSHLIB_FORCE_ALL"; then
#	MKSHLIB_FORCE_ALL='-Wl,-Bforcearchive'
#	MKSHLIB_UNFORCE_ALL=''
#    fi
    ;; 

*-hpux*)
    DLL_SUFFIX=".sl"
    if test ! "$GNU_CC"; then
    	DSO_LDOPTS='-b -Wl,+s -L$(DIST)/bin'
    	DSO_CFLAGS=""
    	DSO_PIC_CFLAGS="+Z"
    	MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@'
    	MKCSHLIB='$(CC) $(CFLAGS) $(DSO_LDOPTS) -o $@'
    else
    	DSO_LDOPTS='-b -E +s -L$(DIST)/bin -L$(DIST)/lib'
    	MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
    	MKCSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
    fi
    MOZ_POST_PROGRAM_COMMAND='chatr +s enable'
    cat >> confdefs.h <<\EOF
#define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
EOF

    ;;

*-irix5*)
    cat >> confdefs.h <<\EOF
#define IRIX 1
EOF

    DSO_LDOPTS='-elf -shared'
    if test "$GNU_CC"; then
       MKSHLIB_FORCE_ALL='-Wl,-all'
       MKSHLIB_UNFORCE_ALL='-Wl,-none'
       CXXFLAGS="$CXXFLAGS -D_LANGUAGE_C_PLUS_PLUS"
    else
       MKSHLIB_FORCE_ALL='-all'
       MKSHLIB_UNFORCE_ALL='-none'
    fi
    ;;

*-irix6*)
    cat >> confdefs.h <<\EOF
#define IRIX 1
EOF

            USE_N32=1
    DSO_LDOPTS='-elf -shared'
    MKSHLIB='$(CCC) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
    MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
    if test "$GNU_CC"; then
       MKSHLIB_FORCE_ALL='-Wl,-all'
       MKSHLIB_UNFORCE_ALL='-Wl,-none'
       _WARNINGS_CFLAGS="-Wall"
       _WARNINGS_CXXFLAGS="-Wall"
       CXXFLAGS="$CXXFLAGS -D_LANGUAGE_C_PLUS_PLUS"
    else
       MKSHLIB_FORCE_ALL='-all'
       MKSHLIB_UNFORCE_ALL='-none'
	   AR_LIST="$AR t"
	   AR_EXTRACT="$AR x"
	   AR_DELETE="$AR d"
	   AR='$(CXX) -ar'
	   AR_FLAGS='-o $@'
       CFLAGS="$CFLAGS -woff 3262 -G 4"
       CXXFLAGS="$CXXFLAGS -woff 3262 -G 4"
       if test -n "$USE_N32"; then
	   ASFLAGS="$ASFLAGS -n32"
	   CFLAGS="$CFLAGS -n32"
	   CXXFLAGS="$CXXFLAGS -n32"
	   LDFLAGS="$LDFLAGS -n32"
       fi
       cat >> confdefs.h <<\EOF
#define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
EOF

    fi
    if test -z "$GNU_CXX"; then
      MIPSPRO_CXX=1
    fi
    ;;

*-*linux*)
    cat >> confdefs.h <<\EOF
#define _POSIX_SOURCE 1
EOF

    cat >> confdefs.h <<\EOF
#define _SVID_SOURCE 1
EOF

    TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
    LIBS="$LIBS -lc"

    case "${target_cpu}" in
    alpha*)
    	CFLAGS="$CFLAGS -mieee"
    	CXXFLAGS="$CXXFLAGS -mieee"
    ;;
    i?86)
    	USE_ELF_DYNSTR_GC=1
    ;;
    mips*)
        CFLAGS="$CFLAGS -Wa,-xgot"
        CXXFLAGS="$CXXFLAGS -Wa,-xgot"
    ;;
    esac
    ;;

*-mingw*|*-cygwin*|*-msvc*|*-mksnt*)
    if test -n "$GNU_CC"; then
        cat >> confdefs.h <<\EOF
#define WIN32_LEAN_AND_MEAN 1
EOF

        cat >> confdefs.h <<\EOF
#define NONAMELESSUNION 1
EOF

        CFLAGS="$(CFLAGS) -fvtable-thunks"
        CXXFLAGS="$(CXXFLAGS) -fvtable-thunks"
        MKSHLIB='$(DLLTOOL) --as=$(AS) -k --dllname $(LIBRARY_NAME).dll --output-lib $@'
        MKCSHLIB='$(DLLTOOL) --as=$(AS) -k --dllname $(LIBRARY_NAME).dll --output-lib $@'
        MKSHLIB_FORCE_ALL=
        MKSHLIB_UNFORCE_ALL=
    else
        CC=cl
        CXX=cl
        HOST_CC=cl
        LD=link
        AR='lib -NOLOGO -OUT:"$@"'
        AR_FLAGS=
        RANLIB='echo not_ranlib'
        STRIP='echo not_strip'
        RC=rc.exe
        PERL=perl
        XARGS=xargs
        ZIP=zip
        UNZIP=unzip
        GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
        LIB_PREFIX=
    	OBJ_SUFFIX=obj
    	LIB_SUFFIX=lib
    	DLL_SUFFIX=.dll
        MKSHLIB='$(LD) /NOLOGO /DLL /OUT:$@ /PDB:$(PDBFILE) $(DSO_LDOPTS)'
        MKSHLIB_FORCE_ALL=
        MKSHLIB_UNFORCE_ALL=
        DSO_LDOPTS=/SUBSYSTEM:WINDOWS
        DSO_CFLAGS=
        DSO_PIC_CFLAGS=
        CFLAGS="$CFLAGS -W3 -nologo -Gy -Fd\$(PDBFILE)"
        CXXFLAGS="$CXXFLAGS -W3 -nologo -Gy -Fd\$(PDBFILE)"
        LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib"
        MOZ_DEBUG_FLAGS='-Zi'
        MOZ_DEBUG_LDFLAGS='/DEBUG /DEBUGTYPE:CV'
    	MOZ_OPTIMIZE_FLAGS='-O1'
        MOZ_JPEG_LIBS='$(DIST)/lib/jpeg$(MOZ_BITS)$(VERSION_NUMBER).lib'
        MOZ_ZLIB_LIBS='$(DIST)/lib/zlib.lib'
        MOZ_PNG_LIBS='$(DIST)/lib/png.lib'
        MOZ_MNG_LIBS='$(DIST)/lib/mng.lib'
        MOZ_JS_LIBS='$(DIST)/lib/js$(MOZ_BITS)$(VERSION_NUMBER).lib'
        XPCOM_LIBS='$(DIST)/lib/xpcom.lib'
        MOZ_COMPONENT_NSPR_LIBS='$(NSPR_LIBS)'
        MOZ_COMPONENT_XPCOM_LIBS='$(XPCOM_LIBS)'
    fi
    cat >> confdefs.h <<\EOF
#define _WINDOWS 1
EOF

    cat >> confdefs.h <<\EOF
#define _WIN32 1
EOF

    cat >> confdefs.h <<\EOF
#define WIN32 1
EOF

    cat >> confdefs.h <<\EOF
#define XP_PC 1
EOF

    cat >> confdefs.h <<\EOF
#define XP_WIN 1
EOF

    cat >> confdefs.h <<\EOF
#define XP_WIN32 1
EOF

    cat >> confdefs.h <<\EOF
#define HW_THREADS 1
EOF

    cat >> confdefs.h <<EOF
#define WINVER 0x400
EOF

    cat >> confdefs.h <<\EOF
#define MSVC4 1
EOF

    cat >> confdefs.h <<\EOF
#define STDC_HEADERS 1
EOF

    TARGET_MD_ARCH=win32
    OS_TARGET=WINNT
    _PLATFORM_DEFAULT_TOOLKIT='windows'
    BIN_SUFFIX='.exe'
    USE_SHORT_LIBNAME=1
    MOZ_ENABLE_POSTSCRIPT=

        TARGET_NSPR_MDCPUCFG='\"md/_win95.cfg\"'
    no_x=yes
    cat >> confdefs.h <<\EOF
#define NO_X11 1
EOF


        if test `echo $MOZ_BUILD_ROOT | grep -c ^/cygdrive/` != 0; then
        MOZ_BUILD_ROOT=`echo $MOZ_BUILD_ROOT | sed -e 's|^/cygdrive/||' -e 's|/|:/|'`
    fi

    if test "$MOZ_TOOLS"; then
        MOZ_TOOLS_DIR=`cd $MOZ_TOOLS && pwd`
        if test "$?" != "0" || test -z "$MOZ_TOOLS_DIR"; then
            { echo "configure: error: cd \$MOZ_TOOLS failed. MOZ_TOOLS ==? $MOZ_TOOLS" 1>&2; exit 1; }
        fi
        MOZ_TOOLS_DIR=`echo $MOZ_TOOLS_DIR | sed -e 's|^/cygdrive/||' -e 's|/|:/|'`
        GLIB_CFLAGS='-I$(MOZ_TOOLS_DIR)/include'
        GLIB_LIBS='$(MOZ_TOOLS_DIR)/lib/glib-1.2.lib'
        LIBIDL_CFLAGS='-I$(MOZ_TOOLS_DIR)/include'
        LIBIDL_LIBS='$(MOZ_TOOLS_DIR)/lib/libidl-0.6.lib $(MOZ_TOOLS_DIR)/lib/glib-1.2.lib'
   else
        { echo "configure: error: MOZ_TOOLS is not set" 1>&2; exit 1; }
    fi

    case "$target" in
    i?86-*)
    	cat >> confdefs.h <<\EOF
#define _X86_ 1
EOF

	;;
    alpha-*)
    	cat >> confdefs.h <<\EOF
#define _ALPHA_ 1
EOF

	;;
    mips-*)
    	cat >> confdefs.h <<\EOF
#define _MIPS_ 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 -Wl,-soname,lib$(LIBRARY_NAME)$(DLL_SUFFIX)'
	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.
    MKSHLIB_FORCE_ALL='-Wl,--whole-archive'
    MKSHLIB_UNFORCE_ALL='-Wl,--no-whole-archive'
    if test "$LIBRUNPATH"; then
	DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS"
    fi
    ;;

*-nto*) 
	cat >> confdefs.h <<\EOF
#define NTO 1
EOF
	
	cat >> confdefs.h <<\EOF
#define _QNX_SOURCE 1
EOF

	cat >> confdefs.h <<\EOF
#define _i386 1
EOF

	OS_TARGET=NTO
	MOZ_OPTIMIZE_FLAGS="-O"
	MOZ_DEBUG_FLAGS="-gstabs"
	USE_PTHREADS=1
	_PEDANTIC=
	LIBS="$LIBS -lsocket -lstdc++"
	_DEFINES_CFLAGS='-Wp,-include -Wp,$(DEPTH)/config-defs.h -DMOZILLA_CLIENT -D_POSIX_C_SOURCE=199506'
	_DEFINES_CXXFLAGS='-DMOZILLA_CLIENT -Wp,-include -Wp,$(DEPTH)/config-defs.h -D_POSIX_C_SOURCE=199506'
	if test "$with_x" != "yes"
	then
		_PLATFORM_DEFAULT_TOOLKIT="photon"
    	cat >> confdefs.h <<\EOF
#define NO_X11 1
EOF

	    TK_CFLAGS='-I/usr/include/photon'
		TK_LIBS='-lph'
		no_x="yes"
	fi
	case "${target_cpu}" in
	ppc*)
	cat >> confdefs.h <<\EOF
#define HAVE_VA_LIST_AS_ARRAY 1
EOF
	
	;;
	esac
	case "${host_cpu}" in
	i?86)
	USE_ELF_DYNSTR_GC=1
	;;
	esac
	;;

*-openbsd*)
    DLL_SUFFIX=".so.1.0"
    DSO_CFLAGS=''
    DSO_PIC_CFLAGS='-fPIC'
    DSO_LDOPTS='-shared -h $@'
    MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
    MKCSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
    if $CC -E - -dM </dev/null | grep -v __ELF__ >/dev/null; then
	DSO_LDOPTS="-Bshareable /usr/lib/c++rt0.o"
    fi
    if test "$LIBRUNPATH"; then
	DSO_LDOPTS="-R$LIBRUNPATH $DSO_LDOPTS"
    fi
    ;;

*-openvms*) 
    if test "$OS_TARGET" = "POSIX_for_OpenVMS_AXP"; then
		_OPENVMS_CROSS_COMPILE=1
    fi
    cat >> confdefs.h <<\EOF
#define NO_PW_GECOS 1
EOF

    cat >> confdefs.h <<\EOF
#define NO_UDSOCK 1
EOF

    cat >> confdefs.h <<\EOF
#define POLL_WITH_XCONNECTIONNUMBER 1
EOF

    USE_PTHREADS=1
    MKSHLIB_FORCE_ALL='-all'
    MKSHLIB_UNFORCE_ALL='-none'
    ;;


*-*-os2*)
    MOZ_BUILD_ROOT=`pwd -D`
    USE_SHORT_LIBNAME=1
    BIN_SUFFIX='.exe'
    OBJ_SUFFIX=obj
    LIB_SUFFIX=lib
    DLL_SUFFIX=.dll
    ASM_SUFFIX=asm
    DLLTOOL=''
    LD='$(CC)'
    DSO_CFLAGS=''
    DSO_PIC_CFLAGS=''
    OS_ARCH=OS2
    OS_TARGET=OS2
    _PLATFORM_DEFAULT_TOOLKIT=os2
    MOZ_WIDGET_TOOLKIT_LDFLAGS='$(DIST)/lib/wdgt$(MOZ_WIDGET_TOOLKIT)'
    MOZ_GFX_TOOLKIT_LDFLAGS='$(DIST)/lib/gfx_$(MOZ_WIDGET_TOOLKIT)'
    WIDGET_DLL='\"wdgt$(MOZ_WIDGET_TOOLKIT)$(DLL_SUFFIX)\"'
    GFXWIN_DLL='\"gfx_$(MOZ_GFX_TOOLKIT)$(DLL_SUFFIX)\"'
    MOZ_ENABLE_POSTSCRIPT=

    # EMX/GCC build
    if test "$GNU_CC"; then
        _PEDANTIC=''
        AR=emxomfar
        AR_FLAGS='-p256 r $@'
        CFLAGS="-Zmtd -Zomf $CFLAGS"
        CXXFLAGS="-Zmtd -Zomf $CXXFLAGS"
        DSO_LDOPTS='-Zomf -Zdll -Zmt -Zcrtdll -Zlinker /NOO'
        BIN_FLAGS='-Zlinker /PM:VIO -Zlinker /ST:0x30000'
        IMPLIB='emximp -o'
        FILTER='emxexp'
        LIB_PREFIX=lib
        cat >> confdefs.h <<\EOF
#define OS2 1
EOF

        cat >> confdefs.h <<\EOF
#define XP_OS2_EMX 1
EOF

        cat >> confdefs.h <<\EOF
#define OS2EMX_PLAIN_CHAR 1
EOF

        MOZ_COMPONENT_NSPR_LIBS='-L$(DIST)/lib $(NSPR_LIBS)'
        MOZ_COMPONENT_XPCOM_LIBS='-L$(DIST)/lib $(DIST)/lib/xpcom.lib'
        XPCOM_LIBS='-L$(DIST)/lib -lxpcom'
        MOZ_JS_LIBS='$(DIST)/lib/libmozjs.lib'
        MOZ_COMPONENT_XPCOM_LIBS='$(DIST)/lib/libxpcom.lib'
        XPCOM_LIBS='$(DIST)/lib/libxpcom.lib'
        MOZ_JPEG_LIBS='$(DIST)/lib/libmozjpeg.$(LIB_SUFFIX)'
        MOZ_ZLIB_LIBS='$(DIST)/lib/libmozz.$(LIB_SUFFIX)'
        MOZ_PNG_LIBS='$(DIST)/lib/libmozpng.$(LIB_SUFFIX)'
        MOZ_MNG_LIBS='$(DIST)/lib/libmozmng.$(LIB_SUFFIX)'
    fi

    # Visual Age C++ build
    if test "$VACPP" = "yes"; then
#        MOZ_BUILD_ROOT="$ROOT"`pwd -D`
        AR=-ilib
        AR_FLAGS='/NOL /NOI /O:$(subst /,\\,$@)'
        AR_LIST='/L'
        AR_EXTRACT='-*'
        AR_DELETE='-'
        AS=alp
        ASFLAGS='-Mb'
        AS_DASH_C_FLAG=''
        LD='-ilink'
        TARGET_MD_ARCH=os2
        CFLAGS="/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9"
        CXXFLAGS="/Q /qlibansi /Gd+ /Gm+ /Su4 /Mp /Tl9 /Gx+"
        MOZ_DEBUG_FLAGS="/Ti+"
        MOZ_OPTIMIZE_FLAGS="/O+ /qtune=pentium /qarch=pentium"
        LDFLAGS="/NOL /M"
        MOZ_DEBUG_LDFLAGS="/DE"
        MOZ_OPTIMIZE_LDFLAGS="/EXEPACK:2 /PACKCODE /PACKDATA"
        DSO_LDOPTS=''
        IMPLIB='implib /NOL /NOI'
        FILTER='cppfilt -q -B -P'
        LIB_PREFIX=
        cat >> confdefs.h <<\EOF
#define NO_ANSI_KEYWORDS 1
EOF

        cat >> confdefs.h <<\EOF
#define OS2 4
EOF

        cat >> confdefs.h <<\EOF
#define _X86_ 1
EOF

        cat >> confdefs.h <<\EOF
#define XP_OS2_VACPP 1
EOF

        cat >> confdefs.h <<\EOF
#define TCPV40HDRS 1
EOF

        cat >> confdefs.h <<\EOF
#define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
EOF

        cat >> confdefs.h <<\EOF
#define STDC_HEADERS 1
EOF

        MOZ_COMPONENT_NSPR_LIBS='$(NSPR_LIBS)'
        MKSHLIB='$(LD) $(DSO_LDOPTS)'
        MKCSHLIB='$(LD) $(DSO_LDOPTS)'
        MOZ_JS_LIBS='$(DIST)/lib/mozjs.lib'
        MOZ_COMPONENT_XPCOM_LIBS='$(DIST)/lib/xpcom.lib'
        XPCOM_LIBS='$(DIST)/lib/xpcom.lib'
        MOZ_JPEG_LIBS='$(DIST)/lib/mozjpeg.$(LIB_SUFFIX)'
        MOZ_ZLIB_LIBS='$(DIST)/lib/mozz.$(LIB_SUFFIX)'
        MOZ_PNG_LIBS='$(DIST)/lib/mozpng.$(LIB_SUFFIX)'
        MOZ_MNG_LIBS='$(DIST)/lib/mozmng.$(LIB_SUFFIX)'
    fi
    ;;

alpha*-*-osf*)
    if test "$GNU_CC"; then
	DSO_LDOPTS='-shared -Wl,-soname -Wl,$@'
    else
	MOZ_DEBUG_FLAGS='-g3'
	ASFLAGS='-I$(topsrcdir)/xpcom/reflect/xptcall/public -g -std1'
	CFLAGS="$CFLAGS -std1 -ieee"
	CXXFLAGS="$CXXFLAGS "'-noexceptions -ieee  -ptr $(DIST)/cxx_repository'
	DSO_LDOPTS='-shared -msym -expect_unresolved \* -soname $@ -update_registry $(DIST)/so_locations'
	DSO_CFLAGS=
	DSO_PIC_CFLAGS=
	MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
	MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
	MKSHLIB_FORCE_ALL='-all'
	MKSHLIB_UNFORCE_ALL='-none'
		cat >> confdefs.h <<\EOF
#define NSCAP_DISABLE_TEST_DONTQUERY_CASES 1
EOF

	cat >> confdefs.h <<\EOF
#define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
EOF

    fi
    cat >> confdefs.h <<\EOF
#define NEED_USLEEP_PROTOTYPE 1
EOF

    ;;

*-qnx*) 
    DIRENT_INO=d_stat.st_ino
        cat >> confdefs.h <<\EOF
#define NSCAP_DISABLE_TEST_DONTQUERY_CASES 1
EOF

    cat >> confdefs.h <<\EOF
#define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
EOF

        cat >> confdefs.h <<\EOF
#define STDC_HEADERS 1
EOF

    if test "$no_x" = "yes"; then
	    _PLATFORM_DEFAULT_TOOLKIT='photon'
	    TK_CFLAGS='-I/usr/nto/include/photon'
	    TK_LIBS='-lphoton -lphrender'
	    cat >> confdefs.h <<\EOF
#define NO_X11 1
EOF

    fi
    ;;

*-sco*) 
    cat >> confdefs.h <<\EOF
#define NSCAP_DISABLE_TEST_DONTQUERY_CASES 1
EOF

    cat >> confdefs.h <<\EOF
#define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
EOF

    CXXFLAGS="$CXXFLAGS -I/usr/include/CC"
    if test ! "$GNU_CC"; then
       DSO_LDOPTS='-G -h $@'
    fi
    ;;

*-solaris*) 
    cat >> confdefs.h <<\EOF
#define BROKEN_QSORT 1
EOF

    TARGET_NSPR_MDCPUCFG='\"md/_solaris32.cfg\"'
    SYSTEM_MAKEDEPEND=
    if test -z "$GNU_CC"; then
       NS_USE_NATIVE=1
       cat >> confdefs.h <<\EOF
#define NSCAP_DISABLE_DEBUG_PTR_TYPES 1
EOF

       LDFLAGS="-xildoff $LDFLAGS"
       MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_FLAGS) $(DSO_LDOPTS) -o $@'
       MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_FLAGS) $(DSO_LDOPTS) -o $@'
       MKSHLIB_FORCE_ALL='-Qoption ld -z,allextract'
       MKSHLIB_UNFORCE_ALL=''
       DSO_LDOPTS='-G -Qoption ld -z,muldefs -h $@'
       AR_LIST="$AR t"
       AR_EXTRACT="$AR x"
       AR_DELETE="$AR d"
       AR='$(CXX) -xar'
       AR_FLAGS='-o $@'
       AS='/usr/ccs/bin/as'
       ASFLAGS="$ASFLAGS -K PIC -L -P -D_ASM -D__STDC__=0"
       AS_DASH_C_FLAG=''
    else
       ASFLAGS="$ASFLAGS -fPIC"
       DSO_LDOPTS='-G -h $@'
       _WARNINGS_CFLAGS=''
       _WARNINGS_CXXFLAGS=''
       if test "$OS_RELEASE" = "5.3"; then
	  cat >> confdefs.h <<\EOF
#define MUST_UNDEF_HAVE_BOOLEAN_AFTER_INCLUDES 1
EOF

       fi
    fi
    if test "$OS_RELEASE" = "5.5.1"; then
       cat >> confdefs.h <<\EOF
#define NEED_USLEEP_PROTOTYPE 1
EOF

    fi
    ;;

*-sunos*) 
    DSO_LDOPTS='-Bdynamic'
    MKSHLIB='-$(LD) $(DSO_LDOPTS) -o $@'
    MKCSHLIB='-$(LD) $(DSO_LDOPTS) -o $@'
    cat >> confdefs.h <<\EOF
#define SUNOS4 1
EOF

    cat >> confdefs.h <<\EOF
#define SPRINTF_RETURNS_STRING 1
EOF

    case "$(target_os)" in
    sunos4.1*)
        DLL_SUFFIX='.so.1.0'
        ;;
    esac
    ;;

*-sysv4.2uw7*) 
	NSPR_LIBS="-lnspr$NSPR_VERSION -lplc$NSPR_VERSION -lplds$NSPR_VERSION -L/usr/ccs/lib -lcrt"
    ;;

esac

cat >> confdefs.h <<EOF
#define D_INO $DIRENT_INO
EOF


NO_LD_ARCHIVE_FLAGS=
if test -z "$MKSHLIB_FORCE_ALL" || test -z "$MKSHLIB_UNFORCE_ALL"; then
    NO_LD_ARCHIVE_FLAGS=1
fi
case "$target" in
*-*-os2*)
    NO_LD_ARCHIVE_FLAGS=
    ;;
*-aix4.3*)
    NO_LD_ARCHIVE_FLAGS=
    ;;
*-openvms*)
    NO_LD_ARCHIVE_FLAGS=
    ;;
*-msvc*|*-mksnt*|*-mingw*|*-cygwin*)
    if test -z "$GNU_CC"; then
        NO_LD_ARCHIVE_FLAGS=
    fi
    ;;
esac


case "$target" in
    *-hpux*)      
        cat >> confdefs.h <<\EOF
#define MOZ_OJI_REQUIRE_THREAD_SAFE_ON_STARTUP 1
EOF

        ;;
esac


case "$target" in
    *-linux*)
        MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
        ;;
    *-nto*) 
        MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
        ;;
esac

if test -z "$SKIP_COMPILER_CHECKS"; 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 ANSI C header files""... $ac_c" 1>&6
echo "configure:5295: 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 5300 "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:5308: \"$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 5325 "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 5343 "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 5364 "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:5375: \"$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.h <<\EOF
#define STDC_HEADERS 1
EOF

fi

echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:5399: 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 5404 "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:5453: \"$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.h <<\EOF
#define const 
EOF

fi

echo $ac_n "checking for mode_t""... $ac_c" 1>&6
echo "configure:5474: 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 5479 "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.h <<\EOF
#define mode_t int
EOF

fi

echo $ac_n "checking for off_t""... $ac_c" 1>&6
echo "configure:5507: 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 5512 "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.h <<\EOF
#define off_t long
EOF

fi

echo $ac_n "checking for pid_t""... $ac_c" 1>&6
echo "configure:5540: 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 5545 "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.h <<\EOF
#define pid_t int
EOF

fi

echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:5573: 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 5578 "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.h <<\EOF
#define size_t unsigned
EOF

fi

echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
echo "configure:5606: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5611 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "uid_t" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_uid_t=yes
else
  rm -rf conftest*
  ac_cv_type_uid_t=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_type_uid_t" 1>&6
if test $ac_cv_type_uid_t = no; then
  cat >> confdefs.h <<\EOF
#define uid_t int
EOF

  cat >> confdefs.h <<\EOF
#define gid_t int
EOF

fi

echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
echo "configure:5640: checking for st_blksize in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5645 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
int main() {
struct stat s; s.st_blksize;
; return 0; }
EOF
if { (eval echo configure:5653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_st_blksize=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_struct_st_blksize=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
if test $ac_cv_struct_st_blksize = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_ST_BLKSIZE 1
EOF

fi


if test "$VACPP" = "yes"; then
   cat >> confdefs.h <<\EOF
#define __size_t 1
EOF

   cat >> confdefs.h <<\EOF
#define __off_t 1
EOF

fi

echo $ac_n "checking for int16_t""... $ac_c" 1>&6
echo "configure:5686: checking for int16_t" >&5
if eval "test \"`echo '$''{'ac_cv_int16_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5691 "configure"
#include "confdefs.h"
#include <stdio.h>
                  #include <sys/types.h>
int main() {
int16_t foo = 0;
; return 0; }
EOF
if { (eval echo configure:5699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_int16_t=true
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_int16_t=false
fi
rm -f conftest*
fi

if test "$ac_cv_int16_t" = true ; then
  cat >> confdefs.h <<\EOF
#define HAVE_INT16_T 1
EOF

  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for int32_t""... $ac_c" 1>&6
echo "configure:5721: checking for int32_t" >&5
if eval "test \"`echo '$''{'ac_cv_int32_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5726 "configure"
#include "confdefs.h"
#include <stdio.h>
                  #include <sys/types.h>
int main() {
int32_t foo = 0;
; return 0; }
EOF
if { (eval echo configure:5734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_int32_t=true
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_int32_t=false
fi
rm -f conftest*
fi

if test "$ac_cv_int32_t" = true ; then
  cat >> confdefs.h <<\EOF
#define HAVE_INT32_T 1
EOF

  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for int64_t""... $ac_c" 1>&6
echo "configure:5756: checking for int64_t" >&5
if eval "test \"`echo '$''{'ac_cv_int64_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5761 "configure"
#include "confdefs.h"
#include <stdio.h>
                  #include <sys/types.h>
int main() {
int64_t foo = 0;
; return 0; }
EOF
if { (eval echo configure:5769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_int64_t=true
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_int64_t=false
fi
rm -f conftest*
fi

if test "$ac_cv_int64_t" = true ; then
  cat >> confdefs.h <<\EOF
#define HAVE_INT64_T 1
EOF

  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for int64""... $ac_c" 1>&6
echo "configure:5791: checking for int64" >&5
if eval "test \"`echo '$''{'ac_cv_int64'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5796 "configure"
#include "confdefs.h"
#include <stdio.h>
                  #include <sys/types.h>
int main() {
int64 foo = 0;
; return 0; }
EOF
if { (eval echo configure:5804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_int64=true
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_int64=false
fi
rm -f conftest*
fi

if test "$ac_cv_int64" = true ; then
  cat >> confdefs.h <<\EOF
#define HAVE_INT64 1
EOF

  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for uint""... $ac_c" 1>&6
echo "configure:5826: checking for uint" >&5
if eval "test \"`echo '$''{'ac_cv_uint'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5831 "configure"
#include "confdefs.h"
#include <stdio.h>
                  #include <sys/types.h>
int main() {
uint foo = 0;
; return 0; }
EOF
if { (eval echo configure:5839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_uint=true
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_uint=false
fi
rm -f conftest*
fi

if test "$ac_cv_uint" = true ; then
  cat >> confdefs.h <<\EOF
#define HAVE_UINT 1
EOF

  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for uint_t""... $ac_c" 1>&6
echo "configure:5861: checking for uint_t" >&5
if eval "test \"`echo '$''{'ac_cv_uint_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5866 "configure"
#include "confdefs.h"
#include <stdio.h>
                  #include <sys/types.h>
int main() {
uint_t foo = 0;
; return 0; }
EOF
if { (eval echo configure:5874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_uint_t=true
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_uint_t=false
fi
rm -f conftest*
fi

if test "$ac_cv_uint_t" = true ; then
  cat >> confdefs.h <<\EOF
#define HAVE_UINT_T 1
EOF

  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for uint16_t""... $ac_c" 1>&6
echo "configure:5896: checking for uint16_t" >&5
if eval "test \"`echo '$''{'ac_cv_uint16_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5901 "configure"
#include "confdefs.h"
#include <stdio.h>
                  #include <sys/types.h>
int main() {
uint16_t foo = 0;
; return 0; }
EOF
if { (eval echo configure:5909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_uint16_t=true
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_uint16_t=false
fi
rm -f conftest*
fi

if test "$ac_cv_uint16_t" = true ; then
  cat >> confdefs.h <<\EOF
#define HAVE_UINT16_T 1
EOF

  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
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


echo $ac_n "checking for uname.domainname""... $ac_c" 1>&6
echo "configure:5940: checking for uname.domainname" >&5
if eval "test \"`echo '$''{'ac_cv_have_uname_domainname_field'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5945 "configure"
#include "confdefs.h"
#include <sys/utsname.h>
int main() {
 struct utsname *res; char *domain; 
            (void)uname(res);  if (res != 0) { domain = res->domainname; } 
; return 0; }
EOF
if { (eval echo configure:5953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_have_uname_domainname_field=true
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_have_uname_domainname_field=false
fi
rm -f conftest*
fi


if test "$ac_cv_have_uname_domainname_field" = "true"; then
    cat >> confdefs.h <<\EOF
#define HAVE_UNAME_DOMAINNAME_FIELD 1
EOF

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

echo $ac_n "checking for uname.__domainname""... $ac_c" 1>&6
echo "configure:5977: checking for uname.__domainname" >&5
if eval "test \"`echo '$''{'ac_cv_have_uname_us_domainname_field'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5982 "configure"
#include "confdefs.h"
#include <sys/utsname.h>
int main() {
 struct utsname *res; char *domain; 
            (void)uname(res);  if (res != 0) { domain = res->__domainname; } 
; return 0; }
EOF
if { (eval echo configure:5990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_have_uname_us_domainname_field=true
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_have_uname_us_domainname_field=false
fi
rm -f conftest*
fi


if test "$ac_cv_have_uname_us_domainname_field" = "true"; then
    cat >> confdefs.h <<\EOF
#define HAVE_UNAME_US_DOMAINNAME_FIELD 1
EOF

    echo "$ac_t""yes" 1>&6
else
    echo "$ac_t""no" 1>&6
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 64-bit OS""... $ac_c" 1>&6
echo "configure:6022: checking for 64-bit OS" >&5
if test "$cross_compiling" = yes; then
  result="maybe" 
else
  cat > conftest.$ac_ext <<EOF
#line 6027 "configure"
#include "confdefs.h"
 int main () {
    if (sizeof(long) == 8) { return 0; } return 1; } 
EOF
if { (eval echo configure:6032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  result="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  result="no"
fi
rm -fr conftest*
fi

echo "$ac_t"""$result"" 1>&6
if test "$result" = "yes"; then
    cat >> confdefs.h <<\EOF
#define HAVE_64BIT_OS 1
EOF

    HAVE_64BIT_OS=1
fi


if test "$HAVE_64BIT_OS"; then
	case "$target_os" in
	solaris*) TARGET_NSPR_MDCPUCFG='\"md/_solaris64.cfg\"' ;;
	esac
fi


echo $ac_n "checking for usable wchar_t (2 bytes, unsigned)""... $ac_c" 1>&6
echo "configure:6062: checking for usable wchar_t (2 bytes, unsigned)" >&5
if eval "test \"`echo '$''{'ac_cv_have_usable_wchar'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_have_usable_wchar="maybe"
else
  cat > conftest.$ac_ext <<EOF
#line 6070 "configure"
#include "confdefs.h"
#include <wchar.h>
                 int main () {
                   return (sizeof(wchar_t) != 2) ||
                          (wchar_t)-1 < (wchar_t) 0 ; } 
EOF
if { (eval echo configure:6077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_have_usable_wchar="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_have_usable_wchar="no"
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$ac_cv_have_usable_wchar" 1>&6
if test "$ac_cv_have_usable_wchar" = "yes"; then
    cat >> confdefs.h <<\EOF
#define HAVE_CPP_2BYTE_WCHAR_T 1
EOF

    HAVE_CPP_2BYTE_WCHAR_T=1
else

    _SAVE_CFLAGS=$CFLAGS
    _SAVE_CC=$CC
    CC=$CXX
    CFLAGS="$CFLAGS -fshort-wchar"

    echo $ac_n "checking for compiler -fshort-wchar option""... $ac_c" 1>&6
echo "configure:6106: checking for compiler -fshort-wchar option" >&5
if eval "test \"`echo '$''{'ac_cv_have_usable_wchar_option'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_have_usable_wchar_option="maybe"
else
  cat > conftest.$ac_ext <<EOF
#line 6114 "configure"
#include "confdefs.h"
#include <wchar.h>
                     int main () {
                       return (sizeof(wchar_t) != 2) ||
                              (wchar_t)-1 < (wchar_t) 0 ; } 
EOF
if { (eval echo configure:6121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_have_usable_wchar_option="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_have_usable_wchar_option="no"
fi
rm -fr conftest*
fi

fi

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

    if test "$ac_cv_have_usable_wchar_option" = "yes"; then
        cat >> confdefs.h <<\EOF
#define HAVE_CPP_2BYTE_WCHAR_T 1
EOF

        HAVE_CPP_2BYTE_WCHAR_T=1
        CXXFLAGS="$CXXFLAGS -fshort-wchar"
    else    
        CFLAGS=$_SAVE_CFLAGS
    fi
    CC=$_SAVE_CC
fi

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:6155: 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 6160 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
int main() {
DIR *dirp = 0;
; return 0; }
EOF
if { (eval echo configure:6168: \"$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.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:6193: 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 6201 "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:6212: \"$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:6234: 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 6242 "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:6253: \"$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
os2*)
    LIBS=
    ;;
freebsd*)
# for stuff like -lXshm
    CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}"
    ;;
esac
for ac_hdr in sys/byteorder.h compat.h getopt.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6288: 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 6293 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6298: \"$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
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_hdr in sys/bittypes.h memory.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6328: 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 6333 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6338: \"$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
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_hdr in gnu/libc-version.h nl_types.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6368: 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 6373 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6378: \"$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
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_hdr in X11/XKBlib.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6408: 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 6413 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6418: \"$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
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  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:6449: 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 6454 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6459: \"$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
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


case $target in
*-aix4.3*)
	;;
*)
	for ac_hdr in sys/cdefs.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6494: 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 6499 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6504: \"$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
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

	;;
esac

case $target in
*-hpux11.*)
	;;
*)
	echo $ac_n "checking for gethostbyname_r in -lc_r""... $ac_c" 1>&6
echo "configure:6538: 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 6546 "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:6557: \"$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.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lc_r $LIBS"

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

	;;
esac
echo $ac_n "checking for atan in -lm""... $ac_c" 1>&6
echo "configure:6587: checking for atan in -lm" >&5
ac_lib_var=`echo m'_'atan | 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="-lm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6595 "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 atan();

int main() {
atan()
; return 0; }
EOF
if { (eval echo configure:6606: \"$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 m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lm $LIBS"

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

echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:6634: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | 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="-ldl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6642 "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:6653: \"$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 dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-ldl $LIBS"

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

if test ! "$GNU_CXX"; then

    case $target in
    *-aix*)
	echo $ac_n "checking for demangle in -lC_r""... $ac_c" 1>&6
echo "configure:6685: checking for demangle in -lC_r" >&5
ac_lib_var=`echo C_r'_'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_r  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6693 "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:6704: \"$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.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lC_r $LIBS"

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

	;;
     *)
	echo $ac_n "checking for demangle in -lC""... $ac_c" 1>&6
echo "configure:6734: 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 6742 "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:6753: \"$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.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lC $LIBS"

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

	;;
     esac
fi
echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
echo "configure:6784: 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 6792 "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:6803: \"$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.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 "$no_x" = "yes"; then
    cat >> confdefs.h <<\EOF
#define NO_X11 1
EOF

else
    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:6848: 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 6856 "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:6867: \"$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:6889: 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 6897 "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:6908: \"$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

	echo $ac_n "checking for IceFlush in -lICE""... $ac_c" 1>&6
echo "configure:6930: 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 $XLIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6938 "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:6949: \"$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
  XICE_LIBS="-lICE"
else
  echo "$ac_t""no" 1>&6
fi

	echo $ac_n "checking for SmcCloseConnection in -lSM""... $ac_c" 1>&6
echo "configure:6970: 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 $XLIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6978 "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:6989: \"$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
  XSM_LIBS="-lSM"
else
  echo "$ac_t""no" 1>&6
fi

	echo $ac_n "checking for XtFree in -lXt""... $ac_c" 1>&6
echo "configure:7010: 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 $XLIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7018 "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:7029: \"$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
MISSING_X="$MISSING_X -lXt"
fi


                echo $ac_n "checking for XineramaIsActive in -lXinerama""... $ac_c" 1>&6
echo "configure:7052: checking for XineramaIsActive in -lXinerama" >&5
ac_lib_var=`echo Xinerama'_'XineramaIsActive | 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="-lXinerama $XLIBS $XEXT_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7060 "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 XineramaIsActive();

int main() {
XineramaIsActive()
; return 0; }
EOF
if { (eval echo configure:7071: \"$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_XINERAMA_LIBS="-lXinerama"
else
  echo "$ac_t""no" 1>&6
fi

    ac_safe=`echo "X11/extensions/Xinerama.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/extensions/Xinerama.h""... $ac_c" 1>&6
echo "configure:7093: checking for X11/extensions/Xinerama.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 7098 "configure"
#include "confdefs.h"
#include <X11/extensions/Xinerama.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7103: \"$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
fi


                echo $ac_n "checking for XShmCreateImage in -lXext""... $ac_c" 1>&6
echo "configure:7126: 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 7134 "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:7145: \"$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/XShm.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
echo "configure:7167: checking for X11/extensions/XShm.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 7172 "configure"
#include "confdefs.h"
#include <X11/extensions/XShm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7177: \"$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
fi

    if test -n "$ac_cv_header_X11_extensions_XShm_h" &&
        test -n "$_HAVE_XSHM_XEXT"; then
        cat >> confdefs.h <<\EOF
#define HAVE_XSHM 1
EOF

    fi

                echo $ac_n "checking for XieFloGeometry in -lXIE""... $ac_c" 1>&6
echo "configure:7207: checking for XieFloGeometry in -lXIE" >&5
ac_lib_var=`echo XIE'_'XieFloGeometry | 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="-lXIE $XLIBS $XEXT_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 7215 "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 XieFloGeometry();

int main() {
XieFloGeometry()
; return 0; }
EOF
if { (eval echo configure:7226: \"$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_XIE_LIBS="-lXIE"
else
  echo "$ac_t""no" 1>&6
fi

    ac_safe=`echo "X11/extensions/XIElib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/extensions/XIElib.h""... $ac_c" 1>&6
echo "configure:7248: checking for X11/extensions/XIElib.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 7253 "configure"
#include "confdefs.h"
#include <X11/extensions/XIElib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7258: \"$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
fi


    if test "$MOZ_XIE_LIBS"; then
				case $target in
	    *-hpux*)
		;;
	    *)
		HAVE_XIE=1
		;;
	esac
    fi

	LDFLAGS="$_SAVE_LDFLAGS"

                _SAVE_CFLAGS=$CFLAGS
    CFLAGS="$CFLAGS $XCFLAGS"
    cat > conftest.$ac_ext <<EOF
#line 7295 "configure"
#include "confdefs.h"

        #include <stdio.h>
        #include <X11/Xlib.h>
    
int main() {

        Display *dpy = 0;
        if ((dpy = XOpenDisplay(NULL)) == NULL) {
            fprintf(stderr, ": can't open %s\en", XDisplayName(NULL));
            exit(1);
        }
    
; return 0; }
EOF
if { (eval echo configure:7311: \"$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: Could not compile basic X program." 1>&2; exit 1; } 
fi
rm -f conftest*
    CFLAGS="$_SAVE_CFLAGS"

fi # $no_x






echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
echo "configure:7330: checking for pthread_create in -lpthreads" >&5
echo "
    #include <pthread.h> 
    void *foo(void *v) { int a = 1;  } 
    int main() { 
        pthread_t t;
        if (!pthread_create(&t, 0, &foo, 0)) {
            pthread_join(t, 0);
        }
        exit(0);
    }" > dummy.c ;
    echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS" 1>&5;
    ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthreads $LDFLAGS $LIBS 2>&5;
    _res=$? ;
    rm -f dummy.c dummy${ac_exeext} ;
    if test "$_res" = "0"; then
        echo "$ac_t""yes" 1>&6
        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:7352: checking for pthread_create in -lpthread" >&5
echo "
    #include <pthread.h> 
    void *foo(void *v) { int a = 1;  } 
    int main() { 
        pthread_t t;
        if (!pthread_create(&t, 0, &foo, 0)) {
            pthread_join(t, 0);
        }
        exit(0);
    }" > dummy.c ;
    echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS" 1>&5;
    ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lpthread $LDFLAGS $LIBS 2>&5;
    _res=$? ;
    rm -f dummy.c dummy${ac_exeext} ;
    if test "$_res" = "0"; then
        echo "$ac_t""yes" 1>&6
        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:7374: checking for pthread_create in -lc_r" >&5
echo "
    #include <pthread.h> 
    void *foo(void *v) { int a = 1;  } 
    int main() { 
        pthread_t t;
        if (!pthread_create(&t, 0, &foo, 0)) {
            pthread_join(t, 0);
        }
        exit(0);
    }" > dummy.c ;
    echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS" 1>&5;
    ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc_r $LDFLAGS $LIBS 2>&5;
    _res=$? ;
    rm -f dummy.c dummy${ac_exeext} ;
    if test "$_res" = "0"; then
        echo "$ac_t""yes" 1>&6
        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:7396: checking for pthread_create in -lc" >&5
echo "
    #include <pthread.h> 
    void *foo(void *v) { int a = 1;  } 
    int main() { 
        pthread_t t;
        if (!pthread_create(&t, 0, &foo, 0)) {
            pthread_join(t, 0);
        }
        exit(0);
    }" > dummy.c ;
    echo "${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS" 1>&5;
    ${CC-cc} -o dummy${ac_exeext} dummy.c $CFLAGS $CPPFLAGS -lc $LDFLAGS $LIBS 2>&5;
    _res=$? ;
    rm -f dummy.c dummy${ac_exeext} ;
    if test "$_res" = "0"; then
        echo "$ac_t""yes" 1>&6
        USE_PTHREADS=1
            
    else
        echo "$ac_t""no" 1>&6
        
    fi

        
    fi

    
    fi


    fi


# 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 "$USE_PTHREADS"x = x; then
    { echo "configure: error:  --with-pthreads specified for a system without pthread support " 1>&2; exit 1; };
fi
  elif test "$withval" = "no"; then
    USE_PTHREADS=
    _PTHREAD_LDFLAGS=

  else
    { echo "configure: error: Option, pthreads, does not take an argument ($withval)." 1>&2; exit 1; }
  fi
fi


if test "$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:7452: 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`" && test -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:7475: 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`" && test -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.h <<\EOF
#define _REENTRANT 1
EOF

			cat >> confdefs.h <<\EOF
#define _THREAD_SAFE 1
EOF

						if test "$ac_cv_have_dash_pthread" = "yes"; then
				_PTHREAD_LDFLAGS="-pthread"
			else
				_PTHREAD_LDFLAGS="-lc_r"
			fi
			;;

	    *-*-openbsd*|*-*-bsdi*)
			cat >> confdefs.h <<\EOF
#define _REENTRANT 1
EOF

			cat >> confdefs.h <<\EOF
#define _THREAD_SAFE 1
EOF

						if test "$ac_cv_have_dash_pthread" = "yes"; then
				_PTHREAD_LDFLAGS=""
			else
				_PTHREAD_LDFLAGS="-lc_r"
			fi
			;;

	    *-*-linux*) 
			cat >> confdefs.h <<\EOF
#define _REENTRANT 1
EOF
 
			;;

	    *-*-nto*) 
			cat >> confdefs.h <<\EOF
#define _REENTRANT 1
EOF
 
			;;

	    *-aix4.3*)
			cat >> confdefs.h <<\EOF
#define _REENTRANT 1
EOF
 
			;;

	    *-hpux11.*)
			cat >> confdefs.h <<\EOF
#define _REENTRANT 1
EOF
 
			;;

	    *-*-os2*)
	    USE_PTHREADS=
	    _PTHREAD_LDFLAGS=
	    ;;

	    alpha*-*-osf*)
			cat >> confdefs.h <<\EOF
#define _REENTRANT 1
EOF

			;;

	    *-*-solaris*) 
    			cat >> confdefs.h <<\EOF
#define _REENTRANT 1
EOF
 
			if test ! "$GNU_CC"; then
				CFLAGS="$CFLAGS -mt" 
				CXXFLAGS="$CXXFLAGS -mt" 
			fi
			;;
	*-*-netbsd*)
		USE_PTHREADS=
		_PTHREAD_LDFLAGS=
	esac
fi

echo $ac_n "checking whether mmap() sees write()s""... $ac_c" 1>&6
echo "configure:7579: checking whether mmap() sees write()s" >&5


mmap_test_prog='
    #include <stdlib.h>
    #include <unistd.h>
    #include <sys/mman.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <fcntl.h>

    char fname[] = "conftest.file";
    char zbuff[1024]; /* Fractional page is probably worst case */

    int main() {
	char *map;
	int fd;
	int i;
	unlink(fname);
	fd = open(fname, O_RDWR | O_CREAT, 0660);
	if(fd<0) return 1;
	unlink(fname);
	write(fd, zbuff, sizeof(zbuff));
	lseek(fd, 0, SEEK_SET);
	map = (char*)mmap(0, sizeof(zbuff), PROT_READ, MAP_SHARED, fd, 0);
	if(map==(char*)-1) return 2;
	for(i=0; fname[i]; i++) {
	    int rc = write(fd, &fname[i], 1);
	    if(map[i]!=fname[i]) return 4;
	}
	return 0;
    }
'


if test "$cross_compiling" = yes; then
  result="yes"
else
  cat > conftest.$ac_ext <<EOF
#line 7618 "configure"
#include "confdefs.h"
$mmap_test_prog 
EOF
if { (eval echo configure:7622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  result="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  result="no"
fi
rm -fr conftest*
fi


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

if test "$result" = "no"; then
    cat >> confdefs.h <<\EOF
#define MMAP_MISSES_WRITES 1
EOF

fi


if test $ac_cv_prog_gcc = yes; then
    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
echo "configure:7647: 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 7653 "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 7671 "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:7693: 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 7701 "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:7711: \"$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 random strerror lchown fchmod snprintf localtime_r statvfs memmove rint
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7731: 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 7736 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.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 $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:7759: \"$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.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_func in nl_langinfo strtok_r flockfile
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7786: 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 7791 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.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 $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:7814: \"$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.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


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 gnu_get_libc_version()""... $ac_c" 1>&6
echo "configure:7847: checking for gnu_get_libc_version()" >&5
if eval "test \"`echo '$''{'ac_cv_func_gnu_get_libc_version'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7852 "configure"
#include "confdefs.h"

        #ifdef HAVE_GNU_LIBC_VERSION_H
        #include <gnu/libc-version.h>
        #endif
        
int main() {
const char *glibc_version = gnu_get_libc_version();
; return 0; }
EOF
if { (eval echo configure:7863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_func_gnu_get_libc_version=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_gnu_get_libc_version=no 
        
fi
rm -f conftest*
    
fi

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

if test "$ac_cv_func_gnu_get_libc_version" = "yes"; then
    cat >> confdefs.h <<\EOF
#define HAVE_GNU_GET_LIBC_VERSION 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


echo $ac_n "checking whether va_list assignments need array notation""... $ac_c" 1>&6
echo "configure:7894: checking whether va_list assignments need array notation" >&5
if eval "test \"`echo '$''{'ac_cv_valistisarray'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_valistisarray=false
else
  cat > conftest.$ac_ext <<EOF
#line 7902 "configure"
#include "confdefs.h"
#include <stdlib.h>
		     #include <stdarg.h>
		     void foo(int i, ...) {
			va_list ap1, ap2;
			va_start(ap1, i);
			ap2 = ap1;
			if (va_arg(ap2, int) != 123 || va_arg(ap1, int) != 123) { exit(1); }
			va_end(ap1); va_end(ap2);
		     }
		     int main() { foo(0, 123); return(0); }
EOF
if { (eval echo configure:7915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_valistisarray=false
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_valistisarray=true
fi
rm -fr conftest*
fi

fi


if test "$ac_cv_valistisarray" = true ; then
	cat >> confdefs.h <<\EOF
#define HAVE_VA_LIST_AS_ARRAY 1
EOF

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

case "$target" in
	*-linux*)
	    	    curdir=`pwd`
	    rm -f conftest* /tmp/conftest*
	    cat >> conftest.C <<\EOF
#include <stdio.h>
#include <link.h>
#include <dlfcn.h>
#ifdef _dl_loaded
void __dump_link_map(void) {
  struct link_map *map = _dl_loaded;
  while (NULL != map) {printf("0x%08x %s\n", map->l_addr, map->l_name); map = map->l_next;}
}
int main() {
  dlopen("./conftest1.so",RTLD_LAZY);
  dlopen("./../tmp/conftest1.so",RTLD_LAZY);
  dlopen("/tmp/conftest1.so",RTLD_LAZY);
  dlopen("/tmp/../tmp/conftest1.so",RTLD_LAZY);
  __dump_link_map();
}
#else
/* _dl_loaded isn't defined, so this should be either a libc5 (glibc1) system, or a glibc2 system that doesn't have the multiple load bug (i.e., RH6.0).*/
int main() { printf("./conftest1.so\n"); }
#endif
EOF

	    cat >> conftest1.C <<\EOF
#include <stdio.h>
void foo(void) {printf("foo in dll called\n");}
EOF

	    ${CXX-g++} -fPIC -c -g conftest1.C
	    ${CXX-g++} -shared -Wl,-h -Wl,conftest1.so -o conftest1.so conftest1.o
	    ${CXX-g++} -g conftest.C -o conftest -ldl
	    cp -f conftest1.so conftest /tmp
	    cd /tmp
	    if test `./conftest | grep conftest1.so | wc -l` -gt 1
	    then
		echo
		echo "*** Your libc has a bug that can result in loading the same dynamic"
		echo "*** library multiple times.  This bug is known to be fixed in glibc-2.0.7-32"
		echo "*** or later.  However, if you choose not to upgrade, the only effect"
		echo "*** will be excessive memory usage at runtime."
		echo
	    fi
	    cd ${curdir}
	    rm -f conftest* /tmp/conftest*
	    	    ;;
esac

if test "$GNU_CXX"; then

  _MOZ_RTTI_FLAGS=${_COMPILER_PREFIX}-fno-rtti

  echo $ac_n "checking for C++ exceptions flag""... $ac_c" 1>&6
echo "configure:7995: checking for C++ exceptions flag" >&5

    if eval "test \"`echo '$''{'ac_cv_cxx_exceptions_flags'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo "int main() { return 0; }" | cat > conftest.C

  ${CXX-g++} ${CXXFLAGS} -c -fno-handle-exceptions conftest.C > conftest.out 2>&1

  if egrep "warning.*renamed" conftest.out >/dev/null; then
    ac_cv_cxx_exceptions_flags=${_COMPILER_PREFIX}-fno-exceptions
  else
    ac_cv_cxx_exceptions_flags=${_COMPILER_PREFIX}-fno-handle-exceptions
  fi

  rm -f conftest*
fi


  echo "$ac_t""$ac_cv_cxx_exceptions_flags" 1>&6
  _MOZ_EXCEPTIONS_FLAGS=$ac_cv_cxx_exceptions_flags
fi
if test "$MIPSPRO_CXX"; then
  _MOZ_EXCEPTIONS_FLAGS="-LANG:exceptions=OFF"
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


HAVE_GCC3_ABI=
if test "$GNU_CC"; then
  echo $ac_n "checking for gcc 3.0 ABI""... $ac_c" 1>&6
echo "configure:8032: checking for gcc 3.0 ABI" >&5
if eval "test \"`echo '$''{'ac_cv_gcc_three_abi'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8037 "configure"
#include "confdefs.h"

int main() {

#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
  return 0;
#else
#error Not gcc3.
#endif
                      
; return 0; }
EOF
if { (eval echo configure:8050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_gcc_three_abi="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_gcc_three_abi="no"
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_gcc_three_abi" 1>&6
  if test "$ac_cv_gcc_three_abi" = "yes"; then
      HAVE_GCC3_ABI=1
  fi
fi



echo $ac_n "checking for ios::binary""... $ac_c" 1>&6
echo "configure:8071: checking for ios::binary" >&5
if eval "test \"`echo '$''{'ac_cv_ios_binary'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8076 "configure"
#include "confdefs.h"
#include <iostream.h>
	         #include <fstream.h>
int main() {
char *buffer = "config.log";
		  fstream *mFileStream=new fstream(buffer, ios::binary);
; return 0; }
EOF
if { (eval echo configure:8085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_ios_binary=true
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_ios_binary=false
fi
rm -f conftest*
fi

if test "$ac_cv_ios_binary" = true ; then
  cat >> confdefs.h <<\EOF
#define HAVE_IOS_BINARY 1
EOF

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


echo $ac_n "checking for ios::bin""... $ac_c" 1>&6
echo "configure:8109: checking for ios::bin" >&5
if eval "test \"`echo '$''{'ac_cv_ios_bin'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8114 "configure"
#include "confdefs.h"
#include <iostream.h>
               #include <fstream.h>
int main() {
char *buffer = "config.log";
                fstream *mFileStream=new fstream(buffer, ios::bin);
; return 0; }
EOF
if { (eval echo configure:8123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_ios_bin=true
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_ios_bin=false
fi
rm -f conftest*
fi

if test "$ac_cv_ios_bin" = true ; then
  cat >> confdefs.h <<\EOF
#define HAVE_IOS_BIN 1
EOF

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

echo $ac_n "checking for C++ \"explicit\" keyword""... $ac_c" 1>&6
echo "configure:8146: checking for C++ \"explicit\" keyword" >&5
if eval "test \"`echo '$''{'ac_cv_cpp_explicit'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8151 "configure"
#include "confdefs.h"
class X {
                               public: explicit X(int i) : i_(i) {}
                               private: int i_;
                               };
int main() {
X x(3);
; return 0; }
EOF
if { (eval echo configure:8161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_cpp_explicit=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_cpp_explicit=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_cpp_explicit" 1>&6
if test "$ac_cv_cpp_explicit" = yes ; then
   cat >> confdefs.h <<\EOF
#define HAVE_CPP_EXPLICIT 1
EOF

fi

echo $ac_n "checking for C++ template specialization support""... $ac_c" 1>&6
echo "configure:8182: checking for C++ template specialization support" >&5
if eval "test \"`echo '$''{'ac_cv_cpp_template_specialization'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8187 "configure"
#include "confdefs.h"
template <class T> struct X { int a; };
                               class Y {};
                               struct X<Y> { double a; };
int main() {
X<int> int_x;
                               X<Y> y_x;
; return 0; }
EOF
if { (eval echo configure:8197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_cpp_template_specialization=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_cpp_template_specialization=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_cpp_template_specialization" 1>&6
case "$target" in
  *-*-solaris*)
	if test ! "$GNU_CC"; then
	   if test ! -z "`${CC} -V 2>&1 | head -1 | grep '4.2'`"; then
             ac_cv_cpp_template_specialization=no
	   fi
	fi
	;;
esac
if test "$ac_cv_cpp_template_specialization" = yes ; then
  cat >> confdefs.h <<\EOF
#define HAVE_CPP_SPECIALIZATION 1
EOF

fi

echo $ac_n "checking for modern C++ template specialization syntax support""... $ac_c" 1>&6
echo "configure:8227: checking for modern C++ template specialization syntax support" >&5
if eval "test \"`echo '$''{'ac_cv_cpp_modern_specialize_template_syntax'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8232 "configure"
#include "confdefs.h"
template <class T> struct X { int a; };
                               class Y {};
                               template <> struct X<Y> { double a; };
int main() {
X<int> int_x;
                               X<Y> y_x;
; return 0; }
EOF
if { (eval echo configure:8242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_cpp_modern_specialize_template_syntax=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_cpp_modern_specialize_template_syntax=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_cpp_modern_specialize_template_syntax" 1>&6
if test "$ac_cv_cpp_modern_specialize_template_syntax" = yes ; then
  cat >> confdefs.h <<\EOF
#define HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX 1
EOF

fi


echo $ac_n "checking whether partial template specialization works""... $ac_c" 1>&6
echo "configure:8264: checking whether partial template specialization works" >&5
if eval "test \"`echo '$''{'ac_cv_cpp_partial_specialization'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8269 "configure"
#include "confdefs.h"
template <class T> class Foo {};
                               template <class T> class Foo<T*> {};
int main() {
return 0;
; return 0; }
EOF
if { (eval echo configure:8277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_cpp_partial_specialization=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_cpp_partial_specialization=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_cpp_partial_specialization" 1>&6
if test "$ac_cv_cpp_partial_specialization" = yes ; then
  cat >> confdefs.h <<\EOF
#define HAVE_CPP_PARTIAL_SPECIALIZATION 1
EOF

fi


echo $ac_n "checking whether operators must be re-defined for templates derived from templates""... $ac_c" 1>&6
echo "configure:8299: checking whether operators must be re-defined for templates derived from templates" >&5
if eval "test \"`echo '$''{'ac_cv_need_derived_template_operators'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8304 "configure"
#include "confdefs.h"
template <class T> class Base { };
                                template <class T>
                                Base<T> operator+(const Base<T>& lhs, const Base<T>& rhs) { return lhs; }
                                template <class T> class Derived : public Base<T> { };
int main() {
Derived<char> a, b;
                                Base<char> c = a + b;
                                return 0;
; return 0; }
EOF
if { (eval echo configure:8316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_need_derived_template_operators=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_need_derived_template_operators=yes
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_need_derived_template_operators" 1>&6
if test "$ac_cv_need_derived_template_operators" = yes ; then
  cat >> confdefs.h <<\EOF
#define NEED_CPP_DERIVED_TEMPLATE_OPERATORS 1
EOF

fi


echo $ac_n "checking whether we need to cast a derived template to pass as its base class""... $ac_c" 1>&6
echo "configure:8338: checking whether we need to cast a derived template to pass as its base class" >&5
if eval "test \"`echo '$''{'ac_cv_need_cpp_template_cast_to_base'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8343 "configure"
#include "confdefs.h"
template <class T> class Base { };
                                template <class T> class Derived : public Base<T> { };
                                template <class T> int foo(const Base<T>&) { return 0; }
int main() {
Derived<char> bar; return foo(bar);
; return 0; }
EOF
if { (eval echo configure:8352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_need_cpp_template_cast_to_base=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_need_cpp_template_cast_to_base=yes
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_need_cpp_template_cast_to_base" 1>&6
if test "$ac_cv_need_cpp_template_cast_to_base" = yes ; then
  cat >> confdefs.h <<\EOF
#define NEED_CPP_TEMPLATE_CAST_TO_BASE 1
EOF

fi

echo $ac_n "checking whether the compiler can resolve const ambiguities for templates""... $ac_c" 1>&6
echo "configure:8373: checking whether the compiler can resolve const ambiguities for templates" >&5
if eval "test \"`echo '$''{'ac_cv_can_resolve_const_ambiguity'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8378 "configure"
#include "confdefs.h"

                                template <class T> class ptrClass {
                                  public: T* ptr;
                                };

                                template <class T> T* a(ptrClass<T> *arg) {
                                  return arg->ptr;
                                }

                                template <class T>
                                const T* a(const ptrClass<T> *arg) {
                                  return arg->ptr;
                                }
                               
int main() {
 ptrClass<int> i;
                                 a(&i); 
; return 0; }
EOF
if { (eval echo configure:8399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_can_resolve_const_ambiguity=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_can_resolve_const_ambiguity=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_can_resolve_const_ambiguity" 1>&6
if test "$ac_cv_can_resolve_const_ambiguity" = no ; then
  cat >> confdefs.h <<\EOF
#define CANT_RESOLVE_CPP_CONST_AMBIGUITY 1
EOF

fi


echo $ac_n "checking whether the C++ \"using\" keyword can change access""... $ac_c" 1>&6
echo "configure:8421: checking whether the C++ \"using\" keyword can change access" >&5
if eval "test \"`echo '$''{'ac_cv_cpp_access_changing_using'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8426 "configure"
#include "confdefs.h"
class X { public: int go(const X&) {return 3;} };
                               class Y : public X {
                                 public:  int go(int) {return 2;}
                                 private: using X::go;
                               };
int main() {
X x; Y y;
; return 0; }
EOF
if { (eval echo configure:8437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_cpp_access_changing_using=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_cpp_access_changing_using=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_cpp_access_changing_using" 1>&6
if test "$ac_cv_cpp_access_changing_using" = yes ; then
   cat >> confdefs.h <<\EOF
#define HAVE_CPP_ACCESS_CHANGING_USING 1
EOF

fi

echo $ac_n "checking whether the C++ \"using\" keyword resolves ambiguity""... $ac_c" 1>&6
echo "configure:8458: 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 8463 "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:8479: \"$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.h <<\EOF
#define HAVE_CPP_AMBIGUITY_RESOLVING_USING 1
EOF

fi

echo $ac_n "checking for \"std::\" namespace""... $ac_c" 1>&6
echo "configure:8500: checking for \"std::\" namespace" >&5
if eval "test \"`echo '$''{'ac_cv_cpp_namespace_std'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8505 "configure"
#include "confdefs.h"
#include <algorithm>
int main() {
return std::min(0, 1);
; return 0; }
EOF
if { (eval echo configure:8512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_cpp_namespace_std=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_cpp_namespace_std=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_cpp_namespace_std" 1>&6
if test "$ac_cv_cpp_namespace_std" = yes ; then
   cat >> confdefs.h <<\EOF
#define HAVE_CPP_NAMESPACE_STD 1
EOF

fi

echo $ac_n "checking whether standard template operator!=() is ambiguous""... $ac_c" 1>&6
echo "configure:8533: checking whether standard template operator!=() is ambiguous" >&5
if eval "test \"`echo '$''{'ac_cv_cpp_unambiguous_std_notequal'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8538 "configure"
#include "confdefs.h"
#include <algorithm>
                                struct T1 {};
                                int operator==(const T1&, const T1&) { return 0; }
                                int operator!=(const T1&, const T1&) { return 0; }
int main() {
T1 a,b; return a != b;
; return 0; }
EOF
if { (eval echo configure:8548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_cpp_unambiguous_std_notequal=unambiguous
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_cpp_unambiguous_std_notequal=ambiguous
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_cpp_unambiguous_std_notequal" 1>&6
if test "$ac_cv_cpp_unambiguous_std_notequal" = unambiguous ; then
  cat >> confdefs.h <<\EOF
#define HAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL 1
EOF

fi


echo $ac_n "checking for C++ reinterpret_cast""... $ac_c" 1>&6
echo "configure:8570: checking for C++ reinterpret_cast" >&5
if eval "test \"`echo '$''{'ac_cv_cpp_reinterpret_cast'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8575 "configure"
#include "confdefs.h"
struct X { int i; };
                               struct Y { int i; };
int main() {
X x; X*const z = &x;Y*y = reinterpret_cast<Y*>(z);
; return 0; }
EOF
if { (eval echo configure:8583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_cpp_reinterpret_cast=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_cpp_reinterpret_cast=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_cpp_reinterpret_cast" 1>&6
if test "$ac_cv_cpp_reinterpret_cast" = yes ; then
   cat >> confdefs.h <<\EOF
#define HAVE_CPP_NEW_CASTS 1
EOF

fi

echo $ac_n "checking for C++ dynamic_cast to void*""... $ac_c" 1>&6
echo "configure:8604: 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 8612 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit(int);
#endif
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:8631: \"$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.h <<\EOF
#define HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR 1
EOF

fi


echo $ac_n "checking whether C++ requires implementation of unused virtual methods""... $ac_c" 1>&6
echo "configure:8655: checking whether C++ requires implementation of unused virtual methods" >&5
if eval "test \"`echo '$''{'ac_cv_cpp_unused_required'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8660 "configure"
#include "confdefs.h"
class X {private: virtual void never_called();};
int main() {
X x;
; return 0; }
EOF
if { (eval echo configure:8667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_cpp_unused_required=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_cpp_unused_required=yes
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_cpp_unused_required" 1>&6
if test "$ac_cv_cpp_unused_required" = yes ; then
   cat >> confdefs.h <<\EOF
#define NEED_CPP_UNUSED_IMPLEMENTATIONS 1
EOF

fi



echo $ac_n "checking for trouble comparing to zero near std::operator!=()""... $ac_c" 1>&6
echo "configure:8690: checking for trouble comparing to zero near std::operator!=()" >&5
if eval "test \"`echo '$''{'ac_cv_trouble_comparing_to_zero'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 8695 "configure"
#include "confdefs.h"
#include <algorithm>
                                template <class T> class Foo {};
                                class T2;
                                template <class T> int operator==(const T2*, const T&) { return 0; }
                                template <class T> int operator!=(const T2*, const T&) { return 0; }
int main() {
Foo<int> f; return (0 != f);
; return 0; }
EOF
if { (eval echo configure:8706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_trouble_comparing_to_zero=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_trouble_comparing_to_zero=yes
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_trouble_comparing_to_zero" 1>&6
if test "$ac_cv_trouble_comparing_to_zero" = yes ; then
  cat >> confdefs.h <<\EOF
#define HAVE_CPP_TROUBLE_COMPARING_TO_ZERO 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



echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
echo "configure:8738: 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 8743 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
int category = LC_MESSAGES;
; return 0; }
EOF
if { (eval echo configure:8750: \"$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.h <<\EOF
#define HAVE_I18N_LC_MESSAGES 1
EOF

fi 	

fi # SKIP_COMPILER_CHECKS



# External Packages

# 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" = "no"; then
    _NO_NSPR=1 
  elif test "$withval" = "yes"; then
    :
  else
    { echo "configure: error: Option, system-nspr, does not take an argument ($withval)." 1>&2; exit 1; }
  fi
fi


if test "$_WIN32_MSVC"; then
    _NO_NSPR=1
fi
	
if test -z "$_NO_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:8830: 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=4.0.0
	echo $ac_n "checking for NSPR - version >= $min_nspr_version (skipping)""... $ac_c" 1>&6
echo "configure:8865: checking for NSPR - version >= $min_nspr_version (skipping)" >&5

	no_nspr=""
	if test "$NSPR_CONFIG" = "no"; then
		no_nspr="yes"
	else
		NSPR_CFLAGS=`$NSPR_CONFIG $nspr_config_args --cflags`
		NSPR_LIBS=`$NSPR_CONFIG $nspr_config_args --libs`

				nspr_config_major_version=`$NSPR_CONFIG $nspr_config_args --version | \
			sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
		nspr_config_minor_version=`$NSPR_CONFIG $nspr_config_args --version | \
			sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
		nspr_config_micro_version=`$NSPR_CONFIG $nspr_config_args --version | \
			sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
	fi

	if test -z "$no_nspr"; then
		echo "$ac_t""yes" 1>&6
		MOZ_NATIVE_NSPR=1     
	else
		echo "$ac_t""no" 1>&6
	fi


	
	


fi

if test -z "$MOZ_NATIVE_NSPR"; then
    NSPR_CFLAGS='`$(DEPTH)/nsprpub/config/nspr-config --prefix=$(DIST) --cflags`'
    # explicitly set libs for Visual Age C++ for OS/2
    if test "$VACPP" = "yes"; then
        NSPR_LIBS='$(DIST)/lib/nspr'$NSPR_VERSION'.lib $(DIST)/lib/plc'$NSPR_VERSION'.lib $(DIST)/lib/plds'$NSPR_VERSION'.lib '$_PTHREAD_LDFLAGS''
    elif test "$_WIN32_MSVC"; then
            NSPR_LIBS='$(DIST)/lib/nspr'$NSPR_VERSION'.lib $(DIST)/lib/plc'$NSPR_VERSION'.lib $(DIST)/lib/plds'$NSPR_VERSION'.lib '
            NSPR_CFLAGS='-I$(DIST)/include/nspr'
    else
        NSPR_LIBS='`$(DEPTH)/nsprpub/config/nspr-config --prefix=$(DIST) --libs`'
    fi
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}"; then
    CFLAGS="-I${JPEG_DIR}/include $CFLAGS"
    LDFLAGS="-L${JPEG_DIR}/lib $LDFLAGS"
fi
if test "$JPEG_DIR" = no; then
    SYSTEM_JPEG=
else
    echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6
echo "configure:8928: 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 $JPEG_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 8936 "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:8947: \"$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
  SYSTEM_JPEG=1 JPEG_LIBS="-ljpeg $JPEG_LIBS"
else
  echo "$ac_t""no" 1>&6
SYSTEM_JPEG=
fi

fi

if test "$SYSTEM_JPEG" = 1; then
    LIBS="$JPEG_LIBS $LIBS"
    if test "$cross_compiling" = yes; then
  SYSTEM_JPEG= 
else
  cat > conftest.$ac_ext <<EOF
#line 8976 "configure"
#include "confdefs.h"
#include <stdio.h>
	#include <sys/types.h>
	#include <jpeglib.h>
	int main () {
	    #if JPEG_LIB_VERSION >= $MOZJPEG
		exit(0);
	    #else
		exit(1);
	    #endif
	}
	
EOF
if { (eval echo configure:8990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  SYSTEM_JPEG=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  SYSTEM_JPEG= JPEG_CFLAGS= JPEG_LIBS=
fi
rm -fr conftest*
fi
 
    rm -f core
fi 
CFLAGS=$_SAVE_CFLAGS
LDFLAGS=$_SAVE_LDFLAGS
LIBS=$_SAVE_LIBS

if test -n "${JPEG_DIR}" -a -d "${JPEG_DIR}" -a "$SYSTEM_JPEG" = 1; then
    JPEG_CFLAGS="-I${JPEG_DIR}/include"
    JPEG_LIBS="-L${JPEG_DIR}/lib ${JPEG_LIBS}"
fi

# 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


_SAVE_CFLAGS=$CFLAGS
_SAVE_LDFLAGS=$LDFLAGS
if test -n "${ZLIB_DIR}"; then
    CFLAGS="-I${ZLIB_DIR}/include $CFLAGS"
    LDFLAGS="-L${ZLIB_DIR}/lib $LDFLAGS"
fi
if test "$ZLIB_DIR" = no; then
    SYSTEM_ZLIB=
else
    echo $ac_n "checking "for zlib.h"""... $ac_c" 1>&6
echo "configure:9030: checking "for zlib.h"" >&5
    cat > conftest.$ac_ext <<EOF
#line 9032 "configure"
#include "confdefs.h"
#include "zlib.h"
int main() {

; return 0; }
EOF
if { (eval echo configure:9039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  result="yes" SYSTEM_ZLIB=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  result="no" SYSTEM_ZLIB=
fi
rm -f conftest*
    echo "$ac_t"""$result"" 1>&6
fi
if test "$SYSTEM_ZLIB" = 1; then
    echo $ac_n "checking for gzread in -lz""... $ac_c" 1>&6
echo "configure:9053: 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 $ZLIB_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 9061 "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:9072: \"$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
  SYSTEM_ZLIB=1 ZLIB_LIBS="-lz $ZLIB_LIBS"
else
  echo "$ac_t""no" 1>&6
SYSTEM_ZLIB= ZLIB_CFLAGS= ZLIB_LIBS=
fi

fi
CFLAGS=$_SAVE_CFLAGS
LDFLAGS=$_SAVE_LDFLAGS

if test "${ZLIB_DIR}" -a -d "${ZLIB_DIR}" -a "$SYSTEM_ZLIB" = 1; then
    ZLIB_CFLAGS="-I${ZLIB_DIR}/include"
    ZLIB_LIBS="-L${ZLIB_DIR}/lib ${ZLIB_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
CFLAGS="$ZLIB_CFLAGS $CFLAGS"
LDFLAGS="$ZLIB_LIBS -lz $LDFLAGS"
if test -n "${PNG_DIR}"; then
    CFLAGS="-I${PNG_DIR}/include $CFLAGS"
    LDFLAGS="-L${PNG_DIR}/lib $LDFLAGS"
fi
if test "$PNG_DIR" = no; then
    SYSTEM_PNG=
else
    echo $ac_n "checking for png_get_valid in -lpng""... $ac_c" 1>&6
echo "configure:9122: 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 $PNG_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 9130 "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:9141: \"$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
  SYSTEM_PNG=1 PNG_LIBS="-lpng $PNG_LIBS"
else
  echo "$ac_t""no" 1>&6
SYSTEM_PNG=
fi

fi
if test "$SYSTEM_PNG" = 1; then
    LIBS="$PNG_LIBS $LIBS"
    if test "$cross_compiling" = yes; then
  SYSTEM_PNG= 
else
  cat > conftest.$ac_ext <<EOF
#line 9169 "configure"
#include "confdefs.h"
#include <stdio.h>
	#include <sys/types.h>
	#include <png.h>
	int main () {
	    #if PNG_LIBPNG_VER >= $MOZPNG
		exit(0);
	    #else
		exit(1);
	    #endif
	}
	
EOF
if { (eval echo configure:9183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  SYSTEM_PNG=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  SYSTEM_PNG= PNG_CFLAGS= PNG_LIBS=
fi
rm -fr conftest*
fi
 
    rm -f core
fi
CFLAGS=$_SAVE_CFLAGS
LDFLAGS=$_SAVE_LDFLAGS
LIBS=$_SAVE_LIBS

if test "${PNG_DIR}" -a -d "${PNG_DIR}" -a "$SYSTEM_PNG" = 1; then
    PNG_CFLAGS="-I${PNG_DIR}/include"
    PNG_LIBS="-L${PNG_DIR}/lib ${PNG_LIBS}"
fi

# Check whether --with-system-mng or --without-system-mng was given.
if test "${with_system_mng+set}" = set; then
  withval="$with_system_mng"
  MNG_DIR=$withval
fi


_SAVE_CFLAGS=$CFLAGS
_SAVE_LDFLAGS=$LDFLAGS
_SAVE_LIBS=$LIBS
CFLAGS="$ZLIB_CFLAGS $CFLAGS"
LDFLAGS="$ZLIB_LIBS -lz $LDFLAGS"
if test -n "${MNG_DIR}"; then
    CFLAGS="-I${MNG_DIR}/include $CFLAGS"
    LDFLAGS="-L${MNG_DIR}/lib $LDFLAGS"
fi
if test "$MNG_DIR" = no; then
    SYSTEM_MNG=
else
    echo $ac_n "checking for mng_initialize in -lmng""... $ac_c" 1>&6
echo "configure:9226: checking for mng_initialize in -lmng" >&5
ac_lib_var=`echo mng'_'mng_initialize | 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="-lmng $MNG_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 9234 "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 mng_initialize();

int main() {
mng_initialize()
; return 0; }
EOF
if { (eval echo configure:9245: \"$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
  SYSTEM_MNG=1 MNG_LIBS="-lmng $MNG_LIBS"
else
  echo "$ac_t""no" 1>&6
SYSTEM_MNG=
fi

fi
if test "$SYSTEM_MNG" = 1; then
    LIBS="$MNG_LIBS $LIBS"
    if test "$cross_compiling" = yes; then
  SYSTEM_MNG= 
else
  cat > conftest.$ac_ext <<EOF
#line 9273 "configure"
#include "confdefs.h"
#include <stdio.h>
	#include <sys/types.h>
	#include <libmng.h>
	int main () {
	    #if (((MNG_VERSION_MAJOR)<<16)|((MNG_VERSION_MINOR)<<8)|(MNG_VERSION_RELEASE)) >= $MOZMNG
		exit(0);
	    #else
		exit(1);
	    #endif
	}
	
EOF
if { (eval echo configure:9287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  SYSTEM_MNG=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  SYSTEM_MNG= MNG_CFLAGS= MNG_LIBS=
fi
rm -fr conftest*
fi
 
    rm -f core
fi
CFLAGS=$_SAVE_CFLAGS
LDFLAGS=$_SAVE_LDFLAGS
LIBS=$_SAVE_LIBS

if test "${MNG_DIR}" -a -d "${MNG_DIR}" -a "$SYSTEM_MNG" = 1; then
    MNG_CFLAGS="-I${MNG_DIR}/include"
    MNG_LIBS="-L${MNG_DIR}/lib ${MNG_LIBS}"
fi

fi # SKIP_LIBRARY_CHECKS

# Toolkit Options

            	# Check whether --enable-default-toolkit or --disable-default-toolkit was given.
if test "${enable_default_toolkit+set}" = set; then
  enableval="$enable_default_toolkit"
   _DEFAULT_TOOLKIT=$enableval 
else
   _DEFAULT_TOOLKIT=$_PLATFORM_DEFAULT_TOOLKIT
fi


    if test "$_DEFAULT_TOOLKIT" = "gtk" \
        -o "$_DEFAULT_TOOLKIT" = "qt" \
        -o "$_DEFAULT_TOOLKIT" = "gtk2" \
        -o "$_DEFAULT_TOOLKIT" = "xlib" \
        -o "$_DEFAULT_TOOLKIT" = "os2" \
        -o "$_DEFAULT_TOOLKIT" = "beos" \
        -o "$_DEFAULT_TOOLKIT" = "photon" \
        -o "$_DEFAULT_TOOLKIT" = "mac" \
        -o "$_DEFAULT_TOOLKIT" = "windows" \
        -o "$_DEFAULT_TOOLKIT" = "cocoa"
    then
                        MOZ_WIDGET_TOOLKIT=`echo "$_DEFAULT_TOOLKIT" | sed -e "s/,.*$//"`
    else
        if test "$no_x" != "yes"; then
            { echo "configure: error: Toolkit must be xlib, gtk, gtk2 or qt." 1>&2; exit 1; }
        else
            { echo "configure: error: Toolkit must be $_PLATFORM_DEFAULT_TOOLKIT." 1>&2; exit 1; }
        fi
    fi

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



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


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


fi # !no_x

cat >> confdefs.h <<EOF
#define MOZ_DEFAULT_TOOLKIT "$MOZ_WIDGET_TOOLKIT"
EOF



case "$MOZ_WIDGET_TOOLKIT" in
gtk)
	MOZ_ENABLE_GTK=1
    MOZ_ENABLE_XREMOTE=1
    TK_CFLAGS='$(MOZ_GTK_CFLAGS)'
    TK_LIBS='$(MOZ_GTK_LDFLAGS)'
	cat >> confdefs.h <<\EOF
#define MOZ_WIDGET_GTK 1
EOF

    ;;

gtk2)
    MOZ_ENABLE_GTK2=1
    TK_CFLAGS='$(MOZ_GTK2_CFLAGS)'
    TK_LIBS='$(MOZ_GTK2_LIBS)'
    cat >> confdefs.h <<\EOF
#define MOZ_WIDGET_GTK2 1
EOF

    ;;

xlib)
	MOZ_ENABLE_XLIB=1
    MOZ_ENABLE_XREMOTE=1
	TK_CFLAGS='$(MOZ_XLIB_CFLAGS)'
	TK_LIBS='$(MOZ_XLIB_LDFLAGS)'
	cat >> confdefs.h <<\EOF
#define MOZ_WIDGET_XLIB 1
EOF

    ;;

qt)
	MOZ_ENABLE_QT=1
    MOZ_ENABLE_XREMOTE=1
	TK_CFLAGS='$(MOZ_QT_CFLAGS)'
	TK_LIBS='$(MOZ_QT_LDFLAGS)'
	cat >> confdefs.h <<\EOF
#define MOZ_WIDGET_QT 1
EOF

    ;;

photon)
	MOZ_ENABLE_PHOTON=1
	cat >> confdefs.h <<\EOF
#define MOZ_WIDGET_PHOTON 1
EOF

    ;;
cocoa)
    MOZ_ENABLE_COCOA=1
    cat >> confdefs.h <<\EOF
#define MOZ_WIDGET_COCOA 1
EOF

    ;;
esac

if test "$MOZ_ENABLE_XREMOTE"; then
    cat >> confdefs.h <<\EOF
#define MOZ_ENABLE_XREMOTE 1
EOF

fi

if test "$MOZ_ENABLE_GTK"
then
    # Check whether --with-gtk-prefix or --without-gtk-prefix was given.
if test "${with_gtk_prefix+set}" = set; then
  withval="$with_gtk_prefix"
  gtk_config_prefix="$withval"
else
  gtk_config_prefix=""
fi

# Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given.
if test "${with_gtk_exec_prefix+set}" = set; then
  withval="$with_gtk_exec_prefix"
  gtk_config_exec_prefix="$withval"
else
  gtk_config_exec_prefix=""
fi

# Check whether --enable-gtktest or --disable-gtktest was given.
if test "${enable_gtktest+set}" = set; then
  enableval="$enable_gtktest"
  :
else
  enable_gtktest=yes
fi


  if test x$gtk_config_exec_prefix != x ; then
     gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
     if test x${GTK_CONFIG+set} != xset ; then
        GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
     fi
  fi
  if test x$gtk_config_prefix != x ; then
     gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
     if test x${GTK_CONFIG+set} != xset ; then
        GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
     fi
  fi

    unset ac_cv_path_GTK_CONFIG

  # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:9504: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GTK_CONFIG" in
  /*)
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_GTK_CONFIG="$GTK_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_GTK_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
  ;;
esac
fi
GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
if test -n "$GTK_CONFIG"; then
  echo "$ac_t""$GTK_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  min_gtk_version=$GTK_VERSION
  echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
echo "configure:9539: checking for GTK - version >= $min_gtk_version" >&5
  no_gtk=""
  if test "$GTK_CONFIG" = "no" ; then
    no_gtk=yes
  else
    GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
    GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
    gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
    gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
    gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
    if test "x$enable_gtktest" = "xyes" ; then
      ac_save_CFLAGS="$CFLAGS"
      ac_save_LIBS="$LIBS"
      CFLAGS="$CFLAGS $GTK_CFLAGS"
      LIBS="$LIBS $GTK_LIBS"
      rm -f conf.gtktest
      if test "$cross_compiling" = yes; then
  echo $ac_n "cross compiling; assumed OK... $ac_c"
else
  cat > conftest.$ac_ext <<EOF
#line 9562 "configure"
#include "confdefs.h"

#include <gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>

int 
main ()
{
  int major, minor, micro;
  char *tmp_version;

  system ("touch conf.gtktest");

  /* HP/UX 9 (%@#!) writes to sscanf strings */
  tmp_version = g_strdup("$min_gtk_version");
  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
     printf("%s, bad version string\n", "$min_gtk_version");
     exit(1);
   }

  if ((gtk_major_version != $gtk_config_major_version) ||
      (gtk_minor_version != $gtk_config_minor_version) ||
      (gtk_micro_version != $gtk_config_micro_version))
    {
      printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", 
             $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
             gtk_major_version, gtk_minor_version, gtk_micro_version);
      printf ("*** was found! If gtk-config was correct, then it is best\n");
      printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
      printf("*** by modifying your LD_LIBRARY_PATH environment variable, or by editing\n");
      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
      printf("*** required on your system.\n");
      printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
      printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
      printf("*** before re-running configure\n");
    } 
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
  else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
	   (gtk_minor_version != GTK_MINOR_VERSION) ||
           (gtk_micro_version != GTK_MICRO_VERSION))
    {
      printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
	     GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
      printf("*** library (version %d.%d.%d)\n",
	     gtk_major_version, gtk_minor_version, gtk_micro_version);
    }
#endif /* defined (GTK_MAJOR_VERSION) ... */
  else
    {
      if ((gtk_major_version > major) ||
        ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
        ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
      {
        return 0;
       }
     else
      {
        printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
               gtk_major_version, gtk_minor_version, gtk_micro_version);
        printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
	       major, minor, micro);
        printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
        printf("***\n");
        printf("*** If you have already installed a sufficiently new version, this error\n");
        printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
        printf("*** being found. The easiest way to fix this is to remove the old version\n");
        printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
        printf("*** correct copy of gtk-config. (In this case, you will have to\n");
        printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
        printf("*** so that the correct libraries are found at run-time))\n");
      }
    }
  return 1;
}

EOF
if { (eval echo configure:9640: \"$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*
  no_gtk=yes
fi
rm -fr conftest*
fi

       CFLAGS="$ac_save_CFLAGS"
       LIBS="$ac_save_LIBS"
     fi
  fi
  if test "x$no_gtk" = x ; then
     echo "$ac_t""yes" 1>&6
     :     
  else
     echo "$ac_t""no" 1>&6
     if test "$GTK_CONFIG" = "no" ; then
       echo "*** The gtk-config script installed by GTK could not be found."
       echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
       echo "*** your path, or set the GTK_CONFIG environment variable to the"
       echo "*** full path to gtk-config."
       echo "*** GTK+ is available from ftp://ftp.gtk.org/pub/gtk"
     else
       if test -f conf.gtktest ; then
        :
       else
          echo "*** Could not run GTK test program, checking why..."
          CFLAGS="$CFLAGS $GTK_CFLAGS"
          LIBS="$LIBS $GTK_LIBS"
          cat > conftest.$ac_ext <<EOF
#line 9675 "configure"
#include "confdefs.h"

#include <gtk/gtk.h>
#include <stdio.h>

int main() {
 return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); 
; return 0; }
EOF
if { (eval echo configure:9685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
   echo "*** The test program compiled, but did not run. This usually means"
          echo "*** that the run-time linker is not finding GTK or finding the wrong"
          echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
          echo "*** is required on your system"
	  echo "***"
          echo "*** If you have an old version installed, it is best to remove it, although"
          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
          echo "***"
          echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
          echo "*** came with the system with the command"
          echo "***"
          echo "***    rpm --erase --nodeps gtk gtk-devel" 
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
   echo "*** The test program failed to compile or link. See the file config.log for the"
          echo "*** exact error that occured. This usually means GTK was incorrectly installed"
          echo "*** or that you have moved GTK since it was installed. In the latter case, you"
          echo "*** may want to edit the gtk-config script: $GTK_CONFIG" 
fi
rm -f conftest*
          CFLAGS="$ac_save_CFLAGS"
          LIBS="$ac_save_LIBS"
       fi
     fi
     GTK_CFLAGS=""
     GTK_LIBS=""
     { echo "configure: error: Test for GTK failed." 1>&2; exit 1; }
  fi
  
  
  rm -f conf.gtktest


				    MOZ_GLE=
    MOZ_GLE_LDFLAGS=

	# Check whether --enable-gle or --disable-gle was given.
if test "${enable_gle+set}" = set; then
  enableval="$enable_gle"
  if test "$enableval" = "yes"; then
    MOZ_GLE=1
        MOZ_GLE_LDFLAGS=-lgle
        cat >> confdefs.h <<\EOF
#define MOZ_GLE 1
EOF

  elif test "$enableval" = "no"; then
    MOZ_GLE=
        MOZ_GLE_LDFLAGS= 
  else
    { echo "configure: error: Option, gle, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi


    # Check whether --with-static-gtk or --without-static-gtk was given.
if test "${with_static_gtk+set}" = set; then
  withval="$with_static_gtk"
  if test "$withval" = "yes"; then
    sysstaticgtk=$enableval
  elif test "$withval" = "no"; then
    :
  else
    { echo "configure: error: Option, static-gtk, does not take an argument ($withval)." 1>&2; exit 1; }
  fi
fi


    if test "$sysstaticgtk" != "yes"; then
        MOZ_GTK_LDFLAGS=$GTK_LIBS

        if test "$MOZ_GLE"; then
            MOZ_GTK_LDFLAGS=`echo $MOZ_GTK_LDFLAGS | sed -e 's/-lgtk/-lgle -lgtk/'`
        fi
    else
       

       GTK_LIBS_LOC=`echo $GTK_LIBS | sed 's/\(.*\)\(-lgtk.*\)/\1/'`

       GTK_STATIC_LOC=`echo $GTK_LIBS | sed 's/^ *-L\([^ ]*\) .*$/\1/'`
       GTK_STATIC=`echo $GTK_LIBS | sed 's/^.*-l\(gtk[^ ]*\) .*/\1/'`
       GDK_STATIC=`echo $GTK_LIBS | sed 's/^.*-l\(gdk[^ ]*\) .*/\1/'`

       GLIB_STATIC_LOC=`echo $GTK_LIBS | sed -e 's/^.*-lgdk[^ ]* *-L\([^ ]*\).*$/\1/' -e 's/^.* -lgdk[^ ]* .*$//'`
       if test ! "$GLIB_STATIC_LOC" ; then
         GLIB_STATIC_LOC=$GTK_STATIC_LOC
       fi
       GMODULE_STATIC=`echo $GTK_LIBS | sed 's/^.*-l\(gmodule[^ ]*\) .*/\1/'`
       GLIB_STATIC=`echo $GTK_LIBS | sed 's/^.*-l\(glib[^ ]*\) .*/\1/'`

       GTK_OTHER_LIBS=`echo $GTK_LIBS | sed 's/^.*-lglib *\(.*\)/\1/'`

       

       MOZ_GTK_LDFLAGS="$GTK_STATIC_LOC/lib${GTK_STATIC}.a"
       MOZ_GTK_LDFLAGS="$MOZ_GTK_LDFLAGS $GTK_STATIC_LOC/lib${GDK_STATIC}.a"
       MOZ_GTK_LDFLAGS="$MOZ_GTK_LDFLAGS $GLIB_STATIC_LOC/lib${GMODULE_STATIC}.a"
       MOZ_GTK_LDFLAGS="$MOZ_GTK_LDFLAGS $GLIB_STATIC_LOC/lib${GLIB_STATIC}.a"
       MOZ_GTK_LDFLAGS="$MOZ_GTK_LDFLAGS $GTK_LIBS_LOC $GTK_OTHER_LIBS"
    fi

    MOZ_GTK_CFLAGS=$GTK_CFLAGS

fi

if test "$MOZ_ENABLE_GTK2"
then
    
  succeeded=no

  if test -z "$PKG_CONFIG"; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:9805: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$PKG_CONFIG" in
  /*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_PKG_CONFIG="$PKG_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_PKG_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
if test -n "$PKG_CONFIG"; then
  echo "$ac_t""$PKG_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  fi

  if test "$PKG_CONFIG" = "no" ; 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."
  else
     if ! $PKG_CONFIG --atleast-pkgconfig-version 0.7.0; then
        echo "*** Your version of pkg-config is too old. You need version 0.7.0 or newer."
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
     else
        echo $ac_n "checking for gtk+-2.0 >= 1.3.7""... $ac_c" 1>&6
echo "configure:9850: checking for gtk+-2.0 >= 1.3.7" >&5

        if $PKG_CONFIG --exists "gtk+-2.0 >= 1.3.7" ; then
            echo "$ac_t""yes" 1>&6
            succeeded=yes

            echo $ac_n "checking MOZ_GTK2_CFLAGS""... $ac_c" 1>&6
echo "configure:9857: checking MOZ_GTK2_CFLAGS" >&5
            MOZ_GTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 1.3.7"`
            echo "$ac_t""$MOZ_GTK2_CFLAGS" 1>&6

            echo $ac_n "checking MOZ_GTK2_LIBS""... $ac_c" 1>&6
echo "configure:9862: checking MOZ_GTK2_LIBS" >&5
            MOZ_GTK2_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 1.3.7"`
            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 >= 1.3.7"`
            echo MOZ_GTK2_PKG_ERRORS
        fi

        
        
     fi
  fi

  if test $succeeded = yes; then
     :
  else
     { echo "configure: error: Library requirements (gtk+-2.0 >= 1.3.7) 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; exit 1; }
  fi

fi

if test "$MOZ_ENABLE_XLIB"
then
    MOZ_XLIB_CFLAGS="$X_CFLAGS"
    MOZ_XLIB_LDFLAGS="$XLDFLAGS"
    MOZ_XLIB_LDFLAGS="$MOZ_XLIB_LDFLAGS $XEXT_LIBS $X11_LIBS"
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
      QTDIR="/usr"
    fi
    QTINCDIR="/include/qt"
    if test ! -d "$QTDIR$QTINCDIR"; then
       QTINCDIR="/include/X11/qt"
    fi
    if test ! -d "$QTDIR$QTINCDIR"; then
       QTINCDIR="/include"
    fi

    if test -x "$QTDIR/bin/moc"; then
      HOST_MOC="$QTDIR/bin/moc"
    else
      for ac_prog in 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:9922: 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=""""

    fi
    if test -z "$HOST_MOC"; then
      { echo "configure: error: no acceptable moc preprocessor found" 1>&2; exit 1; }
    fi
    MOC=$HOST_MOC

    QT_CFLAGS="-I${QTDIR}${QTINCDIR} -DQT_GENUINE_STR"
    QT_LIBS="-L/usr/X11R6/lib -L${QTDIR}/lib -lqt -lXext -lX11"

    # Check whether --with-static-qt or --without-static-qt was given.
if test "${with_static_qt+set}" = set; then
  withval="$with_static_qt"
  if test "$withval" = "yes"; then
    sysstaticqt=$withval
  elif test "$withval" = "no"; then
    :
  else
    { echo "configure: error: Option, static-qt, does not take an argument ($withval)." 1>&2; exit 1; }
  fi
fi


    if test "$sysstaticqt" != "yes"; then
       MOZ_QT_LDFLAGS=$QT_LIBS
    else
       

       QT_LIBS_LOC=`echo $QT_LIBS | sed 's/\(.*\)\(-lqt.*\)/\1/'`

       QT_STATIC_LOC=`echo $QT_LIBS | sed 's/^ *-L\([^ ]*\) .*$/\1/'`
       QT_STATIC=`echo $QT_LIBS | sed 's/^.*-l\(qt[^ ]*\) .*/\1/'`

       

       MOZ_QT_LDFLAGS="$QT_STATIC_LOC/lib${QT_STATIC}.a"
       MOZ_QT_LDFLAGS="$MOZ_QT_LDFLAGS $QT_STATIC_LOC/lib${QT_STATIC}.a"
       MOZ_QT_LDFLAGS="$MOZ_QT_LDFLAGS $QT_LIBS_LOC"
    fi

    MOZ_QT_CFLAGS=$QT_CFLAGS

    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_LIBS=$LIBS

    CXXFLAGS="$CXXFLAGS $QT_CFLAGS"
    LIBS="$LIBS $QT_LIBS"
    
    echo $ac_n "checking Qt - version >= $QT_VERSION""... $ac_c" 1>&6
echo "configure:10008: checking Qt - version >= $QT_VERSION" >&5
    cat > conftest.$ac_ext <<EOF
#line 10010 "configure"
#include "confdefs.h"
#include <qglobal.h>
int main() {

        #if (QT_VERSION < $QT_VERSION_NUM)
            #error  "QT_VERSION too old"
        #endif
    
; return 0; }
EOF
if { (eval echo configure:10021: \"$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" = "no"; then
       { echo "configure: error: Qt Mozilla requires at least version $QT_VERSION of Qt" 1>&2; exit 1; }
    fi
    CXXFLAGS=$_SAVE_CXXFLAGS
    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

fi

























if test "$MOZ_ENABLE_GTK" || test "$MOZ_ENABLE_QT" \
|| test "$MOZ_ENABLE_XLIB" \
|| test "$MOZ_ENABLE_GTK2"
then
    cat >> confdefs.h <<\EOF
#define MOZ_X11 1
EOF

fi

# Components and Features

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



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



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


if test "$MOZ_CALENDAR"; then
    echo $ac_n "checking for icalproperty_new_location in -lical""... $ac_c" 1>&6
echo "configure:10130: checking for icalproperty_new_location in -lical" >&5
ac_lib_var=`echo ical'_'icalproperty_new_location | 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="-lical  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 10138 "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 icalproperty_new_location();

int main() {
icalproperty_new_location()
; return 0; }
EOF
if { (eval echo configure:10149: \"$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
  _dummy=foo
else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: Calendar requires libical" 1>&2; exit 1; }
fi

fi



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


if test "$no_x" = "yes"; then
    _NO_FREETYPE2=1
fi

if test -z "$_NO_FREETYPE2"; then
    # Check whether --with-freetype-prefix or --without-freetype-prefix was given.
if test "${with_freetype_prefix+set}" = set; then
  withval="$with_freetype_prefix"
  ft_config_prefix="$withval"
else
  ft_config_prefix=""
fi

# Check whether --with-freetype-exec-prefix or --without-freetype-exec-prefix was given.
if test "${with_freetype_exec_prefix+set}" = set; then
  withval="$with_freetype_exec_prefix"
  ft_config_exec_prefix="$withval"
else
  ft_config_exec_prefix=""
fi

# Check whether --enable-freetypetest or --disable-freetypetest was given.
if test "${enable_freetypetest+set}" = set; then
  enableval="$enable_freetypetest"
  :
else
  enable_fttest=yes
fi


if test x$ft_config_exec_prefix != x ; then
  ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix"
  if test x${FT2_CONFIG+set} != xset ; then
    FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config
  fi
fi
if test x$ft_config_prefix != x ; then
  ft_config_args="$ft_config_args --prefix=$ft_config_prefix"
  if test x${FT2_CONFIG+set} != xset ; then
    FT2_CONFIG=$ft_config_prefix/bin/freetype-config
  fi
fi
# Extract the first word of "freetype-config", so it can be a program name with args.
set dummy freetype-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:10232: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_FT2_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$FT2_CONFIG" in
  /*)
  ac_cv_path_FT2_CONFIG="$FT2_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_FT2_CONFIG="$FT2_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_FT2_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_FT2_CONFIG" && ac_cv_path_FT2_CONFIG="no"
  ;;
esac
fi
FT2_CONFIG="$ac_cv_path_FT2_CONFIG"
if test -n "$FT2_CONFIG"; then
  echo "$ac_t""$FT2_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


min_ft_version=6.1.0
echo $ac_n "checking for FreeType - version >= $min_ft_version""... $ac_c" 1>&6
echo "configure:10268: checking for FreeType - version >= $min_ft_version" >&5
no_ft=""
if test "$FT2_CONFIG" = "no" ; then
  no_ft=yes
else
  FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags`
  FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs`
  ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \
         sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
  ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \
         sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
  ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \
         sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
  ft_min_major_version=`echo $min_ft_version | \
         sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
  ft_min_minor_version=`echo $min_ft_version | \
         sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
  ft_min_micro_version=`echo $min_ft_version | \
         sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
  if test "x$enable_fttest" = "xyes" ; then
    ft_config_is_lt=no
    if test $ft_config_major_version -lt $ft_min_major_version ; then
      ft_config_is_lt=yes
    else
      if test $ft_config_major_version -eq $ft_min_major_version ; then
        if test $ft_config_minor_version -lt $ft_min_minor_version ; then
          ft_config_is_lt=yes
        else
          if test $ft_config_minor_version -eq $ft_min_minor_version ; then
            if test $ft_config_micro_version -lt $ft_min_micro_version ; then
              ft_config_is_lt=yes
            fi
          fi
        fi
      fi
    fi
    if test "x$ft_config_is_lt" = "xyes" ; then
      MOZ_ENABLE_FREETYPE2=
      echo "$ac_t""no" 1>&6
    else
      ac_save_CFLAGS="$CFLAGS"
      ac_save_LIBS="$LIBS"
      CFLAGS="$CFLAGS $FT2_CFLAGS"
      LIBS="$FT2_LIBS $LIBS"
      if test "$cross_compiling" = yes; then
  echo $ac_n "cross compiling; assumed OK... $ac_c"
else
  cat > conftest.$ac_ext <<EOF
#line 10316 "configure"
#include "confdefs.h"

#include <ft2build.h>
#include FT_FREETYPE_H
#include <stdio.h>
#include <stdlib.h>

int
main()
{
  FT_Library library;
  FT_Error error;

  error = FT_Init_FreeType(&library);

  if (error)
    return 1;
  else
  {
    FT_Done_FreeType(library);
    return 0;
  }
}

EOF
if { (eval echo configure:10342: \"$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*
  no_ft=yes
fi
rm -fr conftest*
fi

      CFLAGS="$ac_save_CFLAGS"
      LIBS="$ac_save_LIBS"
    fi             # test $ft_config_version -lt $ft_min_version
  fi               # test "x$enable_fttest" = "xyes"
fi                 # test "$FT2_CONFIG" = "no"
if test "x$ft_config_is_lt" != "xyes" ; then
  if test "x$no_ft" = x ; then
     echo "$ac_t""yes" 1>&6
     MOZ_ENABLE_FREETYPE2=1
  else
     echo "$ac_t""no" 1>&6
     if test "$FT2_CONFIG" = "no" ; then
       echo "*** The freetype-config script installed by FreeType 2 could not be found."
       echo "*** If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in"
       echo "*** your path, or set the FT2_CONFIG environment variable to the"
       echo "*** full path to freetype-config."
     else
       echo "*** The FreeType test program failed to run.  If your system uses"
       echo "*** shared libraries and they are installed outside the normal"
       echo "*** system library path, make sure the variable LD_LIBRARY_PATH"
       echo "*** (or whatever is appropiate for your system) is correctly set."
     fi
     FT2_CFLAGS=""
     FT2_LIBS=""
     MOZ_ENABLE_FREETYPE2=
  fi
  
  
fi

    # Check whether --with-freetype-prefix or --without-freetype-prefix was given.
if test "${with_freetype_prefix+set}" = set; then
  withval="$with_freetype_prefix"
  ft_config_prefix="$withval"
else
  ft_config_prefix=""
fi

# Check whether --with-freetype-exec-prefix or --without-freetype-exec-prefix was given.
if test "${with_freetype_exec_prefix+set}" = set; then
  withval="$with_freetype_exec_prefix"
  ft_config_exec_prefix="$withval"
else
  ft_config_exec_prefix=""
fi

# Check whether --enable-freetypetest or --disable-freetypetest was given.
if test "${enable_freetypetest+set}" = set; then
  enableval="$enable_freetypetest"
  :
else
  enable_fttest=yes
fi


if test x$ft_config_exec_prefix != x ; then
  ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix"
  if test x${FT2_CONFIG+set} != xset ; then
    FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config
  fi
fi
if test x$ft_config_prefix != x ; then
  ft_config_args="$ft_config_args --prefix=$ft_config_prefix"
  if test x${FT2_CONFIG+set} != xset ; then
    FT2_CONFIG=$ft_config_prefix/bin/freetype-config
  fi
fi
# Extract the first word of "freetype-config", so it can be a program name with args.
set dummy freetype-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:10424: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_FT2_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$FT2_CONFIG" in
  /*)
  ac_cv_path_FT2_CONFIG="$FT2_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_FT2_CONFIG="$FT2_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_FT2_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_FT2_CONFIG" && ac_cv_path_FT2_CONFIG="no"
  ;;
esac
fi
FT2_CONFIG="$ac_cv_path_FT2_CONFIG"
if test -n "$FT2_CONFIG"; then
  echo "$ac_t""$FT2_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


min_ft_version=8.0.2
echo $ac_n "checking for FreeType - version >= $min_ft_version""... $ac_c" 1>&6
echo "configure:10460: checking for FreeType - version >= $min_ft_version" >&5
no_ft=""
if test "$FT2_CONFIG" = "no" ; then
  no_ft=yes
else
  FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags`
  FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs`
  ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \
         sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
  ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \
         sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
  ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \
         sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
  ft_min_major_version=`echo $min_ft_version | \
         sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
  ft_min_minor_version=`echo $min_ft_version | \
         sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
  ft_min_micro_version=`echo $min_ft_version | \
         sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
  if test "x$enable_fttest" = "xyes" ; then
    ft_config_is_lt=no
    if test $ft_config_major_version -lt $ft_min_major_version ; then
      ft_config_is_lt=yes
    else
      if test $ft_config_major_version -eq $ft_min_major_version ; then
        if test $ft_config_minor_version -lt $ft_min_minor_version ; then
          ft_config_is_lt=yes
        else
          if test $ft_config_minor_version -eq $ft_min_minor_version ; then
            if test $ft_config_micro_version -lt $ft_min_micro_version ; then
              ft_config_is_lt=yes
            fi
          fi
        fi
      fi
    fi
    if test "x$ft_config_is_lt" = "xyes" ; then
      MOZ_XFT_SYSTEM_FREETYPE2=
      echo "$ac_t""no" 1>&6
    else
      ac_save_CFLAGS="$CFLAGS"
      ac_save_LIBS="$LIBS"
      CFLAGS="$CFLAGS $FT2_CFLAGS"
      LIBS="$FT2_LIBS $LIBS"
      if test "$cross_compiling" = yes; then
  echo $ac_n "cross compiling; assumed OK... $ac_c"
else
  cat > conftest.$ac_ext <<EOF
#line 10508 "configure"
#include "confdefs.h"

#include <ft2build.h>
#include FT_FREETYPE_H
#include <stdio.h>
#include <stdlib.h>

int
main()
{
  FT_Library library;
  FT_Error error;

  error = FT_Init_FreeType(&library);

  if (error)
    return 1;
  else
  {
    FT_Done_FreeType(library);
    return 0;
  }
}

EOF
if { (eval echo configure:10534: \"$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*
  no_ft=yes
fi
rm -fr conftest*
fi

      CFLAGS="$ac_save_CFLAGS"
      LIBS="$ac_save_LIBS"
    fi             # test $ft_config_version -lt $ft_min_version
  fi               # test "x$enable_fttest" = "xyes"
fi                 # test "$FT2_CONFIG" = "no"
if test "x$ft_config_is_lt" != "xyes" ; then
  if test "x$no_ft" = x ; then
     echo "$ac_t""yes" 1>&6
     MOZ_XFT_SYSTEM_FREETYPE2=1
  else
     echo "$ac_t""no" 1>&6
     if test "$FT2_CONFIG" = "no" ; then
       echo "*** The freetype-config script installed by FreeType 2 could not be found."
       echo "*** If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in"
       echo "*** your path, or set the FT2_CONFIG environment variable to the"
       echo "*** full path to freetype-config."
     else
       echo "*** The FreeType test program failed to run.  If your system uses"
       echo "*** shared libraries and they are installed outside the normal"
       echo "*** system library path, make sure the variable LD_LIBRARY_PATH"
       echo "*** (or whatever is appropiate for your system) is correctly set."
     fi
     FT2_CFLAGS=""
     FT2_LIBS=""
     MOZ_XFT_SYSTEM_FREETYPE2=
  fi
  
  
fi

fi




# Check whether --enable-xft or --disable-xft was given.
if test "${enable_xft+set}" = set; then
  enableval="$enable_xft"
  if test "$enableval" = "yes"; then
    MOZ_ENABLE_XFT=1
    MOZ_XFT_CFLAGS="$X_CFLAGS -I${x_includes}/X11/extensions"
    MOZ_XFT_LIBS="$X_LIBS"
    cat >> confdefs.h <<\EOF
#define MOZ_ENABLE_XFT 1
EOF


  elif test "$enableval" = "no"; then
    :
  else
    { echo "configure: error: Option, xft, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi






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


if test "$no_x" != "yes"
then
    MOZ_ENABLE_XPRINT=1

    _SAVE_LDFLAGS="$LDFLAGS"
    LDFLAGS="$XLDFLAGS $LDFLAGS"
    echo $ac_n "checking for XpGetPrinterList in -lXp""... $ac_c" 1>&6
echo "configure:10625: checking for XpGetPrinterList in -lXp" >&5
ac_lib_var=`echo Xp'_'XpGetPrinterList | 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="-lXp $XEXT_LIBS $XLIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 10633 "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 XpGetPrinterList();

int main() {
XpGetPrinterList()
; return 0; }
EOF
if { (eval echo configure:10644: \"$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
  XPRINT_LIBS="-lXp"
else
  echo "$ac_t""no" 1>&6
MOZ_ENABLE_XPRINT=
fi

    LDFLAGS="$_SAVE_LDFLAGS"

    MOZ_XPRINT_CFLAGS="$X_CFLAGS"
    MOZ_XPRINT_LDFLAGS="$XLDFLAGS $XPRINT_LIBS"
    MOZ_XPRINT_LDFLAGS="$MOZ_XPRINT_LDFLAGS $XEXT_LIBS $X11_LIBS"

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

fi

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


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



if test "$no_x" != "yes"
then
	# Check whether --enable-java-supplement or --disable-java-supplement was given.
if test "${enable_java_supplement+set}" = set; then
  enableval="$enable_java_supplement"
  
		if test "$enableval" = "yes"
		then
			MOZ_JAVA_SUPPLEMENT=1
    	else
			MOZ_JAVA_SUPPLEMENT=
    	fi
	
fi

fi

# Check whether --enable-xinerama or --disable-xinerama was given.
if test "${enable_xinerama+set}" = set; then
  enableval="$enable_xinerama"
  if test "$enableval" = "yes"; then
     if test -n "$MOZ_XINERAMA_LIBS" && \
      test -n "$ac_cv_header_X11_extensions_Xinerama_h"; then
    MOZ_ENABLE_XINERAMA=1
    cat >> confdefs.h <<\EOF
#define MOZ_ENABLE_XINERAMA 1
EOF

fi 
  elif test "$enableval" = "no"; then
    :
  else
    { echo "configure: error: Option, xinerama, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi


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

if test "$IBMBIDI"; then
  cat >> confdefs.h <<\EOF
#define IBMBIDI 1
EOF

fi

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

if test "$SUNCTL"; then
  cat >> confdefs.h <<\EOF
#define SUNCTL 1
EOF

fi

ACCESSIBILITY=1
# 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
    :
  else
    { echo "configure: error: Option, accessibility, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi

if test "$ACCESSIBILITY"; then
    cat >> confdefs.h <<\EOF
#define ACCESSIBILITY 1
EOF

fi

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




MOZ_EXTENSIONS_DEFAULT=" cookie wallet content-packs xml-rpc xmlextras help pref transformiix venkman inspector"

case "$target_os" in
msvc*|mksnt*|mingw*|cygwin*)
    MOZ_EXTENSIONS_DEFAULT="$MOZ_EXTENSIONS_DEFAULT universalchardet irc"
    ;;
esac

if test -n "$SUNCTL"; then
  MOZ_EXTENSIONS_DEFAULT="$MOZ_EXTENSIONS_DEFAULT ctl"
fi

MOZ_EXTENSIONS_ALL="$MOZ_EXTENSIONS_DEFAULT irc xmlterm access-builtin ctl" 

# 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" || test "$option" = "all"; then
        MOZ_EXTENSIONS="$MOZ_EXTENSIONS $MOZ_EXTENSIONS_ALL"
    elif test "$option" = "no" || test "$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_GTK" && test `echo "$MOZ_EXTENSIONS" | grep -c xmlterm` -ne 0; then
    echo "configure: warning: Cannot build xmlterm without gtk toolkit. Removing xmlterm from MOZ_EXTENSIONS." 1>&2
    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|xmlterm||'`
fi

if test -z "$MOZ_JSDEBUGGER" && test `echo "$MOZ_EXTENSIONS" | grep -c venkman` -ne 0; then
    echo "configure: warning: Cannot build venkman without JavaScript debug library. Removing venkman from MOZ_EXTENSIONS." 1>&2
    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|venkman||'`
fi

MOZ_EXTENSIONS=`${PERL} ${srcdir}/build/unix/uniq.pl ${MOZ_EXTENSIONS}`

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


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

if test "$MOZ_MATHML"; then
  cat >> confdefs.h <<\EOF
#define MOZ_MATHML 1
EOF

fi

# Check whether --enable-svg or --disable-svg was given.
if test "${enable_svg+set}" = set; then
  enableval="$enable_svg"
  if test "$enableval" = "yes"; then
    MOZ_SVG=1
    cat >> confdefs.h <<\EOF
#define MOZ_SVG 1
EOF

  elif test "$enableval" = "no"; then
    :
  else
    { echo "configure: error: Option, svg, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi


if test "$TX_EXE"; then
  cat >> confdefs.h <<\EOF
#define TX_EXE 1
EOF

    echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
echo "configure:10931: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
#line 10938 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
int main() {

#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
 bogus endian macros
#endif
; return 0; }
EOF
if { (eval echo configure:10949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  # It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
#line 10953 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
int main() {

#if BYTE_ORDER != BIG_ENDIAN
 not big endian
#endif
; return 0; }
EOF
if { (eval echo configure:10964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_bigendian=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_bigendian=no
fi
rm -f conftest*
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test $ac_cv_c_bigendian = unknown; then
if test "$cross_compiling" = yes; then
    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 10984 "configure"
#include "confdefs.h"
main () {
  /* Are we little or big endian?  From Harbison&Steele.  */
  union
  {
    long l;
    char c[sizeof (long)];
  } u;
  u.l = 1;
  exit (u.c[sizeof (long) - 1] == 1);
}
EOF
if { (eval echo configure:10997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_c_bigendian=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_bigendian=yes
fi
rm -fr conftest*
fi

fi
fi

echo "$ac_t""$ac_cv_c_bigendian" 1>&6
if test $ac_cv_c_bigendian = yes; then
  cat >> confdefs.h <<\EOF
#define WORDS_BIGENDIAN 1
EOF

fi

  if test $ac_cv_c_bigendian = yes; then
    cat >> confdefs.h <<\EOF
#define IS_BIG_ENDIAN 1
EOF

  fi
fi


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


# Individual module options

# Check whether --enable-xpcom-lea or --disable-xpcom-lea was given.
if test "${enable_xpcom_lea+set}" = set; then
  enableval="$enable_xpcom_lea"
  if test "$enableval" = "yes"; then
     XPCOM_USE_LEA=1 cat >> confdefs.h <<\EOF
#define XPCOM_USE_LEA 1
EOF
 
  elif test "$enableval" = "no"; then
    :
  else
    { echo "configure: error: Option, xpcom-lea, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi


# Check whether --enable-js-ultrasparc or --disable-js-ultrasparc was given.
if test "${enable_js_ultrasparc+set}" = set; then
  enableval="$enable_js_ultrasparc"
  if test "$enableval" = "yes"; then
    case "$target_os" in
    solaris*)   
        case $OS_TEST in
        sun4u)
            JS_ULTRASPARC_OPTS=1
            ;;
        esac
        ;;
esac

  elif test "$enableval" = "no"; then
    :
  else
    { echo "configure: error: Option, js-ultrasparc, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi



# Features that require extra sources

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


# Check whether --enable-jprof or --disable-jprof was given.
if test "${enable_jprof+set}" = set; then
  enableval="$enable_jprof"
  if test "$enableval" = "yes"; then
    MOZ_JPROF=1
    cat >> confdefs.h <<\EOF
#define MOZ_JPROF 1
EOF

  elif test "$enableval" = "no"; then
    :
  else
    { echo "configure: error: Option, jprof, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi


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


# Debugging and Optimizations

MOZ_DEBUG=1

if test ! "$MOZ_DEBUG_FLAGS"
then
    case "$target" in
    *-irix*)
        if test "$GNU_CC"; then
            GCC_VERSION=`$CC -v 2>&1 | awk '/version/ { print $3 }'`
            case "$GCC_VERSION" in
            2.95.*)
                MOZ_DEBUG_FLAGS=""
                ;;
            *)
                MOZ_DEBUG_FLAGS="-g"
                ;;
            esac
        else
            MOZ_DEBUG_FLAGS="-g"
        fi
        ;;
    *)
    	MOZ_DEBUG_FLAGS="-g"
        ;;
    esac
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=
  elif test "$enableval" = "yes"; then
    :
  else
    { echo "configure: error: Option, debug, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi


MOZ_DEBUG_ENABLE_DEFS="-DDEBUG -D_DEBUG"
 case "${target_os}" in
    beos*)
        MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_${USER}"
        ;;
    msvc*|mksnt*|cygwin*|mingw*)
        MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_${USERNAME}"
        ;;
    *) 
        MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_`$WHOAMI`"
        ;;
  esac
MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DTRACING"

MOZ_DEBUG_DISABLE_DEFS="-DNDEBUG -DTRIMMED"

MOZ_OPTIMIZE=
if test ! "$MOZ_OPTIMIZE_FLAGS"; then
	MOZ_OPTIMIZE_FLAGS="-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" && test "$enableval" != "yes"; then
        MOZ_OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
        MOZ_OPTIMIZE=2
    fi
fi 
fi






# Check whether --enable-debug-modules or --disable-debug-modules was given.
if test "${enable_debug_modules+set}" = set; then
  enableval="$enable_debug_modules"
   MOZ_DEBUG_MODULES=`echo $enableval| sed 's/,/ /g'`  
fi


MOZ_DBGRINFO_MODULES=
# Check whether --enable-debugger-info-modules or --disable-debugger-info-modules was given.
if test "${enable_debugger_info_modules+set}" = set; then
  enableval="$enable_debugger_info_modules"
   for i in `echo $enableval | sed 's/,/ /g'`; do
                        if test "$i" = "no"; then
        i="^ALL_MODULES"
      fi
      if test "$i" = "yes"; then
        i="ALL_MODULES"
      fi
      MOZ_DBGRINFO_MODULES="$i $MOZ_DBGRINFO_MODULES";
    done 
fi


MOZ_DISABLE_DTD_DEBUG=
# Check whether --enable-dtd-debug or --disable-dtd-debug was given.
if test "${enable_dtd_debug+set}" = set; then
  enableval="$enable_dtd_debug"
  if test "$enableval" = "no"; then
    MOZ_DISABLE_DTD_DEBUG=1 
    cat >> confdefs.h <<\EOF
#define MOZ_DISABLE_DTD_DEBUG 1
EOF
 
  elif test "$enableval" = "yes"; then
    :
  else
    { echo "configure: error: Option, dtd-debug, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi


# Check whether --enable-boehm or --disable-boehm was given.
if test "${enable_boehm+set}" = set; then
  enableval="$enable_boehm"
  if test "$enableval" = "yes"; then
    cat >> confdefs.h <<\EOF
#define GC_LEAK_DETECTOR 1
EOF

    GC_LEAK_DETECTOR=1
  elif test "$enableval" = "no"; then
    :
  else
    { echo "configure: error: Option, boehm, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi


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

if test "$NS_DISABLE_LOGGING"; then
    cat >> confdefs.h <<\EOF
#define NS_DISABLE_LOGGING 1
EOF

else
    cat >> confdefs.h <<\EOF
#define MOZ_LOGGING 1
EOF

fi

# Check whether --enable-crash-on-assert or --disable-crash-on-assert was given.
if test "${enable_crash_on_assert+set}" = set; then
  enableval="$enable_crash_on_assert"
  if test "$enableval" = "yes"; then
    cat >> confdefs.h <<\EOF
#define UNIX_CRASH_ON_ASSERT 1
EOF

  elif test "$enableval" = "no"; then
    :
  else
    { echo "configure: error: Option, crash-on-assert, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi


MOZ_REORDER=
# Check whether --enable-reorder or --disable-reorder was given.
if test "${enable_reorder+set}" = set; then
  enableval="$enable_reorder"
  if test "$enableval" = "yes"; then
     if test -z "$GNU_LD"; then
    echo "configure: warning: Reordering only works with GNU ld. Not reordering." 1>&2
else
    MOZ_REORDER=1
fi
  elif test "$enableval" = "no"; then
    :
  else
    { echo "configure: error: Option, reorder, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi


# Check whether --enable-logrefcnt or --disable-logrefcnt was given.
if test "${enable_logrefcnt+set}" = set; then
  enableval="$enable_logrefcnt"
  if test "$enableval" = "yes"; then
    cat >> confdefs.h <<\EOF
#define FORCE_BUILD_REFCNT_LOGGING 1
EOF

  elif test "$enableval" = "no"; then
    cat >> confdefs.h <<\EOF
#define NO_BUILD_REFCNT_LOGGING 1
EOF

  else
    { echo "configure: error: Option, logrefcnt, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi


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


if test "$_DETECT_WEBSHELL_LEAKS"; then
  cat >> confdefs.h <<\EOF
#define DETECT_WEBSHELL_LEAKS 1
EOF
 
  
fi

# Check whether --enable-double-buffer or --disable-double-buffer was given.
if test "${enable_double_buffer+set}" = set; then
  enableval="$enable_double_buffer"
  if test "$enableval" = "no"; then
    cat >> confdefs.h <<\EOF
#define NO_DOUBLE_BUFFER 1
EOF

  elif test "$enableval" = "yes"; then
    :
  else
    { echo "configure: error: Option, double-buffer, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi


# Check whether --enable-wrap-malloc or --disable-wrap-malloc was given.
if test "${enable_wrap_malloc+set}" = set; then
  enableval="$enable_wrap_malloc"
  if test "$enableval" = "yes"; then
     if test "$GNU_CC"; then
    WRAP_MALLOC_CFLAGS="${LDFLAGS} -Wl,--wrap -Wl,malloc -Wl,--wrap -Wl,free -Wl,--wrap -Wl,realloc -Wl,--wrap -Wl,__builtin_new -Wl,--wrap -Wl,__builtin_vec_new -Wl,--wrap -Wl,__builtin_delete -Wl,--wrap -Wl,__builtin_vec_delete -Wl,--wrap -Wl,PR_Free -Wl,--wrap -Wl,PR_Malloc -Wl,--wrap -Wl,PR_Calloc -Wl,--wrap -Wl,PR_Realloc"
    MKSHLIB='$(CXX) $(DSO_LDOPTS) $(WRAP_MALLOC_CFLAGS) -o $@'
fi
  elif test "$enableval" = "no"; then
    :
  else
    { echo "configure: error: Option, wrap-malloc, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi


# Check whether --with-wrap-malloc or --without-wrap-malloc was given.
if test "${with_wrap_malloc+set}" = set; then
  withval="$with_wrap_malloc"
  WRAP_MALLOC_LIB=$withval
fi


# Check whether --enable-efence or --disable-efence was given.
if test "${enable_efence+set}" = set; then
  enableval="$enable_efence"
  if test "$enableval" = "yes"; then
    echo $ac_n "checking for malloc in -lefence""... $ac_c" 1>&6
echo "configure:11412: checking for malloc in -lefence" >&5
ac_lib_var=`echo efence'_'malloc | 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="-lefence  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11420 "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 malloc();

int main() {
malloc()
; return 0; }
EOF
if { (eval echo configure:11431: \"$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 efence | sed -e 's/^a-zA-Z0-9_/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lefence $LIBS"

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

  elif test "$enableval" = "no"; then
    :
  else
    { echo "configure: error: Option, efence, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
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
    :
  else
    { echo "configure: error: Option, strip, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi


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


# Profiling and Instrumenting

MOZ_TIMELINE=
# Check whether --enable-timeline or --disable-timeline was given.
if test "${enable_timeline+set}" = set; then
  enableval="$enable_timeline"
  if test "$enableval" = "yes"; then
    cat >> confdefs.h <<\EOF
#define MOZ_TIMELINE 1
EOF

    MOZ_TIMELINE=1
  elif test "$enableval" = "no"; then
    :
  else
    { echo "configure: error: Option, timeline, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi


MOZ_REFLOW_PERF=
# 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
    cat >> confdefs.h <<\EOF
#define MOZ_REFLOW_PREF 1
EOF
 
  elif test "$enableval" = "no"; then
    :
  else
    { echo "configure: error: Option, reflow-perf, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi



# Check whether --enable-perf-metrics or --disable-perf-metrics was given.
if test "${enable_perf_metrics+set}" = set; then
  enableval="$enable_perf_metrics"
  if test "$enableval" = "yes"; then
    MOZ_PERF_METRICS=1
    cat >> confdefs.h <<\EOF
#define MOZ_PERF_METRICS 1
EOF

  elif test "$enableval" = "no"; then
    :
  else
    { echo "configure: error: Option, perf-metrics, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi


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

if test "$NS_TRACE_MALLOC"; then
  # Please, Mr. Linker Man, don't take away our symbol names
  MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
  USE_ELF_DYNSTR_GC=
  cat >> confdefs.h <<\EOF
#define NS_TRACE_MALLOC 1
EOF

fi


# Check whether --enable-eazel-profiler-support or --disable-eazel-profiler-support was given.
if test "${enable_eazel_profiler_support+set}" = set; then
  enableval="$enable_eazel_profiler_support"
  if test "$enableval" = "yes"; then
    ENABLE_EAZEL_PROFILER=1
    cat >> confdefs.h <<\EOF
#define ENABLE_EAZEL_PROFILER 1
EOF

    USE_ELF_DYNSTR_GC=
    MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
    EAZEL_PROFILER_CFLAGS="-g -O -gdwarf-2 -finstrument-functions -D__NO_STRING_INLINES  -D__NO_MATH_INLINES"
    EAZEL_PROFILER_LIBS="-lprofiler -lpthread"
  elif test "$enableval" = "no"; then
    :
  else
    { echo "configure: error: Option, eazel-profiler-support, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi


# Check whether --enable-profile-modules or --disable-profile-modules was given.
if test "${enable_profile_modules+set}" = set; then
  enableval="$enable_profile_modules"
   MOZ_PROFILE_MODULES=`echo $enableval| sed 's/,/ /g'`  
fi


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


# Check whether --with-insure-dirs or --without-insure-dirs was given.
if test "${with_insure_dirs+set}" = set; then
  withval="$with_insure_dirs"
  MOZ_INSURE_DIRS=$withval 
fi


# Check whether --with-insure-exclude-dirs or --without-insure-exclude-dirs was given.
if test "${with_insure_exclude_dirs+set}" = set; then
  withval="$with_insure_exclude_dirs"
  MOZ_INSURE_EXCLUDE_DIRS="config $withval" 
fi


if test -z "$SKIP_LIBRARY_CHECKS"; then
echo $ac_n "checking for cplus_demangle in -liberty""... $ac_c" 1>&6
echo "configure:11629: checking for cplus_demangle in -liberty" >&5
ac_lib_var=`echo iberty'_'cplus_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="-liberty "-liberty" $LIBS"
cat > conftest.$ac_ext <<EOF
#line 11637 "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 cplus_demangle();

int main() {
cplus_demangle()
; return 0; }
EOF
if { (eval echo configure:11648: \"$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_DEMANGLE=1
else
  echo "$ac_t""no" 1>&6
HAVE_DEMANGLE=
fi

fi

MOZ_DEMANGLE_SYMBOLS=

if test "$HAVE_DEMANGLE"
then
  case "$target" in
    *-linux*)
        # Demangle only for debug or trace-malloc builds
        if test "$MOZ_DEBUG" || test "$NS_TRACE_MALLOC"
        then
            MOZ_DEMANGLE_SYMBOLS=1
            cat >> confdefs.h <<\EOF
#define MOZ_DEMANGLE_SYMBOLS 1
EOF

        fi
	;;
    *-solaris*)
        # Demangle only for debug builds which are using the Gnu compiler.
        if test "$GNU_CC"
        then
            if test "$MOZ_DEBUG"
            then
                MOZ_DEMANGLE_SYMBOLS=1
                cat >> confdefs.h <<\EOF
#define MOZ_DEMANGLE_SYMBOLS 1
EOF

            fi
        fi
    ;;
  esac
fi




# Misc. Options

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


# Check whether --enable-chrome-format or --disable-chrome-format was given.
if test "${enable_chrome_format+set}" = set; then
  enableval="$enable_chrome_format"
  MOZ_CHROME_FILE_FORMAT=`echo $enableval | tr A-Z a-z`
fi


if test -z "$MOZ_CHROME_FILE_FORMAT"; then
    MOZ_CHROME_FILE_FORMAT=jar
fi

if test "$MOZ_CHROME_FILE_FORMAT" != "jar" && 
    test "$MOZ_CHROME_FILE_FORMAT" != "flat" &&
    test "$MOZ_CHROME_FILE_FORMAT" != "both"; then
    { echo "configure: error: --enable-chrome-format must be set to either jar, flat or both" 1>&2; exit 1; }
fi

# 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.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; exit 1; }
else 
    cat >> confdefs.h <<EOF
#define MOZ_USER_DIR "$val"
EOF

fi
else
  cat >> confdefs.h <<\EOF
#define MOZ_USER_DIR ".mozilla"
EOF
 
fi


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


if test -z "$SKIP_COMPILER_CHECKS"; then
# Compiler Options

echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
echo "configure:11788: checking for gcc -pipe support" >&5
if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
    echo '#include <stdio.h>' > dummy-hello.c
    echo 'int main() { printf("Hello World\n"); exit(0); }' >> dummy-hello.c
    ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
    cat dummy-hello.s | ${AS_BIN} -o dummy-hello.S - 2>&5
    if test $? = 0; then
        _res_as_stdin="yes"
    else
        _res_as_stdin="no"
    fi
    if test "$_res_as_stdin" = "yes"; then
        _SAVE_CFLAGS=$CFLAGS
        CFLAGS="$CFLAGS -pipe"
        cat > conftest.$ac_ext <<EOF
#line 11803 "configure"
#include "confdefs.h"
 #include <stdio.h> 
int main() {
printf("Hello World\n");
; return 0; }
EOF
if { (eval echo configure:11810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  _res_gcc_pipe="yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  _res_gcc_pipe="no" 
fi
rm -f conftest*
        CFLAGS=$_SAVE_CFLAGS
    fi
    if test "$_res_as_stdin" = "yes" && test "$_res_gcc_pipe" = "yes"; then
        _res="yes";
        CFLAGS="$CFLAGS -pipe"
        CXXFLAGS="$CXXFLAGS -pipe"
    else
        _res="no"
    fi
    rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out
    echo "$ac_t""$_res" 1>&6
else
    echo "$ac_t""no" 1>&6
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


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

if test "$_PEDANTIC"; then
    _SAVE_CXXFLAGS=$CXXFLAGS
    CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic"
    echo $ac_n "checking whether C++ compiler has -pedantic long long bug""... $ac_c" 1>&6
echo "configure:11859: checking whether C++ compiler has -pedantic long long bug" >&5
    if test "$cross_compiling" = yes; then
  result="maybe" 
else
  cat > conftest.$ac_ext <<EOF
#line 11864 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit(int);
#endif
 int main () {
                if (sizeof(long long) != 8) { return 1; } 
                    return 0; } 
EOF
if { (eval echo configure:11873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  result="no"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  result="yes"
fi
rm -fr conftest*
fi

    echo "$ac_t""$result" 1>&6
    CXXFLAGS="$_SAVE_CXXFLAGS"

    case "$result" in
    no)
        _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} ${_COMPILER_PREFIX}-pedantic"
        _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic"
        ;;
    yes)
        { echo "configure: error: Your compiler appears to have a known bug where long long is miscompiled when using -pedantic.  Reconfigure using --disable-pedantic. " 1>&2; exit 1; }
        ;;
    maybe)
        echo "configure: warning: Cannot test -pedantic long long bug when cross-compiling." 1>&2
        ;;
    esac
fi

_SAVE_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS}"
echo $ac_n "checking for correct overload resolution with const and templates""... $ac_c" 1>&6
echo "configure:11905: checking for correct overload resolution with const and templates" >&5
if eval "test \"`echo '$''{'ac_nscap_nonconst_opeq_bug'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 11910 "configure"
#include "confdefs.h"

                      template <class T>
                      class Pointer
                        {
                        public:
                          T* myPtr;
                        };
                      
                      template <class T, class U>
                      int operator==(const Pointer<T>& rhs, U* lhs)
                        {
                          return rhs.myPtr == lhs;
                        }
                      
                      template <class T, class U>
                      int operator==(const Pointer<T>& rhs, const U* lhs)
                        {
                          return rhs.myPtr == lhs;
                        }
                    
int main() {

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

echo "$ac_t""$ac_nscap_nonconst_opeq_bug" 1>&6
CXXFLAGS="$_SAVE_CXXFLAGS"

if test "$ac_nscap_nonconst_opeq_bug" = "yes" ; then
    cat >> confdefs.h <<\EOF
#define NSCAP_DONT_PROVIDE_NONCONST_OPEQ 1
EOF

fi
fi

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


if test "$_IGNORE_LONG_LONG_WARNINGS"; then
     _SAVE_CFLAGS="$CFLAGS"
     CFLAGS="$CFLAGS ${_COMPILER_PREFIX}-Wno-long-long"
     echo $ac_n "checking whether compiler supports -Wno-long-long""... $ac_c" 1>&6
echo "configure:11980: checking whether compiler supports -Wno-long-long" >&5
     cat > conftest.$ac_ext <<EOF
#line 11982 "configure"
#include "confdefs.h"

int main() {
return(0);
; return 0; }
EOF
if { (eval echo configure:11989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
   _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} ${_COMPILER_PREFIX}-Wno-long-long"
	  _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-Wno-long-long"
	  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
     CFLAGS="$_SAVE_CFLAGS"
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_RTTI_FLAGS=-frtti
  elif test "$enableval" = "no"; then
    :
  else
    { echo "configure: error: Option, cpp-rtti, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi


# Check whether --enable-cpp-exceptions or --disable-cpp-exceptions was given.
if test "${enable_cpp_exceptions+set}" = set; then
  enableval="$enable_cpp_exceptions"
  if test "$enableval" = "yes"; then
     if test "$MIPSPRO_CXX"; then
    _MOZ_EXCEPTIONS_FLAGS=-LANG:exceptions=ON
else
    _MOZ_EXCEPTIONS_FLAGS=-fexceptions 
fi 
  elif test "$enableval" = "no"; then
    :
  else
    { echo "configure: error: Option, cpp-exceptions, does not take an argument ($enableval)." 1>&2; exit 1; }
  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


# OS/2 Build Options

# Check whether --with-os2emx or --without-os2emx was given.
if test "${with_os2emx+set}" = set; then
  withval="$with_os2emx"
  MOZ_OS2_TOOLS=EMX
    MOZ_OS2_EMX_OBJECTFORMAT="$withval"
    cat >> confdefs.h <<\EOF
#define XP_OS2_EMX 1
EOF
 
fi


# Check whether --with-os2vacpp or --without-os2vacpp was given.
if test "${with_os2vacpp+set}" = set; then
  withval="$with_os2vacpp"
  if test "$withval" = "yes"; then
    MOZ_OS2_TOOLS=VACPP
    cat >> confdefs.h <<\EOF
#define XP_OS2_VACPP 1
EOF
 
  elif test "$withval" = "no"; then
    :
  else
    { echo "configure: error: Option, os2vacpp, does not take an argument ($withval)." 1>&2; exit 1; }
  fi
fi


# Build dependencies

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


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

if test "$_cpp_md_flag"; then
  COMPILER_DEPEND=1
  _DEPEND_CFLAGS='$(filter-out %/.pp,-Wp,-MD,$(MDDEPDIR)/$(*F).pp)'
fi
fi # MOZ_AUTO_DEPS
MDDEPDIR='.deps'





# Static build options

BUILD_SHARED_LIBS=1
BUILD_STATIC_LIBS=
MOZ_STATIC_COMPONENT_LIBS=

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


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


if (test -z "$BUILD_SHARED_LIBS" && test -z "$BUILD_STATIC_LIBS") ||
    (test -n "$BUILD_SHARED_LIBS" && test -n "$BUILD_STATIC_LIBS") ; then
    { echo "configure: error: Only one of --enable-shared or --enable-static must be specified." 1>&2; exit 1; }
fi

# Check whether --enable-meta-component-modules or --disable-meta-component-modules was given.
if test "${enable_meta_component_modules+set}" = set; then
  enableval="$enable_meta_component_modules"
   MOZ_STATIC_COMPONENTS=`echo $enableval | sed 's/,/ /g'`  
fi


# Check whether --enable-meta-components or --disable-meta-components was given.
if test "${enable_meta_components+set}" = set; then
  enableval="$enable_meta_components"
   MOZ_META_COMPONENTS=`echo $enableval | sed 's/,/ /g'`  
fi


if test -n "$MOZ_STATIC_COMPONENTS" && test -n "$MOZ_META_COMPONENTS"; then
    { echo "configure: error: Simultaneous use of static-components & meta-components is not supported." 1>&2; exit 1; }
fi

case "$target" in
    *-*-aix*)
	if test -z "${BUILD_STATIC_LIBS}" -o -n "${BUILD_SHARED_LIBS}"; then
	    if test -f /usr/lpp/xlC/bin/makeC++SharedLib_r; then
		AIX_SHLIB_BIN='/usr/lpp/xlC/bin/makeC++SharedLib_r'
	    elif test -f /usr/vacpp/bin/makeC++SharedLib_r; then
		AIX_SHLIB_BIN='/usr/vacpp/bin/makeC++SharedLib_r'
	    elif test -f /usr/ibmcxx/bin/makeC++SharedLib_r; then
		AIX_SHLIB_BIN='/usr/ibmcxx/bin/makeC++SharedLib_r'
	    fi
	    # Extract the first word of "makeC++SharedLib_r", so it can be a program name with args.
set dummy makeC++SharedLib_r; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:12192: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AIX_SHLIB_BIN'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$AIX_SHLIB_BIN" in
  /*)
  ac_cv_path_AIX_SHLIB_BIN="$AIX_SHLIB_BIN" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_AIX_SHLIB_BIN="$AIX_SHLIB_BIN" # 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_AIX_SHLIB_BIN="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_AIX_SHLIB_BIN" && ac_cv_path_AIX_SHLIB_BIN=":"
  ;;
esac
fi
AIX_SHLIB_BIN="$ac_cv_path_AIX_SHLIB_BIN"
if test -n "$AIX_SHLIB_BIN"; then
  echo "$ac_t""$AIX_SHLIB_BIN" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

	    if test ! -n "$AIX_SHLIB_BIN"; then
		echo
		echo "*** Unable to locate makeC++SharedLib_r, needed for creation of shared"
		echo "*** libraries on AIX.  You will only be able to build static libraries."
		echo
		BUILD_STATIC_LIBS=1
		BUILD_SHARED_LIBS=
	    fi
	fi
	

				
	if test ! "$GNU_CC" && test "$ac_cv_cpp_reinterpret_cast" = no ; then
	   CXXFLAGS="$CXXFLAGS -DAIX_XLC_364"
	   CFLAGS="$CFLAGS -DAIX_XLC_364"
	fi

	;;

esac

# Standalone module options (Not for building Mozilla)

BUILD_MODULES=all
# Check whether --enable-standalone-modules or --disable-standalone-modules was given.
if test "${enable_standalone_modules+set}" = set; then
  enableval="$enable_standalone_modules"
   BUILD_MODULES=`echo $enableval | sed 's/,/ /g'`  
fi


if test "$BUILD_MODULES" != "all" &&
    test `echo "$BUILD_MODULES" | grep -c ldap` = 0 &&
    test "$enable_ldap" != "yes"; then
    MOZ_LDAP_XPCOM=
fi

SKIP_IDL_CHECK="no"

if test "$_WIN32_MSVC"; then
    SKIP_IDL_CHECK="yes"
fi

# Check whether --with-libIDL or --without-libIDL was given.
if test "${with_libIDL+set}" = set; then
  withval="$with_libIDL"
  if test "$withval" = "no"; then
    SKIP_IDL_CHECK="yes"
  elif test "$withval" = "yes"; then
    :
  else
    { echo "configure: error: Option, libIDL, does not take an argument ($withval)." 1>&2; exit 1; }
  fi
fi


if test "$SKIP_IDL_CHECK" = "no"
then
    # Check whether --with-libIDL-prefix or --without-libIDL-prefix was given.
if test "${with_libIDL_prefix+set}" = set; then
  withval="$with_libIDL_prefix"
  libIDL_config_prefix="$withval"
else
  libIDL_config_prefix=""
fi

# Check whether --with-libIDL-exec-prefix or --without-libIDL-exec-prefix was given.
if test "${with_libIDL_exec_prefix+set}" = set; then
  withval="$with_libIDL_exec_prefix"
  libIDL_config_exec_prefix="$withval"
else
  libIDL_config_exec_prefix=""
fi

# Check whether --enable-libIDLtest or --disable-libIDLtest was given.
if test "${enable_libIDLtest+set}" = set; then
  enableval="$enable_libIDLtest"
  :
else
  enable_libIDLtest=yes
fi


  if test x$libIDL_config_exec_prefix != x ; then
     libIDL_config_args="$libIDL_config_args --exec-prefix=$libIDL_config_exec_prefix"
     if test x${LIBIDL_CONFIG+set} != xset ; then
        LIBIDL_CONFIG=$libIDL_config_exec_prefix/bin/libIDL-config
     fi
  fi
  if test x$libIDL_config_prefix != x ; then
     libIDL_config_args="$libIDL_config_args --prefix=$libIDL_config_prefix"
     if test x${LIBIDL_CONFIG+set} != xset ; then
        LIBIDL_CONFIG=$libIDL_config_prefix/bin/libIDL-config
     fi
  fi

  # Check whether --with-glib-prefix or --without-glib-prefix was given.
if test "${with_glib_prefix+set}" = set; then
  withval="$with_glib_prefix"
  glib_config_prefix="$withval"
else
  glib_config_prefix=""
fi

# Check whether --with-glib-exec-prefix or --without-glib-exec-prefix was given.
if test "${with_glib_exec_prefix+set}" = set; then
  withval="$with_glib_exec_prefix"
  glib_config_exec_prefix="$withval"
else
  glib_config_exec_prefix=""
fi

# Check whether --enable-glibtest or --disable-glibtest was given.
if test "${enable_glibtest+set}" = set; then
  enableval="$enable_glibtest"
  :
else
  enable_glibtest=yes
fi


  if test x$glib_config_exec_prefix != x ; then
     glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
     if test x${GLIB_CONFIG+set} != xset ; then
        GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
     fi
  fi
  if test x$glib_config_prefix != x ; then
     glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
     if test x${GLIB_CONFIG+set} != xset ; then
        GLIB_CONFIG=$glib_config_prefix/bin/glib-config
     fi
  fi

  for module in . 
  do
      case "$module" in
         gmodule) 
             glib_config_args="$glib_config_args gmodule"
         ;;
         gthread) 
             glib_config_args="$glib_config_args gthread"
         ;;
      esac
  done

    unset ac_cv_path_GLIB_CONFIG

  # Extract the first word of "glib-config", so it can be a program name with args.
set dummy glib-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:12376: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GLIB_CONFIG" in
  /*)
  ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_GLIB_CONFIG="$GLIB_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_GLIB_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_GLIB_CONFIG" && ac_cv_path_GLIB_CONFIG="no"
  ;;
esac
fi
GLIB_CONFIG="$ac_cv_path_GLIB_CONFIG"
if test -n "$GLIB_CONFIG"; then
  echo "$ac_t""$GLIB_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  min_glib_version=1.2.0
  echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6
echo "configure:12411: checking for GLIB - version >= $min_glib_version" >&5
  no_glib=""
  if test "$GLIB_CONFIG" = "no" ; then
    no_glib=yes
  else
    GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
    GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
    glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
    glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
    glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
    if test "x$enable_glibtest" = "xyes" ; then
      ac_save_CFLAGS="$CFLAGS"
      ac_save_LIBS="$LIBS"
      CFLAGS="$CFLAGS $GLIB_CFLAGS"
      LIBS="$GLIB_LIBS $LIBS"
      rm -f conf.glibtest
      if test "$cross_compiling" = yes; then
  echo $ac_n "cross compiling; assumed OK... $ac_c"
else
  cat > conftest.$ac_ext <<EOF
#line 12434 "configure"
#include "confdefs.h"

#include <glib.h>
#include <stdio.h>
#include <stdlib.h>

int 
main ()
{
  int major, minor, micro;
  char *tmp_version;

  system ("touch conf.glibtest");

  /* HP/UX 9 (%@#!) writes to sscanf strings */
  tmp_version = g_strdup("$min_glib_version");
  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
     printf("%s, bad version string\n", "$min_glib_version");
     exit(1);
   }

  if ((glib_major_version != $glib_config_major_version) ||
      (glib_minor_version != $glib_config_minor_version) ||
      (glib_micro_version != $glib_config_micro_version))
    {
      printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
             $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
             glib_major_version, glib_minor_version, glib_micro_version);
      printf ("*** was found! If glib-config was correct, then it is best\n");
      printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
      printf("*** by modifying your LD_LIBRARY_PATH environment variable, or by editing\n");
      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
      printf("*** required on your system.\n");
      printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
      printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
      printf("*** before re-running configure\n");
    } 
  else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
	   (glib_minor_version != GLIB_MINOR_VERSION) ||
           (glib_micro_version != GLIB_MICRO_VERSION))
    {
      printf("*** GLIB header files (version %d.%d.%d) do not match\n",
	     GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
      printf("*** library (version %d.%d.%d)\n",
	     glib_major_version, glib_minor_version, glib_micro_version);
    }
  else
    {
      if ((glib_major_version > major) ||
        ((glib_major_version == major) && (glib_minor_version > minor)) ||
        ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
      {
        return 0;
       }
     else
      {
        printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
               glib_major_version, glib_minor_version, glib_micro_version);
        printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
	       major, minor, micro);
        printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
        printf("***\n");
        printf("*** If you have already installed a sufficiently new version, this error\n");
        printf("*** probably means that the wrong copy of the glib-config shell script is\n");
        printf("*** being found. The easiest way to fix this is to remove the old version\n");
        printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
        printf("*** correct copy of glib-config. (In this case, you will have to\n");
        printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
        printf("*** so that the correct libraries are found at run-time))\n");
      }
    }
  return 1;
}

EOF
if { (eval echo configure:12510: \"$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*
  no_glib=yes
fi
rm -fr conftest*
fi

       CFLAGS="$ac_save_CFLAGS"
       LIBS="$ac_save_LIBS"
     fi
  fi
  if test "x$no_glib" = x ; then
     echo "$ac_t""yes" 1>&6
     :     
  else
     echo "$ac_t""no" 1>&6
     if test "$GLIB_CONFIG" = "no" ; then
       echo "*** The glib-config script installed by GLIB could not be found"
       echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
       echo "*** your path, or set the GLIB_CONFIG environment variable to the"
       echo "*** full path to glib-config."
     else
       if test -f conf.glibtest ; then
        :
       else
          echo "*** Could not run GLIB test program, checking why..."
          CFLAGS="$CFLAGS $GLIB_CFLAGS"
          LIBS="$LIBS $GLIB_LIBS"
          cat > conftest.$ac_ext <<EOF
#line 12544 "configure"
#include "confdefs.h"

#include <glib.h>
#include <stdio.h>

int main() {
 return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); 
; return 0; }
EOF
if { (eval echo configure:12554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
   echo "*** The test program compiled, but did not run. This usually means"
          echo "*** that the run-time linker is not finding GLIB or finding the wrong"
          echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
          echo "*** is required on your system"
	  echo "***"
          echo "*** If you have an old version installed, it is best to remove it, although"
          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
          echo "***"
          echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
          echo "*** came with the system with the command"
          echo "***"
          echo "***    rpm --erase --nodeps gtk gtk-devel" 
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
   echo "*** The test program failed to compile or link. See the file config.log for the"
          echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
          echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
          echo "*** may want to edit the glib-config script: $GLIB_CONFIG" 
fi
rm -f conftest*
          CFLAGS="$ac_save_CFLAGS"
          LIBS="$ac_save_LIBS"
       fi
     fi
     GLIB_CFLAGS=""
     GLIB_LIBS=""
     :
  fi
  
  
  rm -f conf.glibtest


    unset ac_cv_path_LIBIDL_CONFIG

  # Extract the first word of "libIDL-config", so it can be a program name with args.
set dummy libIDL-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:12598: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_LIBIDL_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$LIBIDL_CONFIG" in
  /*)
  ac_cv_path_LIBIDL_CONFIG="$LIBIDL_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_LIBIDL_CONFIG="$LIBIDL_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_LIBIDL_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_LIBIDL_CONFIG" && ac_cv_path_LIBIDL_CONFIG="no"
  ;;
esac
fi
LIBIDL_CONFIG="$ac_cv_path_LIBIDL_CONFIG"
if test -n "$LIBIDL_CONFIG"; then
  echo "$ac_t""$LIBIDL_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  min_libIDL_version=$LIBIDL_VERSION
  echo $ac_n "checking for libIDL - version >= $min_libIDL_version""... $ac_c" 1>&6
echo "configure:12633: checking for libIDL - version >= $min_libIDL_version" >&5
  no_libIDL=""
  if test "$LIBIDL_CONFIG" = "no" ; then
    no_libIDL=yes
  else
    LIBIDL_CFLAGS=`$LIBIDL_CONFIG $libIDL_config_args --cflags`
    LIBIDL_LIBS=`$LIBIDL_CONFIG $libIDL_config_args --libs`
    # hack to allow us to keep using libIDL 0.6.3-0.6.7. Anyone may remove
    # this after we start requiring libIDL 0.6.8 or anything higher
    LIBIDL_CFLAGS="$GLIB_CFLAGS $LIBIDL_CFLAGS"
    LIBIDL_LIBS="$GLIB_LIBS $LIBIDL_LIBS"
    libIDL_config_major_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
    libIDL_config_minor_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
    libIDL_config_micro_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
    if test "x$enable_libIDLtest" = "xyes" ; then
      ac_save_CFLAGS="$CFLAGS"
      ac_save_LIBS="$LIBS"
      CFLAGS="$CFLAGS $LIBIDL_CFLAGS"
      LIBS="$LIBIDL_LIBS $LIBS"
      rm -f conf.libIDLtest
      if test "$cross_compiling" = yes; then
  echo $ac_n "cross compiling; assumed OK... $ac_c"
else
  cat > conftest.$ac_ext <<EOF
#line 12660 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <stdlib.h>
#include <libIDL/IDL.h>

int 
main ()
{
  int major, minor, micro;
  int libIDL_major_version;
  int libIDL_minor_version;
  int libIDL_micro_version;
  char *tmp_version;

  system ("touch conf.libIDLtest");

  /* HP/UX 9 (%@#!) writes to sscanf strings */
  tmp_version = g_strdup ("$min_libIDL_version");
  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
     printf("%s, bad version string\n", "$min_libIDL_version");
     exit(1);
  }
  tmp_version = g_strdup (IDL_get_libver_string ());
  if (sscanf(tmp_version, "%d.%d.%d",
	     &libIDL_major_version,
	     &libIDL_minor_version,
	     &libIDL_micro_version) != 3) {
     printf("%s, bad version string\n", tmp_version);
     exit(1);
  }

  if ((libIDL_major_version != $libIDL_config_major_version) ||
      (libIDL_minor_version != $libIDL_config_minor_version) ||
      (libIDL_micro_version != $libIDL_config_micro_version))
    {
      printf("\n*** 'libIDL-config --version' returned %d.%d.%d, but libIDL (%d.%d.%d)\n", 
             $libIDL_config_major_version, $libIDL_config_minor_version, $libIDL_config_micro_version,
             libIDL_major_version, libIDL_minor_version, libIDL_micro_version);
      printf ("*** was found! If libIDL-config was correct, then it is best\n");
      printf ("*** to remove the old version of LIBIDL. You may also be able to fix the error\n");
      printf("*** by modifying your LD_LIBRARY_PATH environment variable, or by editing\n");
      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
      printf("*** required on your system.\n");
      printf("*** If libIDL-config was wrong, set the environment variable LIBIDL_CONFIG\n");
      printf("*** to point to the correct copy of libIDL-config, and remove the file config.cache\n");
      printf("*** before re-running configure\n");
    } 
  else if ((libIDL_major_version != LIBIDL_MAJOR_VERSION) ||
	   (libIDL_minor_version != LIBIDL_MINOR_VERSION) ||
           (libIDL_micro_version != LIBIDL_MICRO_VERSION))
    {
      printf("\n*** libIDL header files (version %d.%d.%d) do not match\n",
	     LIBIDL_MAJOR_VERSION, LIBIDL_MINOR_VERSION, LIBIDL_MICRO_VERSION);
      printf("*** library (version %d.%d.%d)\n",
	     libIDL_major_version, libIDL_minor_version, libIDL_micro_version);
    }
  else
    {
      if ((libIDL_major_version > major) ||
        ((libIDL_major_version == major) && (libIDL_minor_version > minor)) ||
        ((libIDL_major_version == major) && (libIDL_minor_version == minor) && (libIDL_micro_version >= micro)))
      {
        return 0;
       }
     else
      {
        printf("\n*** An old version of libIDL (%d.%d.%d) was found.\n",
               libIDL_major_version, libIDL_minor_version, libIDL_micro_version);
        printf("*** You need at least libIDL version %d.%d.%d.\n",
               major, minor, micro);
        printf("***\n");
        printf("*** If you have already installed a sufficiently new version, this error\n");
        printf("*** probably means that the wrong copy of the libIDL-config shell script is\n");
        printf("*** being found. The easiest way to fix this is to remove the old version\n");
        printf("*** of libIDL, but you can also set the LIBIDL_CONFIG environment to point to the\n");
        printf("*** correct copy of libIDL-config. (In this case, you will have to\n");
        printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
        printf("*** so that the correct libraries are found at run-time))\n");
      }
    }
  return 1;
}

EOF
if { (eval echo configure:12746: \"$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*
  no_libIDL=yes
fi
rm -fr conftest*
fi

       CFLAGS="$ac_save_CFLAGS"
       LIBS="$ac_save_LIBS"
     fi
  fi
  if test "x$no_libIDL" = x ; then
     echo "$ac_t""yes" 1>&6
     :     
  else
     echo "$ac_t""no" 1>&6
     if test "$LIBIDL_CONFIG" = "no" ; then
       echo "*** The libIDL-config script installed by libIDL could not be found"
       echo "*** If libIDL was installed in PREFIX, make sure PREFIX/bin is in"
       echo "*** your path, or set the LIBIDL_CONFIG environment variable to the"
       echo "*** full path to libIDL-config."
     else
       if test -f conf.libIDLtest ; then
        :
       else
          echo "*** Could not run libIDL test program, checking why..."
          CFLAGS="$CFLAGS $LIBIDL_CFLAGS"
          LIBS="$LIBS $LIBIDL_LIBS"
          cat > conftest.$ac_ext <<EOF
#line 12780 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <stdlib.h>
#include <libIDL/IDL.h>

int main() {
 return IDL_get_libver_string ? 1 : 0; 
; return 0; }
EOF
if { (eval echo configure:12791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
   echo "*** The test program compiled, but did not run. This usually means"
          echo "*** that the run-time linker is not finding libIDL or finding the wrong"
          echo "*** version of LIBIDL. If it is not finding libIDL, you'll need to set your"
          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
          echo "*** is required on your system"
	  echo "***"
          echo "*** If you have an old version installed, it is best to remove it, although"
          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" 
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
   echo "*** The test program failed to compile or link. See the file config.log for the"
          echo "*** exact error that occured. This usually means libIDL was incorrectly installed"
          echo "*** or that you have moved libIDL since it was installed. In the latter case, you"
          echo "*** may want to edit the libIDL-config script: $LIBIDL_CONFIG" 
fi
rm -f conftest*
          CFLAGS="$ac_save_CFLAGS"
          LIBS="$ac_save_LIBS"
       fi
     fi
     LIBIDL_CFLAGS=""
     LIBIDL_LIBS=""
     _LIBIDL_NOT_FOUND=1
  fi
  
  
  rm -f conf.libIDLtest

                    if test -n "$_LIBIDL_NOT_FOUND" && test -z "$CROSS_COMPILE"; then
        for ac_prog in $ORBIT_CONFIG orbit-config
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:12830: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_ORBIT_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$ORBIT_CONFIG" in
  /*)
  ac_cv_path_ORBIT_CONFIG="$ORBIT_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_ORBIT_CONFIG="$ORBIT_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_ORBIT_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
ORBIT_CONFIG="$ac_cv_path_ORBIT_CONFIG"
if test -n "$ORBIT_CONFIG"; then
  echo "$ac_t""$ORBIT_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$ORBIT_CONFIG" && break
done

        if test -n "$ORBIT_CONFIG"; then
        	_ORBIT_CFLAGS=`${ORBIT_CONFIG} client --cflags`
    	    _ORBIT_LIBS=`${ORBIT_CONFIG} client --libs`
            _ORBIT_INC_PATH=`${PERL} -e '{ for $f (@ARGV) { print "$f " if ($f =~ m/^-I/); } }' -- ${_ORBIT_CFLAGS}`
            _ORBIT_LIB_PATH=`${PERL} -e '{ for $f (@ARGV) { print "$f " if ($f =~ m/^-L/); } }' -- ${_ORBIT_LIBS}`
            LIBIDL_CFLAGS="$_ORBIT_INC_PATH"
            LIBIDL_LIBS="$_ORBIT_LIB_PATH -lIDL -lglib"
            LIBIDL_CONFIG=
            _LIBIDL_NOT_FOUND=
        fi
    fi
    if test -n "$_LIBIDL_NOT_FOUND"; then
        { echo "configure: error: libIDL not found.
        libIDL $LIBIDL_VERSION or higher is required." 1>&2; exit 1; }
    fi
fi

if test -n "$CROSS_COMPILE"; then
    if test -z "$HOST_LIBIDL_CONFIG"; then
        HOST_LIBIDL_CONFIG="$LIBIDL_CONFIG"
    fi
    if test -n "$HOST_LIBIDL_CONFIG"; then
        HOST_LIBIDL_CFLAGS=`${HOST_LIBIDL_CONFIG} --cflags`
        HOST_LIBIDL_LIBS=`${HOST_LIBIDL_CONFIG} --libs`
    else
        HOST_LIBIDL_CFLAGS="$LIBIDL_CFLAGS"
        HOST_LIBIDL_LIBS="$LIBIDL_LIBS"
    fi
    if test "$OS_TARGET" = "POSIX_for_OpenVMS_AXP"; then
      LIBIDL_CFLAGS=`${LIBIDL_CONFIG}-VMS --cflags`
      LIBIDL_LIBS=`${LIBIDL_CONFIG}-VMS --libs`
    fi
fi

if test -z "$SKIP_PATH_CHECKS"; then
if test -z "${GLIB_CFLAGS}" || test -z "${GLIB_LIBS}" ; then
    # Check whether --with-glib-prefix or --without-glib-prefix was given.
if test "${with_glib_prefix+set}" = set; then
  withval="$with_glib_prefix"
  glib_config_prefix="$withval"
else
  glib_config_prefix=""
fi

# Check whether --with-glib-exec-prefix or --without-glib-exec-prefix was given.
if test "${with_glib_exec_prefix+set}" = set; then
  withval="$with_glib_exec_prefix"
  glib_config_exec_prefix="$withval"
else
  glib_config_exec_prefix=""
fi

# Check whether --enable-glibtest or --disable-glibtest was given.
if test "${enable_glibtest+set}" = set; then
  enableval="$enable_glibtest"
  :
else
  enable_glibtest=yes
fi


  if test x$glib_config_exec_prefix != x ; then
     glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
     if test x${GLIB_CONFIG+set} != xset ; then
        GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
     fi
  fi
  if test x$glib_config_prefix != x ; then
     glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
     if test x${GLIB_CONFIG+set} != xset ; then
        GLIB_CONFIG=$glib_config_prefix/bin/glib-config
     fi
  fi

  for module in . 
  do
      case "$module" in
         gmodule) 
             glib_config_args="$glib_config_args gmodule"
         ;;
         gthread) 
             glib_config_args="$glib_config_args gthread"
         ;;
      esac
  done

    unset ac_cv_path_GLIB_CONFIG

  # Extract the first word of "glib-config", so it can be a program name with args.
set dummy glib-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:12956: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GLIB_CONFIG" in
  /*)
  ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_GLIB_CONFIG="$GLIB_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_GLIB_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_GLIB_CONFIG" && ac_cv_path_GLIB_CONFIG="no"
  ;;
esac
fi
GLIB_CONFIG="$ac_cv_path_GLIB_CONFIG"
if test -n "$GLIB_CONFIG"; then
  echo "$ac_t""$GLIB_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  min_glib_version=${GLIB_VERSION}
  echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6
echo "configure:12991: checking for GLIB - version >= $min_glib_version" >&5
  no_glib=""
  if test "$GLIB_CONFIG" = "no" ; then
    no_glib=yes
  else
    GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
    GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
    glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
    glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
    glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
    if test "x$enable_glibtest" = "xyes" ; then
      ac_save_CFLAGS="$CFLAGS"
      ac_save_LIBS="$LIBS"
      CFLAGS="$CFLAGS $GLIB_CFLAGS"
      LIBS="$GLIB_LIBS $LIBS"
      rm -f conf.glibtest
      if test "$cross_compiling" = yes; then
  echo $ac_n "cross compiling; assumed OK... $ac_c"
else
  cat > conftest.$ac_ext <<EOF
#line 13014 "configure"
#include "confdefs.h"

#include <glib.h>
#include <stdio.h>
#include <stdlib.h>

int 
main ()
{
  int major, minor, micro;
  char *tmp_version;

  system ("touch conf.glibtest");

  /* HP/UX 9 (%@#!) writes to sscanf strings */
  tmp_version = g_strdup("$min_glib_version");
  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
     printf("%s, bad version string\n", "$min_glib_version");
     exit(1);
   }

  if ((glib_major_version != $glib_config_major_version) ||
      (glib_minor_version != $glib_config_minor_version) ||
      (glib_micro_version != $glib_config_micro_version))
    {
      printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
             $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
             glib_major_version, glib_minor_version, glib_micro_version);
      printf ("*** was found! If glib-config was correct, then it is best\n");
      printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
      printf("*** by modifying your LD_LIBRARY_PATH environment variable, or by editing\n");
      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
      printf("*** required on your system.\n");
      printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
      printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
      printf("*** before re-running configure\n");
    } 
  else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
	   (glib_minor_version != GLIB_MINOR_VERSION) ||
           (glib_micro_version != GLIB_MICRO_VERSION))
    {
      printf("*** GLIB header files (version %d.%d.%d) do not match\n",
	     GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
      printf("*** library (version %d.%d.%d)\n",
	     glib_major_version, glib_minor_version, glib_micro_version);
    }
  else
    {
      if ((glib_major_version > major) ||
        ((glib_major_version == major) && (glib_minor_version > minor)) ||
        ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
      {
        return 0;
       }
     else
      {
        printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
               glib_major_version, glib_minor_version, glib_micro_version);
        printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
	       major, minor, micro);
        printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
        printf("***\n");
        printf("*** If you have already installed a sufficiently new version, this error\n");
        printf("*** probably means that the wrong copy of the glib-config shell script is\n");
        printf("*** being found. The easiest way to fix this is to remove the old version\n");
        printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
        printf("*** correct copy of glib-config. (In this case, you will have to\n");
        printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
        printf("*** so that the correct libraries are found at run-time))\n");
      }
    }
  return 1;
}

EOF
if { (eval echo configure:13090: \"$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*
  no_glib=yes
fi
rm -fr conftest*
fi

       CFLAGS="$ac_save_CFLAGS"
       LIBS="$ac_save_LIBS"
     fi
  fi
  if test "x$no_glib" = x ; then
     echo "$ac_t""yes" 1>&6
     :     
  else
     echo "$ac_t""no" 1>&6
     if test "$GLIB_CONFIG" = "no" ; then
       echo "*** The glib-config script installed by GLIB could not be found"
       echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
       echo "*** your path, or set the GLIB_CONFIG environment variable to the"
       echo "*** full path to glib-config."
     else
       if test -f conf.glibtest ; then
        :
       else
          echo "*** Could not run GLIB test program, checking why..."
          CFLAGS="$CFLAGS $GLIB_CFLAGS"
          LIBS="$LIBS $GLIB_LIBS"
          cat > conftest.$ac_ext <<EOF
#line 13124 "configure"
#include "confdefs.h"

#include <glib.h>
#include <stdio.h>

int main() {
 return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); 
; return 0; }
EOF
if { (eval echo configure:13134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
   echo "*** The test program compiled, but did not run. This usually means"
          echo "*** that the run-time linker is not finding GLIB or finding the wrong"
          echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
          echo "*** is required on your system"
	  echo "***"
          echo "*** If you have an old version installed, it is best to remove it, although"
          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
          echo "***"
          echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
          echo "*** came with the system with the command"
          echo "***"
          echo "***    rpm --erase --nodeps gtk gtk-devel" 
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
   echo "*** The test program failed to compile or link. See the file config.log for the"
          echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
          echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
          echo "*** may want to edit the glib-config script: $GLIB_CONFIG" 
fi
rm -f conftest*
          CFLAGS="$ac_save_CFLAGS"
          LIBS="$ac_save_LIBS"
       fi
     fi
     GLIB_CFLAGS=""
     GLIB_LIBS=""
     :
  fi
  
  
  rm -f conf.glibtest

fi
fi

if test -z "${GLIB_GMODULE_LIBS}" ; then
    GLIB_GMODULE_LIBS=`$GLIB_CONFIG gmodule --libs`
fi










_SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $GLIB_CFLAGS"
cat > conftest.$ac_ext <<EOF
#line 13191 "configure"
#include "confdefs.h"
#include <gmodule.h>
int main() {
 int x = 1; x++; 
; return 0; }
EOF
if { (eval echo configure:13198: \"$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: warning: Cannot build ctl without gmodule support in glib. Removing ctl from MOZ_EXTENSIONS." 1>&2
    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|ctl||'` 
fi
rm -f conftest*
CFLAGS=$_SAVE_CFLAGS

MOZ_LIBART_CFLAGS=
MOZ_LIBART_LIBS=

if test "$MOZ_SVG"; then
  if test "$MOZ_INTERNAL_LIBART_LGPL"; then
            MOZ_LIBART_CFLAGS='-I${DIST}/include/libart_lgpl'
    case "$target_os" in
    msvc*|mksnt*|cygwin*|mingw*)
        MOZ_LIBART_LIBS='$(DIST)/lib/$(LIB_PREFIX)moz_art_lgpl.$(LIB_SUFFIX)' 
        ;;
    *)
        MOZ_LIBART_LIBS='-lmoz_art_lgpl -lm'
        ;;
    esac
  else
    { echo "configure: error: SVG requires a modified version of libart. To pull and build
this LGPL library, set MOZ_INTERNAL_LIBART_LGPL, and then rerun the
checkout stage" 1>&2; exit 1; }
  fi
fi





MOZ_XUL=1
# 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; exit 1; }
  fi
fi

if test "$MOZ_XUL"; then
  cat >> confdefs.h <<\EOF
#define MOZ_XUL 1
EOF

  cat >> confdefs.h <<\EOF
#define INCLUDE_XUL 1
EOF

fi


if test "$MOZ_DEBUG" || test "$NS_TRACE_MALLOC"; then
    MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
fi

if test "$MOZ_LDAP_XPCOM"; then
    LDAP_CFLAGS='-I${DIST}/include/ldap'
    if test "$_WIN32_MSVC"; then
        LDAP_LIBS='$(DIST)/lib/$(LIB_PREFIX)nsldap32v40.${LIB_SUFFIX}'
    else
        LDAP_LIBS='-L${DIST}/bin -L${DIST}/lib -lldap40 -llber40'
    fi
fi

NS_MT_SUPPORTED=1
cat >> confdefs.h <<\EOF
#define NS_MT_SUPPORTED 1
EOF


cat >> confdefs.h <<\EOF
#define USE_IMG2 1
EOF










































































































if test "$MOZ_BYPASS_PROFILE_AT_STARTUP"; then
  cat >> confdefs.h <<\EOF
#define MOZ_BYPASS_PROFILE_AT_STARTUP 1
EOF

fi

CFLAGS=`echo \
	$_WARNINGS_CFLAGS \
	$CFLAGS`

CXXFLAGS=`echo \
	$_MOZ_RTTI_FLAGS \
	$_MOZ_EXCEPTIONS_FLAGS \
	$_WARNINGS_CXXFLAGS \
	$CXXFLAGS`

COMPILE_CFLAGS=`echo \
    $_DEFINES_CFLAGS \
	$_DEPEND_CFLAGS \
    $COMPILE_CFLAGS`

COMPILE_CXXFLAGS=`echo \
    $_DEFINES_CXXFLAGS \
	$_DEPEND_CFLAGS \
    $COMPILE_CXXFLAGS`










































































cat >> confdefs.h <<EOF
#define MOZ_DLL_SUFFIX "$DLL_SUFFIX"
EOF







if test "$USING_HCC"; then
   CC='${topsrcdir}/build/hcc'
   CC="$CC '$_OLDCC'"
   CXX='${topsrcdir}/build/hcpp'
   CXX="$CXX '$_OLDCXX'"
   
   
fi

if test "$no_x" != "yes"; then
if test ! -z "$MISSING_X"; then
   { echo "configure: error:  Could not find the following X libraries: $MISSING_X " 1>&2; exit 1; };
fi

fi # $no_x


if test "$OS_TARGET" = "OS2"; then
  cat >> confdefs.h <<\EOF
#define XP_PC 1
EOF

  cat >> confdefs.h <<\EOF
#define XP_OS2 1
EOF

  cat >> confdefs.h <<\EOF
#define XP_OS2_FIX 1
EOF

  if test "$VACPP" = "yes"; then
      LIBS='so32dll.lib tcp32dll.lib'
  fi
elif test "$OS_TARGET" = "WINNT"; then
  cat >> confdefs.h <<\EOF
#define XP_PC 1
EOF

elif test "$OS_TARGET" = "BeOS"; then
  cat >> confdefs.h <<\EOF
#define XP_BEOS 1
EOF

  MOZ_MOVEMAIL=1
elif test "$OS_TARGET" = "Darwin"; then
  cat >> confdefs.h <<\EOF
#define XP_UNIX 1
EOF

  cat >> confdefs.h <<\EOF
#define UNIX_EMBED 1
EOF

  cat >> confdefs.h <<\EOF
#define UNIX_LDAP 1
EOF

  cat >> confdefs.h <<\EOF
#define UNIX_ASYNC_DNS 1
EOF

elif test "$OS_TARGET" = "POSIX_for_OpenVMS_AXP"; then
  cat >> confdefs.h <<\EOF
#define XP_UNIX 1
EOF

  cat >> confdefs.h <<\EOF
#define UNIX_ASYNC_DNS 1
EOF

else
  cat >> confdefs.h <<\EOF
#define XP_UNIX 1
EOF

  cat >> confdefs.h <<\EOF
#define UNIX_ASYNC_DNS 1
EOF

  MOZ_MOVEMAIL=1
fi


cat >> confdefs.h <<\EOF
#define JS_THREADSAFE 1
EOF

cat >> confdefs.h <<\EOF
#define NS_PRINT_PREVIEW 1
EOF


if test "$MOZ_DEBUG"; then
    cat >> confdefs.h <<\EOF
#define MOZ_REFLOW_PERF 1
EOF

    cat >> confdefs.h <<\EOF
#define MOZ_REFLOW_PERF_DSP 1
EOF

fi

# Used for LD_LIBRARY_PATH of run_viewer target
LIBS_PATH=
for lib_arg in $NSPR_LIBS $TK_LIBS; do
  case $lib_arg in
    -L* ) LIBS_PATH="${LIBS_PATH:+$LIBS_PATH:}"`expr $lib_arg : "-L\(.*\)"` ;;
      * ) ;;
  esac
done



# Save the defines header file before autoconf removes it.
# (Do not add AC_DEFINE calls after this line.)
if test "$_USE_CPP_INCLUDE_FLAG"; then
  _CONFIG_TMP=confdefs-tmp.h
  _CONFIG_DEFS_H=config-defs.h

  cat > $_CONFIG_TMP <<\EOF
/* List of defines generated by configure. Included with preprocessor flag,
 * -include, to avoid long list of -D defines on the compile command-line.
 * Do not edit.
 */
EOF
  sort confdefs.h >> $_CONFIG_TMP

  # Only write config-defs.h when something changes (or it doesn't exist)
  if cmp -s $_CONFIG_TMP $_CONFIG_DEFS_H; then
    rm $_CONFIG_TMP
  else
    echo "$ac_t"""creating $_CONFIG_DEFS_H"" 1>&6
    mv -f $_CONFIG_TMP $_CONFIG_DEFS_H

    if test "$VERBOSE_CONFIG_DEFS"; then
      echo ==== $_CONFIG_DEFS_H =================================
      cat $_CONFIG_DEFS_H
    fi
  fi
fi



. ${srcdir}/allmakefiles.sh
echo $MAKEFILES | $PERL $srcdir/build/autoconf/acoutput-fast.pl > conftest.sh
. ./conftest.sh
rm conftest.sh

echo $MAKEFILES > unallmakefiles

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 -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15

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

# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
if test "x$srcdir" = x.; then
  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
fi

trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15

# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
cat > conftest.defs <<\EOF
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
s%\[%\\&%g
s%\]%\\&%g
s%\$%$$%g
EOF
DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
rm -f conftest.defs


# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}

echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS <<EOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
# $0 $ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.

ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
do
  case "\$ac_option" in
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
    echo "$CONFIG_STATUS generated by autoconf version 2.13"
    exit 0 ;;
  -help | --help | --hel | --he | --h)
    echo "\$ac_cs_usage"; exit 0 ;;
  *) echo "\$ac_cs_usage"; exit 1 ;;
  esac
done

ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"

trap 'rm -fr `echo "$MAKEFILES" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF

# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@sbindir@%$sbindir%g
s%@libexecdir@%$libexecdir%g
s%@datadir@%$datadir%g
s%@sysconfdir@%$sysconfdir%g
s%@sharedstatedir@%$sharedstatedir%g
s%@localstatedir@%$localstatedir%g
s%@libdir@%$libdir%g
s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@host@%$host%g
s%@host_alias@%$host_alias%g
s%@host_cpu@%$host_cpu%g
s%@host_vendor@%$host_vendor%g
s%@host_os@%$host_os%g
s%@target@%$target%g
s%@target_alias@%$target_alias%g
s%@target_cpu@%$target_cpu%g
s%@target_vendor@%$target_vendor%g
s%@target_os@%$target_os%g
s%@build@%$build%g
s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@MOZILLA_VERSION@%$MOZILLA_VERSION%g
s%@HOST_CC@%$HOST_CC%g
s%@HOST_CXX@%$HOST_CXX%g
s%@HOST_RANLIB@%$HOST_RANLIB%g
s%@HOST_AR@%$HOST_AR%g
s%@CC@%$CC%g
s%@CXX@%$CXX%g
s%@RANLIB@%$RANLIB%g
s%@AR@%$AR%g
s%@AS@%$AS%g
s%@LD@%$LD%g
s%@STRIP@%$STRIP%g
s%@DLLTOOL@%$DLLTOOL%g
s%@WINDRES@%$WINDRES%g
s%@GNU_AS@%$GNU_AS%g
s%@GNU_LD@%$GNU_LD%g
s%@GNU_CC@%$GNU_CC%g
s%@GNU_CXX@%$GNU_CXX%g
s%@CPP@%$CPP%g
s%@CXXCPP@%$CXXCPP%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@LN_S@%$LN_S%g
s%@AWK@%$AWK%g
s%@EMACS@%$EMACS%g
s%@PERL@%$PERL%g
s%@WHOAMI@%$WHOAMI%g
s%@AUTOCONF@%$AUTOCONF%g
s%@UNZIP@%$UNZIP%g
s%@ZIP@%$ZIP%g
s%@SYSTEM_MAKEDEPEND@%$SYSTEM_MAKEDEPEND%g
s%@XARGS@%$XARGS%g
s%@DOXYGEN@%$DOXYGEN%g
s%@MAKE@%$MAKE%g
s%@SET_MAKE@%$SET_MAKE%g
s%@X_CFLAGS@%$X_CFLAGS%g
s%@X_PRE_LIBS@%$X_PRE_LIBS%g
s%@X_LIBS@%$X_LIBS%g
s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
s%@NO_LD_ARCHIVE_FLAGS@%$NO_LD_ARCHIVE_FLAGS%g
s%@HAVE_64BIT_OS@%$HAVE_64BIT_OS%g
s%@XCFLAGS@%$XCFLAGS%g
s%@XLDFLAGS@%$XLDFLAGS%g
s%@XLIBS@%$XLIBS%g
s%@LIBOBJS@%$LIBOBJS%g
s%@HAVE_GCC3_ABI@%$HAVE_GCC3_ABI%g
s%@NSPR_CONFIG@%$NSPR_CONFIG%g
s%@NSPR_CFLAGS@%$NSPR_CFLAGS%g
s%@NSPR_LIBS@%$NSPR_LIBS%g
s%@GTK_CONFIG@%$GTK_CONFIG%g
s%@GTK_CFLAGS@%$GTK_CFLAGS%g
s%@GTK_LIBS@%$GTK_LIBS%g
s%@PKG_CONFIG@%$PKG_CONFIG%g
s%@MOZ_GTK2_CFLAGS@%$MOZ_GTK2_CFLAGS%g
s%@MOZ_GTK2_LIBS@%$MOZ_GTK2_LIBS%g
s%@HOST_MOC@%$HOST_MOC%g
s%@MOZ_DEFAULT_TOOLKIT@%$MOZ_DEFAULT_TOOLKIT%g
s%@TK_CFLAGS@%$TK_CFLAGS%g
s%@TK_LIBS@%$TK_LIBS%g
s%@MOZ_ENABLE_GTK@%$MOZ_ENABLE_GTK%g
s%@MOZ_ENABLE_XLIB@%$MOZ_ENABLE_XLIB%g
s%@MOZ_ENABLE_GTK2@%$MOZ_ENABLE_GTK2%g
s%@MOZ_ENABLE_QT@%$MOZ_ENABLE_QT%g
s%@MOZ_ENABLE_PHOTON@%$MOZ_ENABLE_PHOTON%g
s%@MOZ_ENABLE_COCOA@%$MOZ_ENABLE_COCOA%g
s%@MOZ_ENABLE_XREMOTE@%$MOZ_ENABLE_XREMOTE%g
s%@MOZ_GTK_CFLAGS@%$MOZ_GTK_CFLAGS%g
s%@MOZ_GTK_LDFLAGS@%$MOZ_GTK_LDFLAGS%g
s%@MOZ_XLIB_CFLAGS@%$MOZ_XLIB_CFLAGS%g
s%@MOZ_XLIB_LDFLAGS@%$MOZ_XLIB_LDFLAGS%g
s%@MOZ_QT_CFLAGS@%$MOZ_QT_CFLAGS%g
s%@MOZ_QT_LDFLAGS@%$MOZ_QT_LDFLAGS%g
s%@MOC@%$MOC%g
s%@MOZ_CALENDAR@%$MOZ_CALENDAR%g
s%@MOZ_MAIL_NEWS@%$MOZ_MAIL_NEWS%g
s%@FT2_CONFIG@%$FT2_CONFIG%g
s%@FT2_CFLAGS@%$FT2_CFLAGS%g
s%@FT2_LIBS@%$FT2_LIBS%g
s%@MOZ_XFT_SYSTEM_FREETYPE2@%$MOZ_XFT_SYSTEM_FREETYPE2%g
s%@MOZ_ENABLE_FREETYPE2@%$MOZ_ENABLE_FREETYPE2%g
s%@MOZ_ENABLE_XFT@%$MOZ_ENABLE_XFT%g
s%@MOZ_XFT_CFLAGS@%$MOZ_XFT_CFLAGS%g
s%@MOZ_XFT_LIBS@%$MOZ_XFT_LIBS%g
s%@MOZ_PLAINTEXT_EDITOR_ONLY@%$MOZ_PLAINTEXT_EDITOR_ONLY%g
s%@JS_ULTRASPARC_OPTS@%$JS_ULTRASPARC_OPTS%g
s%@MOZ_OPTIMIZE@%$MOZ_OPTIMIZE%g
s%@MOZ_OPTIMIZE_FLAGS@%$MOZ_OPTIMIZE_FLAGS%g
s%@MOZ_OPTIMIZE_LDFLAGS@%$MOZ_OPTIMIZE_LDFLAGS%g
s%@DETECT_WEBSHELL_LEAKS@%$DETECT_WEBSHELL_LEAKS%g
s%@MOZ_REFLOW_PERF@%$MOZ_REFLOW_PERF%g
s%@NS_TRACE_MALLOC@%$NS_TRACE_MALLOC%g
s%@MOZ_DEMANGLE_SYMBOLS@%$MOZ_DEMANGLE_SYMBOLS%g
s%@MOZ_AUTO_DEPS@%$MOZ_AUTO_DEPS%g
s%@COMPILER_DEPEND@%$COMPILER_DEPEND%g
s%@MDDEPDIR@%$MDDEPDIR%g
s%@AIX_SHLIB_BIN@%$AIX_SHLIB_BIN%g
s%@GLIB_CONFIG@%$GLIB_CONFIG%g
s%@GLIB_CFLAGS@%$GLIB_CFLAGS%g
s%@GLIB_LIBS@%$GLIB_LIBS%g
s%@LIBIDL_CONFIG@%$LIBIDL_CONFIG%g
s%@LIBIDL_CFLAGS@%$LIBIDL_CFLAGS%g
s%@LIBIDL_LIBS@%$LIBIDL_LIBS%g
s%@ORBIT_CONFIG@%$ORBIT_CONFIG%g
s%@GLIB_GMODULE_LIBS@%$GLIB_GMODULE_LIBS%g
s%@HOST_LIBIDL_CONFIG@%$HOST_LIBIDL_CONFIG%g
s%@HOST_LIBIDL_CFLAGS@%$HOST_LIBIDL_CFLAGS%g
s%@HOST_LIBIDL_LIBS@%$HOST_LIBIDL_LIBS%g
s%@MOZ_LIBART_CFLAGS@%$MOZ_LIBART_CFLAGS%g
s%@MOZ_LIBART_LIBS@%$MOZ_LIBART_LIBS%g
s%@MOZ_INTERNAL_LIBART_LGPL@%$MOZ_INTERNAL_LIBART_LGPL%g
s%@MOZ_XUL@%$MOZ_XUL%g
s%@AR_FLAGS@%$AR_FLAGS%g
s%@AR_LIST@%$AR_LIST%g
s%@AR_EXTRACT@%$AR_EXTRACT%g
s%@AR_DELETE@%$AR_DELETE%g
s%@ASFLAGS@%$ASFLAGS%g
s%@AS_DASH_C_FLAG@%$AS_DASH_C_FLAG%g
s%@RC@%$RC%g
s%@USE_SHORT_LIBNAME@%$USE_SHORT_LIBNAME%g
s%@IMPLIB@%$IMPLIB%g
s%@FILTER@%$FILTER%g
s%@BIN_FLAGS@%$BIN_FLAGS%g
s%@NS_USE_NATIVE@%$NS_USE_NATIVE%g
s%@MOZ_WIDGET_TOOLKIT@%$MOZ_WIDGET_TOOLKIT%g
s%@MOZ_WIDGET_TOOLKIT_LDFLAGS@%$MOZ_WIDGET_TOOLKIT_LDFLAGS%g
s%@WIDGET_DLL@%$WIDGET_DLL%g
s%@GFXWIN_DLL@%$GFXWIN_DLL%g
s%@MOZ_GFX_TOOLKIT@%$MOZ_GFX_TOOLKIT%g
s%@MOZ_GFX_TOOLKIT_LDFLAGS@%$MOZ_GFX_TOOLKIT_LDFLAGS%g
s%@MOZ_UPDATE_XTERM@%$MOZ_UPDATE_XTERM%g
s%@MOZ_MATHML@%$MOZ_MATHML%g
s%@MOZ_SVG@%$MOZ_SVG%g
s%@TX_EXE@%$TX_EXE%g
s%@MOZ_JS_LIBS@%$MOZ_JS_LIBS%g
s%@MOZ_PSM@%$MOZ_PSM%g
s%@BUILD_MODULES@%$BUILD_MODULES%g
s%@MOZ_DEBUG@%$MOZ_DEBUG%g
s%@MOZ_DEBUG_MODULES@%$MOZ_DEBUG_MODULES%g
s%@MOZ_PROFILE_MODULES@%$MOZ_PROFILE_MODULES%g
s%@MOZ_DEBUG_ENABLE_DEFS@%$MOZ_DEBUG_ENABLE_DEFS%g
s%@MOZ_DEBUG_DISABLE_DEFS@%$MOZ_DEBUG_DISABLE_DEFS%g
s%@MOZ_DEBUG_FLAGS@%$MOZ_DEBUG_FLAGS%g
s%@MOZ_DEBUG_LDFLAGS@%$MOZ_DEBUG_LDFLAGS%g
s%@MOZ_DBGRINFO_MODULES@%$MOZ_DBGRINFO_MODULES%g
s%@MOZ_EXTENSIONS@%$MOZ_EXTENSIONS%g
s%@MOZ_JSDEBUGGER@%$MOZ_JSDEBUGGER%g
s%@ENABLE_EAZEL_PROFILER@%$ENABLE_EAZEL_PROFILER%g
s%@EAZEL_PROFILER_CFLAGS@%$EAZEL_PROFILER_CFLAGS%g
s%@EAZEL_PROFILER_LIBS@%$EAZEL_PROFILER_LIBS%g
s%@MOZ_PERF_METRICS@%$MOZ_PERF_METRICS%g
s%@GC_LEAK_DETECTOR@%$GC_LEAK_DETECTOR%g
s%@MOZ_LOG_REFCNT@%$MOZ_LOG_REFCNT%g
s%@MOZ_LEAKY@%$MOZ_LEAKY%g
s%@MOZ_JPROF@%$MOZ_JPROF%g
s%@MOZ_XPCTOOLS@%$MOZ_XPCTOOLS%g
s%@MOZ_INSURE@%$MOZ_INSURE%g
s%@MOZ_INSURE_DIRS@%$MOZ_INSURE_DIRS%g
s%@MOZ_INSURE_EXCLUDE_DIRS@%$MOZ_INSURE_EXCLUDE_DIRS%g
s%@MOZ_INSURIFYING@%$MOZ_INSURIFYING%g
s%@MOZ_LDAP_XPCOM@%$MOZ_LDAP_XPCOM%g
s%@MOZ_LDAP_XPCOM_EXPERIMENTAL@%$MOZ_LDAP_XPCOM_EXPERIMENTAL%g
s%@LDAP_CFLAGS@%$LDAP_CFLAGS%g
s%@LDAP_LIBS@%$LDAP_LIBS%g
s%@HAVE_XIE@%$HAVE_XIE%g
s%@MOZ_XIE_LIBS@%$MOZ_XIE_LIBS%g
s%@MOZ_XPRINT_CFLAGS@%$MOZ_XPRINT_CFLAGS%g
s%@MOZ_XPRINT_LDFLAGS@%$MOZ_XPRINT_LDFLAGS%g
s%@MOZ_ENABLE_XPRINT@%$MOZ_ENABLE_XPRINT%g
s%@MOZ_ENABLE_POSTSCRIPT@%$MOZ_ENABLE_POSTSCRIPT%g
s%@MOZ_XINERAMA_LIBS@%$MOZ_XINERAMA_LIBS%g
s%@MOZ_ENABLE_XINERAMA@%$MOZ_ENABLE_XINERAMA%g
s%@XPCOM_USE_LEA@%$XPCOM_USE_LEA%g
s%@BUILD_SHARED_LIBS@%$BUILD_SHARED_LIBS%g
s%@BUILD_STATIC_LIBS@%$BUILD_STATIC_LIBS%g
s%@MOZ_STATIC_COMPONENT_LIBS@%$MOZ_STATIC_COMPONENT_LIBS%g
s%@MOZ_STATIC_COMPONENTS@%$MOZ_STATIC_COMPONENTS%g
s%@MOZ_META_COMPONENTS@%$MOZ_META_COMPONENTS%g
s%@ENABLE_TESTS@%$ENABLE_TESTS%g
s%@IBMBIDI@%$IBMBIDI%g
s%@SUNCTL@%$SUNCTL%g
s%@ACCESSIBILITY@%$ACCESSIBILITY%g
s%@MOZ_USER_DIR@%$MOZ_USER_DIR%g
s%@ENABLE_STRIP@%$ENABLE_STRIP%g
s%@USE_ELF_DYNSTR_GC@%$USE_ELF_DYNSTR_GC%g
s%@MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS@%$MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS%g
s%@MOZ_COMPONENT_NSPR_LIBS@%$MOZ_COMPONENT_NSPR_LIBS%g
s%@MOZ_COMPONENT_XPCOM_LIBS@%$MOZ_COMPONENT_XPCOM_LIBS%g
s%@XPCOM_LIBS@%$XPCOM_LIBS%g
s%@MOZ_GLE@%$MOZ_GLE%g
s%@MOZ_BUILD_ROOT@%$MOZ_BUILD_ROOT%g
s%@MOZ_OS2_TOOLS@%$MOZ_OS2_TOOLS%g
s%@MOZ_OS2_EMX_OBJECTFORMAT@%$MOZ_OS2_EMX_OBJECTFORMAT%g
s%@MOZ_POST_DSO_LIB_COMMAND@%$MOZ_POST_DSO_LIB_COMMAND%g
s%@MOZ_POST_PROGRAM_COMMAND@%$MOZ_POST_PROGRAM_COMMAND%g
s%@MOZ_REORDER@%$MOZ_REORDER%g
s%@MOZ_TIMELINE@%$MOZ_TIMELINE%g
s%@MOZ_PROFILE@%$MOZ_PROFILE%g
s%@MOZ_COVERAGE@%$MOZ_COVERAGE%g
s%@MOZ_MAPINFO@%$MOZ_MAPINFO%g
s%@MOZ_BROWSE_INFO@%$MOZ_BROWSE_INFO%g
s%@MOZ_TOOLS_DIR@%$MOZ_TOOLS_DIR%g
s%@SYSTEM_JPEG@%$SYSTEM_JPEG%g
s%@SYSTEM_PNG@%$SYSTEM_PNG%g
s%@SYSTEM_MNG@%$SYSTEM_MNG%g
s%@SYSTEM_ZLIB@%$SYSTEM_ZLIB%g
s%@JPEG_CFLAGS@%$JPEG_CFLAGS%g
s%@JPEG_LIBS@%$JPEG_LIBS%g
s%@ZLIB_CFLAGS@%$ZLIB_CFLAGS%g
s%@ZLIB_LIBS@%$ZLIB_LIBS%g
s%@PNG_CFLAGS@%$PNG_CFLAGS%g
s%@PNG_LIBS@%$PNG_LIBS%g
s%@MNG_CFLAGS@%$MNG_CFLAGS%g
s%@MNG_LIBS@%$MNG_LIBS%g
s%@MOZ_JPEG_CFLAGS@%$MOZ_JPEG_CFLAGS%g
s%@MOZ_JPEG_LIBS@%$MOZ_JPEG_LIBS%g
s%@MOZ_ZLIB_CFLAGS@%$MOZ_ZLIB_CFLAGS%g
s%@MOZ_ZLIB_LIBS@%$MOZ_ZLIB_LIBS%g
s%@MOZ_PNG_CFLAGS@%$MOZ_PNG_CFLAGS%g
s%@MOZ_PNG_LIBS@%$MOZ_PNG_LIBS%g
s%@MOZ_MNG_CFLAGS@%$MOZ_MNG_CFLAGS%g
s%@MOZ_MNG_LIBS@%$MOZ_MNG_LIBS%g
s%@MOZ_NATIVE_NSPR@%$MOZ_NATIVE_NSPR%g
s%@COMPILE_CFLAGS@%$COMPILE_CFLAGS%g
s%@COMPILE_CXXFLAGS@%$COMPILE_CXXFLAGS%g
s%@CROSS_COMPILE@%$CROSS_COMPILE%g
s%@HOST_CFLAGS@%$HOST_CFLAGS%g
s%@HOST_CXXFLAGS@%$HOST_CXXFLAGS%g
s%@HOST_NSPR_MDCPUCFG@%$HOST_NSPR_MDCPUCFG%g
s%@TARGET_CPU@%$TARGET_CPU%g
s%@TARGET_VENDOR@%$TARGET_VENDOR%g
s%@TARGET_OS@%$TARGET_OS%g
s%@TARGET_NSPR_MDCPUCFG@%$TARGET_NSPR_MDCPUCFG%g
s%@TARGET_MD_ARCH@%$TARGET_MD_ARCH%g
s%@OS_TARGET@%$OS_TARGET%g
s%@OS_ARCH@%$OS_ARCH%g
s%@OS_RELEASE@%$OS_RELEASE%g
s%@OS_TEST@%$OS_TEST%g
s%@MOZ_DISABLE_DTD_DEBUG@%$MOZ_DISABLE_DTD_DEBUG%g
s%@MOZ_DISABLE_JAR_PACKAGING@%$MOZ_DISABLE_JAR_PACKAGING%g
s%@MOZ_CHROME_FILE_FORMAT@%$MOZ_CHROME_FILE_FORMAT%g
s%@WRAP_MALLOC_CFLAGS@%$WRAP_MALLOC_CFLAGS%g
s%@WRAP_MALLOC_LIB@%$WRAP_MALLOC_LIB%g
s%@MKSHLIB@%$MKSHLIB%g
s%@MKCSHLIB@%$MKCSHLIB%g
s%@MKSHLIB_FORCE_ALL@%$MKSHLIB_FORCE_ALL%g
s%@MKSHLIB_UNFORCE_ALL@%$MKSHLIB_UNFORCE_ALL%g
s%@DSO_CFLAGS@%$DSO_CFLAGS%g
s%@DSO_PIC_CFLAGS@%$DSO_PIC_CFLAGS%g
s%@DSO_LDOPTS@%$DSO_LDOPTS%g
s%@LIB_PREFIX@%$LIB_PREFIX%g
s%@DLL_SUFFIX@%$DLL_SUFFIX%g
s%@LIB_SUFFIX@%$LIB_SUFFIX%g
s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g
s%@BIN_SUFFIX@%$BIN_SUFFIX%g
s%@ASM_SUFFIX@%$ASM_SUFFIX%g
s%@USE_N32@%$USE_N32%g
s%@MOZ_MOVEMAIL@%$MOZ_MOVEMAIL%g
s%@LIBS_PATH@%$LIBS_PATH%g
s%@MOZ_DEFINES@%$MOZ_DEFINES%g

CEOF
EOF

cat >> $CONFIG_STATUS <<\EOF

# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
  if test $ac_beg -gt 1; then
    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  else
    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  fi
  if test ! -s conftest.s$ac_file; then
    ac_more_lines=false
    rm -f conftest.s$ac_file
  else
    if test -z "$ac_sed_cmds"; then
      ac_sed_cmds="sed -f conftest.s$ac_file"
    else
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
    fi
    ac_file=`expr $ac_file + 1`
    ac_beg=$ac_end
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
  fi
done
if test -z "$ac_sed_cmds"; then
  ac_sed_cmds=cat
fi
EOF

cat >> $CONFIG_STATUS <<EOF

CONFIG_FILES=\${CONFIG_FILES-"$MAKEFILES"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.

  # Remove last slash and all that follows it.  Not all systems have dirname.
  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    # The file is in a subdirectory.
    test ! -d "$ac_dir" && mkdir "$ac_dir"
    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
    # A "../" for each directory in $ac_dir_suffix.
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  else
    ac_dir_suffix= ac_dots=
  fi

  case "$ac_given_srcdir" in
  .)  srcdir=.
      if test -z "$ac_dots"; then top_srcdir=.
      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  *) # Relative path.
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
  esac

  case "$ac_given_INSTALL" in
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  esac

  echo creating "$ac_file"
  rm -f "$ac_file"
  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  case "$ac_file" in
  *Makefile*) ac_comsub="1i\\
# $configure_input" ;;
  *) ac_comsub= ;;
  esac

  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
s%@INSTALL@%$INSTALL%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*

EOF
cat >> $CONFIG_STATUS <<EOF

EOF
cat >> $CONFIG_STATUS <<\EOF

exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1


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_LDFLAGS="$_SUBDIR_HOST_LDFLAGS"
WINDRES=
DLLTOOL=

unset MAKEFILES
unset CONFIG_FILES

if test -z "$MOZ_NATIVE_NSPR" || test "$MOZ_LDAP_XPCOM"; then
    ac_configure_args="$_SUBDIR_CONFIG_ARGS --with-dist-prefix=$MOZ_BUILD_ROOT/dist --with-mozilla"
    if test "$_WIN32_MSVC" && test "$NS_TRACE_MALLOC"; then
       ac_configure_args="$ac_configure_args --enable-debug --disable-optimize"
    fi
    if test -n "$HAVE_64BIT_OS"; then
        ac_configure_args="$ac_configure_args --enable-64bit"
    fi
    
if test "$no_recursion" != yes; then

  # Remove --cache-file and --srcdir arguments so they do not pile up.
  ac_sub_configure_args=
  ac_prev=
  for ac_arg in $ac_configure_args; do
    if test -n "$ac_prev"; then
      ac_prev=
      continue
    fi
    case "$ac_arg" in
    -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=*)
      ;;
    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
      ac_prev=srcdir ;;
    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
      ;;
    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
    esac
  done

  for ac_config_dir in nsprpub; do

    # Do not complain, so a configure script can configure whichever
    # parts of a large source tree are present.
    if test ! -d $srcdir/$ac_config_dir; then
      continue
    fi

    echo configuring in $ac_config_dir

    case "$srcdir" in
    .) ;;
    *)
      if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
      else
        { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
      fi
      ;;
    esac

    ac_popdir=`pwd`
    cd $ac_config_dir

      # A "../" for each directory in /$ac_config_dir.
      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`

    case "$srcdir" in
    .) # No --srcdir option.  We are building in place.
      ac_sub_srcdir=$srcdir ;;
    /*) # Absolute path.
      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
    *) # Relative path.
      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
    esac

    # Check for guested configure; otherwise get Cygnus style configure.
    if test -f $ac_sub_srcdir/configure; then
      ac_sub_configure=$ac_sub_srcdir/configure
    elif test -f $ac_sub_srcdir/configure.in; then
      ac_sub_configure=$ac_configure
    else
      echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
      ac_sub_configure=
    fi

    # The recursion is here.
    if test -n "$ac_sub_configure"; then

      # Make the cache file name correct relative to the subdirectory.
      case "$cache_file" in
      /*) ac_sub_cache_file=$cache_file ;;
      *) # Relative path.
        ac_sub_cache_file="$ac_dots$cache_file" ;;
      esac
  case "$ac_given_INSTALL" in
        [/$]*) INSTALL="$ac_given_INSTALL" ;;
        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
        esac

      echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
      # The eval makes quoting arguments work.
      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
      then :
      else
        { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
      fi
    fi

    cd $ac_popdir
  done
fi

    ac_configure_args="$_SUBDIR_CONFIG_ARGS"
fi

if test -z "$MOZ_NATIVE_NSPR"; then
    # Hack to deal with the fact that we use NSPR_CFLAGS everywhere
    echo "configure: warning: Recreating autoconf.mk with updated nspr-config output" 1>&2
    if test ! "$VACPP" && test -z "$_WIN32_MSVC"; then
        NSPR_LIBS=`./nsprpub/config/nspr-config --prefix=$MOZ_BUILD_ROOT/dist --exec-prefix=$MOZ_BUILD_ROOT/dist --libs`
        $PERL -pi.bak -e "s {^NSPR_LIBS\s*=.*} {NSPR_LIBS = $NSPR_LIBS }" config/autoconf.mk
    fi
    if test -z "$_WIN32_MSVC"; then
        NSPR_CFLAGS=`./nsprpub/config/nspr-config --prefix=$MOZ_BUILD_ROOT/dist --exec-prefix=$MOZ_BUILD_ROOT/dist --cflags`
        $PERL -pi.bak -e "s {^NSPR_CFLAGS\s*=.*} {NSPR_CFLAGS = $NSPR_CFLAGS }" config/autoconf.mk
    fi
    rm -f config/autoconf.mk.bak
fi

# Hack to make sure that mozilla-config has the proper nspr dependencies
if test -z "$MOZ_NATIVE_NSPR"; then
    FULL_NSPR_CFLAGS=`./nsprpub/config/nspr-config --cflags`
    FULL_NSPR_LIBS=`./nsprpub/config/nspr-config --libs`
else
    FULL_NSPR_CFLAGS=`${NSPR_CONFIG} --cflags`
    FULL_NSPR_LIBS=`${NSPR_CONFIG} --libs`
fi
mv build/unix/mozilla-config build/unix/mozilla-config.bak
cat build/unix/mozilla-config.bak | sed -e "s|@FULL_NSPR_LIBS@|${FULL_NSPR_LIBS}|" -e "s|@FULL_NSPR_CFLAGS@|${FULL_NSPR_CFLAGS}|" > build/unix/mozilla-config
rm -f build/unix/mozilla-config.bak


# if we're building the LDAP XPCOM component, we need to build 
# the c-sdk first.  
#
if test "$MOZ_LDAP_XPCOM"; then

  # these subdirs may not yet have been created in the build tree.
  # don't use the "-p" switch to mkdir, since not all platforms have it
  #
  if test ! -d "directory"; then
    mkdir "directory"
  fi
  if test ! -d "directory/c-sdk"; then
    mkdir "directory/c-sdk"    
  fi
  if test ! -d "directory/c-sdk/ldap"; then
    mkdir "directory/c-sdk/ldap"    
  fi

  ac_configure_args="$_SUBDIR_CONFIG_ARGS --prefix=$MOZ_BUILD_ROOT/dist"
    if test -n "$HAVE_64BIT_OS"; then
        ac_configure_args="$ac_configure_args --enable-64bit"
    fi
  
if test "$no_recursion" != yes; then

  # Remove --cache-file and --srcdir arguments so they do not pile up.
  ac_sub_configure_args=
  ac_prev=
  for ac_arg in $ac_configure_args; do
    if test -n "$ac_prev"; then
      ac_prev=
      continue
    fi
    case "$ac_arg" in
    -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=*)
      ;;
    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
      ac_prev=srcdir ;;
    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
      ;;
    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
    esac
  done

  for ac_config_dir in directory/c-sdk/ldap; do

    # Do not complain, so a configure script can configure whichever
    # parts of a large source tree are present.
    if test ! -d $srcdir/$ac_config_dir; then
      continue
    fi

    echo configuring in $ac_config_dir

    case "$srcdir" in
    .) ;;
    *)
      if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
      else
        { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
      fi
      ;;
    esac

    ac_popdir=`pwd`
    cd $ac_config_dir

      # A "../" for each directory in /$ac_config_dir.
      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`

    case "$srcdir" in
    .) # No --srcdir option.  We are building in place.
      ac_sub_srcdir=$srcdir ;;
    /*) # Absolute path.
      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
    *) # Relative path.
      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
    esac

    # Check for guested configure; otherwise get Cygnus style configure.
    if test -f $ac_sub_srcdir/configure; then
      ac_sub_configure=$ac_sub_srcdir/configure
    elif test -f $ac_sub_srcdir/configure.in; then
      ac_sub_configure=$ac_configure
    else
      echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
      ac_sub_configure=
    fi

    # The recursion is here.
    if test -n "$ac_sub_configure"; then

      # Make the cache file name correct relative to the subdirectory.
      case "$cache_file" in
      /*) ac_sub_cache_file=$cache_file ;;
      *) # Relative path.
        ac_sub_cache_file="$ac_dots$cache_file" ;;
      esac
  case "$ac_given_INSTALL" in
        [/$]*) INSTALL="$ac_given_INSTALL" ;;
        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
        esac

      echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
      # The eval makes quoting arguments work.
      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
      then :
      else
        { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
      fi
    fi

    cd $ac_popdir
  done
fi

    ac_configure_args="$_SUBDIR_CONFIG_ARGS"
fi

# if we're building Xft, we need our private copy of freetype
if test "$MOZ_ENABLE_XFT"; then
    ac_configure_args="$_SUBDIR_CONFIG_ARGS --prefix=$MOZ_BUILD_ROOT/dist"
    if test -z "$MOZ_XFT_SYSTEM_FREETYPE2"; then
        
if test "$no_recursion" != yes; then

  # Remove --cache-file and --srcdir arguments so they do not pile up.
  ac_sub_configure_args=
  ac_prev=
  for ac_arg in $ac_configure_args; do
    if test -n "$ac_prev"; then
      ac_prev=
      continue
    fi
    case "$ac_arg" in
    -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=*)
      ;;
    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
      ac_prev=srcdir ;;
    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
      ;;
    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
    esac
  done

  for ac_config_dir in other-licenses/freetype; do

    # Do not complain, so a configure script can configure whichever
    # parts of a large source tree are present.
    if test ! -d $srcdir/$ac_config_dir; then
      continue
    fi

    echo configuring in $ac_config_dir

    case "$srcdir" in
    .) ;;
    *)
      if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
      else
        { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
      fi
      ;;
    esac

    ac_popdir=`pwd`
    cd $ac_config_dir

      # A "../" for each directory in /$ac_config_dir.
      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`

    case "$srcdir" in
    .) # No --srcdir option.  We are building in place.
      ac_sub_srcdir=$srcdir ;;
    /*) # Absolute path.
      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
    *) # Relative path.
      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
    esac

    # Check for guested configure; otherwise get Cygnus style configure.
    if test -f $ac_sub_srcdir/configure; then
      ac_sub_configure=$ac_sub_srcdir/configure
    elif test -f $ac_sub_srcdir/configure.in; then
      ac_sub_configure=$ac_configure
    else
      echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
      ac_sub_configure=
    fi

    # The recursion is here.
    if test -n "$ac_sub_configure"; then

      # Make the cache file name correct relative to the subdirectory.
      case "$cache_file" in
      /*) ac_sub_cache_file=$cache_file ;;
      *) # Relative path.
        ac_sub_cache_file="$ac_dots$cache_file" ;;
      esac
  case "$ac_given_INSTALL" in
        [/$]*) INSTALL="$ac_given_INSTALL" ;;
        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
        esac

      echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
      # The eval makes quoting arguments work.
      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
      then :
      else
        { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
      fi
    fi

    cd $ac_popdir
  done
fi

    fi
    ac_configure_args="$ac_configure_args --includedir=$MOZ_BUILD_ROOT/dist/include/expat-1.95"
    
if test "$no_recursion" != yes; then

  # Remove --cache-file and --srcdir arguments so they do not pile up.
  ac_sub_configure_args=
  ac_prev=
  for ac_arg in $ac_configure_args; do
    if test -n "$ac_prev"; then
      ac_prev=
      continue
    fi
    case "$ac_arg" in
    -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=*)
      ;;
    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
      ac_prev=srcdir ;;
    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
      ;;
    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
    esac
  done

  for ac_config_dir in other-licenses/expat; do

    # Do not complain, so a configure script can configure whichever
    # parts of a large source tree are present.
    if test ! -d $srcdir/$ac_config_dir; then
      continue
    fi

    echo configuring in $ac_config_dir

    case "$srcdir" in
    .) ;;
    *)
      if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
      else
        { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
      fi
      ;;
    esac

    ac_popdir=`pwd`
    cd $ac_config_dir

      # A "../" for each directory in /$ac_config_dir.
      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`

    case "$srcdir" in
    .) # No --srcdir option.  We are building in place.
      ac_sub_srcdir=$srcdir ;;
    /*) # Absolute path.
      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
    *) # Relative path.
      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
    esac

    # Check for guested configure; otherwise get Cygnus style configure.
    if test -f $ac_sub_srcdir/configure; then
      ac_sub_configure=$ac_sub_srcdir/configure
    elif test -f $ac_sub_srcdir/configure.in; then
      ac_sub_configure=$ac_configure
    else
      echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
      ac_sub_configure=
    fi

    # The recursion is here.
    if test -n "$ac_sub_configure"; then

      # Make the cache file name correct relative to the subdirectory.
      case "$cache_file" in
      /*) ac_sub_cache_file=$cache_file ;;
      *) # Relative path.
        ac_sub_cache_file="$ac_dots$cache_file" ;;
      esac
  case "$ac_given_INSTALL" in
        [/$]*) INSTALL="$ac_given_INSTALL" ;;
        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
        esac

      echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
      # The eval makes quoting arguments work.
      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
      then :
      else
        { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
      fi
    fi

    cd $ac_popdir
  done
fi

    ac_configure_args="$_SUBDIR_CONFIG_ARGS"
fi
