Initial attempt at a working VS2023/v2.0 build
diff --git a/.gitignore b/.gitignore
index 3f2e2db..6870869 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,8 +8,6 @@
 bits/ftp*
 bits/*.iso
 bits/*.7z
-
-
-bits/*.patch
 bits/a2session.txt
 /.project
+*~
diff --git a/README.md b/README.md
index b67e102..b737529 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,204 @@
-# Why Glazier?
+# Glazier
+
+Glazier is a set of batch files, scripts and toolchains designed to
+ease building CouchDB on Windows. It's as fully automated as
+possible, with most of the effort required only once.
+
+Glazier uses the MS Visual Studio 2013 toolchain as much as possible,
+to ensure a quality Windows experience and to execute all binary
+dependencies within the same runtime.
+
+We hope Glazier simplifies using Erlang and CouchDB for you, giving
+a consistent, repeatable build environment.
+
+
+# Base Requirements
+
+- 64-bit Windows 7 or 8.1. *As of CouchDB 2.0 we only support a 64-bit build of CouchDB*.
+  - We like 64-bit Windows 7 or 8.1 Enterprise N (missing Media Player, etc.) from MSDN.
+- [Microsoft .NET Framework 4](http://www.microsoft.com/en-us/download/details.aspx?id=17851)
+- If prompted, reboot after installing the .NET framework.
+- [Visual Studio 2013 x64 Community Edition](https://www.visualstudio.com/en-us/news/vs2013-community-vs.aspx)
+- [Chocolatey](https://chocolatey.org). From an *administrative* __cmd.exe__ command prompt:
+
+```
+@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
+```
+
+- Apply Windows Updates and reboot until no more updates appear.
+- If using a VM, shutdown and snapshot your VM at this point.
+
+# Install Pre-requisites
+
+## Clean Package Installs with Chocolatey, cyg-get and pip
+
+These packages install silently, without intervention. Cut and paste them
+into a command prompt, leave it running, and open another one for the next
+section.
+
+    cinst -y git 7zip.commandline MozillaBuild nasm cyg-get wixtoolset python aria2
+    cyg-get p7zip autoconf binutils bison gcc-code gcc-g++ gdb git libtool make patchutils pkg-config readline file renameutils socat time tree util-linux wget
+    c:\tools\python\scripts\pip install sphinx docutils pygments
+
+*Note: Do NOT install curl or help2man inside CygWin!*
+
+
+## Make a new prompt shortcut
+
+Make a new shortcut on the desktop. The location should be:
+
+    cmd.exe /E:ON /V:ON /T:1F /K ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"" amd64 && color 1f
+
+Name it something like "Couch SDK Prompt." 
+Right-click on the icon, click the `advanced`
+button, and tick the `Run as Administrator` button.
+
+I suggest you pin it to the Start menu. We'll use this all the time.
+
+Let's confirm we have the right bits with
+`where cl mc mt link lc rc nmake`:
+
+    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\cl.exe
+    C:\Program Files (x86)\Windows Kits\8.1\bin\x64\mc.exe
+    C:\Program Files (x86)\Windows Kits\8.1\bin\x86\mc.exe
+    C:\Program Files (x86)\Windows Kits\8.1\bin\x64\mt.exe
+    C:\Program Files (x86)\Windows Kits\8.1\bin\x86\mt.exe
+    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\link.exe
+    C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\lc.exe
+    C:\Program Files (x86)\Windows Kits\8.1\bin\x64\rc.exe
+    C:\Program Files (x86)\Windows Kits\8.1\bin\x86\rc.exe
+    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\nmake.exe
+
+Stop here if your results are not *identical*. If you are unable to
+reproduce these results, please open an issue on this repository for
+assistance.
+
+## Set up required convenience links & environment variable
+
+    pushd c:\relax
+    rd /s/q SDK VC nasm inno5 nsis strawberry
+	mklink /j c:\relax\SDK "c:\Program Files (x86)\Windows Kits\8.1"
+	mklink /j c:\relax\VC "C:\Program Files (x86)\Microsoft Visual Studio 12.0"
+	mklink /j nasm "c:\Program Files (x86)\nasm"
+	:: this one is for the picky software packagers
+	mklink /j c:\openssl c:\relax\openssl
+    :: environment variable for future scripts
+	setx RELAX c:\relax
+
+Close all open command prompts. Now we're ready to go!
+
+# Building CouchDB Pre-requisites
+
+## Downloading glazier and dependency sources
+
+Open a `Couch SDK Prompt`:
+
+	cd c:\relax
+    git config --global core.autocrlf input
+	git clone https://github.com/dch/glazier.git
+    :: or git clone git://github.com/dch/glazier.git if you are a developer
+	mklink /j c:\relax\bin c:\relax\glazier\bin
+	path=c:\relax\bin;%PATH%;
+	aria2c --force-sequential=false --max-connection-per-server=5 --check-certificate=false --auto-file-renaming=false --allow-overwrite=true --input-file=glazier/downloads.md --max-concurrent-downloads=5 --dir=bits --save-session=bits/a2session.txt
+    color 1f
+
+## Build & Test 64-bit OpenSSL
+
+	cd %RELAX%\bin && build_openssl.cmd
+
+## Build 64-bit libcurl
+
+    cd %RELAX\bin && build_curl.cmd
+
+## Build 64-bit ICU
+
+	cd %RELAX%\bin && build_icu.cmd
+
+## Start a UNIX-friendly shell with MS compilers
+
+1. Start your `SDK prompt` as above
+2. Launch a cygwin erl-ified shell via `c:\relax\bin\shell.cmd`
+3. Select 17.5 unless you know what you are doing!
+4. Select `b for bash prompt`.
+
+For more detail on why this is necessary, see
+[UNIX-friendly shell details](#unix-friendly-shell-details) below.
+
+## Unpack, configure and build Erlang/OTP 17.5
+
+    ln -s /cygdrive/c/relax /relax
+	cd .. && tar xzf /relax/bits/otp_src_17.5.tar.gz
+	cd $ERL_TOP
+	echo "skipping gs" > lib/gs/SKIP
+    echo "skipping wx" > lib/wx/SKIP
+	echo "skipping ic" > lib/ic/SKIP
+	echo "skipping jinterface" > lib/jinterface/SKIP
+	erl_config.sh
+    :: Ensure OpenSSL is found by the configure script.
+    erl_build.sh
+    exit
+    exit
+
+## Build Spidermonkey JavaScript 1.8.5
+
+Spidermonkey needs to be compiled with the Mozilla Build chain. 
+To build it with VS2013 requires a few patches.
+
+Start by launching a fresh `SDK prompt`.
+
+    call c:\mozilla-build\start-shell-msvc2013-x64.bat
+    which cl lc link mt rc make
+    # /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/BIN/amd64/cl.exe
+    # /c/Program Files (x86)/Microsoft SDKs/Windows/v8.1A/bin/NETFX 4.5.1 Tools/x64/lc.exe
+    # /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/BIN/amd64/link.exe
+    # /c/Program Files (x86)/Windows Kits/8.1/bin/x64/mt.exe
+    # /c/Program Files (x86)/Windows Kits/8.1/bin/x64/rc.exe
+    # /local/bin/make.exe
+    cd /c/relax
+    tar xzf bits/js185-1.0.0.tar.gz
+    patch -p0 </c/relax/glazier/bits/js185-msvc2013.patch
+    cd js-1.8.5/js/src
+    autoconf-2.13
+    ./configure --enable-static --enable-shared-js --disable-debug-symbols --disable-debug --disable-debugger-info-modules --target=x86_64-pc-mingw32 --host=x86_64-pc-mingw32
+    make
+    ## optional, takes a while, math-jit-tests will fail
+    ## for more detail see https://bugzilla.mozilla.org/show_bug.cgi?id=1076670
+    ## TODO: apply fix as part of patch
+    ## also one jsapi test has been disabled that crashes, call we don't use
+    make check
+    exit
+    exit
+
+## Building CouchDB itself
+
+Start a new `SDK prompt`, then run `c:\relax\bin\shell.cmd`.
+Select `Erlang 17.5` and `w for a Windows prompt`.
+
+    cd \relax && git clone http://git-wip-us.apache.org/repos/asf/couchdb.git
+    cd couchdb
+    # optional, use suitable tag here
+    # git checkout --track origin/2.0.x
+    git clean -fdx && git reset --hard
+    powershell .\configure.ps1 -WithCurl
+    :: build and run tests, to be moved into NMakefile
+    rebar compile
+    copy src\couch\priv\couchjs bin
+    python dev\run -q --with-admin-party-please python tests\javascript\run
+
+This will produce a working CouchDB installation inside
+`$ERL_TOP/release/win32` that you can run directly, and also a full
+installer inside `$COUCH_TOP/etc/windows/` to transfer to other
+systems, without the build chain dependencies.
+
+Glazier prints out minimal instructions to transfer the logs and other files
+to a release directory of your choice. I typically use this when building
+from git to keep track of snapshots, and different erlang or couch build
+configurations.
+
+
+# Appendix
+
+## Why Glazier?
 
 I first got involved with CouchDB around 0.7. Only having a low-spec Windows
 PC to develop on, and no CouchDB Cloud provider being available, I tried
@@ -9,249 +209,13 @@
 Zlib, OpenSSL, Mozilla's SpiderMonkey JavaScript engine, and IBM's ICU were
 not available at a consistent compiler and VC runtime release.
 
-Glazier is a set of related scripts and toolchains to ease that pain.
-It's not fully automated but most of the effort is only required once.
-I hope it simplifies using Erlang and CouchDB for you by giving you a
-consistent repeatable build environment.
-
 There is a branch of glazier that was used to build each CouchDB release.
 I'm in the process of migrating a large portion of the setup scripts to
-use [Chocolatey] for installing pre-requisites, and then to roll most of
-the code into the CouchDB autotools scripts.
+use [Chocolatey] for installing pre-requisites.
 
-# Big Picture
+## UNIX-friendly shell details
 
-When I build Erlang/OTP from source, or CouchDB, I typically spend 80% of my
-time faffing around getting dependencies right. I want to make this as easy as
-`aptitude install -y <list_of_packages>`.
-
-Here's the general approach:
-
-- 64-bit Windows + 64-bit SDK 7.1 + Visual Studio 2012
-- chocolatey packages for remaining dev tool dependencies
-- Cygwin latest development tools
-
-Onwards!
-
-# Windows and SDKs
-
-While any 64-bit Windows will likely do, I use specifically:
-
-- 64-bit Windows 8 Enterprise N (the Euro version without media player etc) from MSDN [en-gb_windows_8_enterprise_n_x64_dvd_918053.iso](https://msdn.microsoft.com/en-us/subscriptions/securedownloads/#FileId=50201)
-- Install the full [Microsoft .Net Framework 4](http://www.microsoft.com/en-us/download/details.aspx?id=17851)
-- reboot and run updates
-- Install [Windows SDK 7.1](http://www.microsoft.com/download/en/confirmation.aspx?id=8279)
-- Install [Visual Studio 2012 Express](http://www.microsoft.com/en-ca/download/details.aspx?id=34673)
-- Install [Chocolatey]:
-
-    	    @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin
-
-- (optional) Install the [NuGet Package Manager](http://visualstudiogallery.msdn.microsoft.com/27077b70-9dad-4c64-adcf-c7cf6bc9970c)
-- Apply Windows Updates and Reboot until no more updates appear.
-
-Typically here I shutdown & snapshot my VM as past this point its going to
-evolve a lot over time. Many of the downstream chocolatey packages still
-prompt you to run their installers, which arguably defeats the purpose, but
-hey its still marginally easier.
-
-[Chocolatey]: http://chocolatey.org/
-[NuGet]: http://nuget.org/
-
-# Pre-requisites
-
-## Clean Package Installs with Chocolatey
-
-These packages install silently, without intervention. Cut and paste them
-into a command prompt, leave it running, and open another one for the next
-section.
-
-    cinst git
-    cinst 7zip.commandline
-    cinst sublimetext2
-    cinst StrawberryPerl
-    cinst nsis
-    cinst MozillaBuild
-    cinst nasm
-    cinst InnoSetup
-
-## Optional but Useful Packages
-
-    cinst sysinternals
-    cinst dependencywalker
-    cinst cmake
-    cinst SourceCodePro
-    cinst firefox
-    cinst GoogleChrome.Canary
-    cinst ChocolateyPackageUpdater
-    cinst MicrosoftSecurityEssentials
-    cinst msicuu2
-
-
-## Cygwin
-
-Download and run *32-bit* [Cygwin Setup](http://cygwin.com/setup-x86.exe)
-
-Select the following, in addition to the defaults:
-
-        ARCHIVE/
-        - p7zip
-
-        DEVEL/
-        - auto*
-        - binutils
-        - bison
-        - gcc-core
-        - gcc-g++
-        - gdb
-        - git
-        - libtool
-        - make
-        - patchutils
-        - pkg-config
-        - readline
-
-        EDITORS/
-        - vim
-
-        INTERPRETERS/
-        - M4
-        - perl
-        - python
-
-        NET/
-        - aria2
-
-        UTILS/
-        - file
-        - gnupg
-        - renameutils
-        - socat
-        - time
-        - tree
-        - util-linux
-
-        WEB/
-        - wget
-
-        *Ensure you DON'T have*:
-        DEVEL/
-        - help2man
-        NET/
-        - curl
-
-
-## Update AutoConf Archives
-
-Start a new cygwin shell:
-
-    git config --global core.autocrlf false
-    mkdir -p /cygdrive/c/relax/bits
-    cd /cygdrive/c/relax/bits
-    wget http://ftpmirror.gnu.org/autoconf-archive/autoconf-archive-2013.11.01.tar.gz
-    tar zxf autoconf-archive-2013.11.01.tar.gz
-    cd autoconf-archive-2013.11.01
-    ./configure --prefix=/usr && make && make install
-
-## Install Python easy_install, pip and Sphinx for Documentation Builds
-
-Still within cygwin:
-
-    cd /cygdrive/c/relax/bits
-    echo "--ca-directory=/usr/ssl/certs" > ~/.wgetrc
-    wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python
-    wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py -O - | python
-    pip install sphinx docutils pygments
-    # check its working
-    sphinx-build -h
-
-## Make a new prompt shortcut
-
-Make a new shortcut on the desktop, targeted at
-
-    cmd.exe /E:ON /V:ON /T:1F /K "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86 /release && color 1f
-    
-I suggest you pin it to the Start menu. We'll use this all the time,
-referred to as `the SDK prompt`. Right-click on the icon, click the `advanced`
-button, and tick the `Run as Administrator` button. We do need this so that
-`cp -P` works within autotools on Windows8.
-
-If you don't like white-on-blue, type `color` to fix it. It takes parameters.
-
-Let's confirm we have the right bits with
-`where cl mc mt link lc rc nmake`:
-
-	C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cl.exe
-	C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\MC.Exe
-	C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\mt.exe
-	C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe
-	C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools\lc.exe
-	C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\lc.exe
-	C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\RC.Exe
-	C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\nmake.exe
-
-Stop here if your results are not *identical*.
-
-*NOTE*: A recent MS .NET 4 security update broke the ICU build process. To fix, rename
-the broken SDK version of `cvtres.exe` to get it out of the path:
-
-        copy "C:\Windows\Microsoft.NET\Framework\v4.0.30319\cvtres.exe" "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cvtresold.exe"
-
-## Set up required convenience links
-
-    pushd c:\relax
-    rd /s/q SDK VC nasm inno5 nsis strawberry
-	mklink /j c:\relax\SDK "C:\Program Files\Microsoft SDKs\Windows\v7.1"
-	mklink /j c:\relax\VC "C:\Program Files (x86)\Microsoft Visual Studio 10.0"
-	mklink /j nasm "c:\Program Files (x86)\nasm"
-	mklink /j c:\relax\inno5 "c:\Program Files (x86)\Inno Setup 5"
-	mklink /j c:\relax\nsis "c:\Program Files\NSIS"
-
-	:: these ones are for the picky software packagers
-	mklink /j c:\cygwin\relax c:\relax
-	mklink /j c:\openssl c:\relax\openssl
-
-## Set Environment Variables
-
-	setx RELAX c:\relax
-	set RELAX=c:\relax
-
-Close all open command prompts. Now we're ready to go!
-
-# Building CouchDB Pre-requisites
-
-## Setting up the glazier build kit
-
-	pushd c:\relax
-    git config --global core.autocrlf false
-	git clone git://github.com/dch/glazier.git
-	mklink /j c:\relax\bin c:\relax\glazier\bin
-	path=c:\relax\bin;%PATH%;
-	aria2c.exe --force-sequential=false --max-connection-per-server=5 --check-certificate=false --auto-file-renaming=false --input-file=glazier/downloads.md --max-concurrent-downloads=5 --dir=bits --save-session=bits/a2session.txt
-
-## Build wxWidgets
-
-Open a new SDK prompt. Check that it has `x86 Release Build Environment` in the title bar.
-
-	pushd %RELAX%\bin && build_wx.cmd
-
-## Build OpenSSL
-
-	pushd %RELAX%\bin && build_openssl.cmd
-
-## Build ICU
-
-	pushd %RELAX%\bin && build_icu.cmd
-
-## Start a UNIX-friendly shell with MS compilers
-
-The short version:
-
-1. Start your `SDK prompt` as above
-2. Launch a cygwin erl-ified shell via `c:\relax\bin\shell.cmd`
-3. Select R14B04 unless you know what you are doing!
-4. Skip down to the next section ("Unpack Erlang/OTP")
-
-The long version: our goal is to get the path set up in this order:
+Our goal is to get the path set up in this order:
 
 1. erlang and couchdb build helper scripts
 2. Microsoft VC compiler, linker, etc from Windows SDK
@@ -265,7 +229,7 @@
 path is correct first in the win32 side before starting cygwin. Once in cygwin
 go to the root of where you installed erlang, and run the Erlang/OTP script:
 
-        eval `./otp_build env_win32`
+        eval `./otp_build env_win32 x64`
         echo $PATH | /bin/sed 's/:/\n/g'
         which cl link mc lc mt nmake rc
 
@@ -274,8 +238,7 @@
 Overall, the desired order for your $PATH is:
 
 - Erlang build helper scripts
-- Windows SDK tools, .Net framework
-- Visual C++ if installed
+- Visual C++ / .NET framework / SDK
 - Ancillary Erlang and CouchDB packaging tools
 - Usual cygwin unix tools such as make, gcc
 - Ancillary glazier/relax tools for building dependent libraries
@@ -283,76 +246,3 @@
 - Various settings form the `otp_build` script
 
 More details are at [erlang INSTALL-Win32.md on github](https://github.com/erlang/otp/blob/master/HOWTO/INSTALL-WIN32.md)
-
-## Unpack Erlang/OTP
-
-	cd .. && tar xzf /relax/bits/otp_src_R14B04.tar.gz
-	cd $ERL_TOP
-	cp /relax/SDK/Redist/VC/vcredist_x86.exe /cygdrive/c/werl/
-	cp /relax/SDK/Redist/VC/vcredist_x86.exe /cygdrive/c/relax/
-
-## Configure and Build Erlang/OTP
-
-	echo "skipping gs" > lib/gs/SKIP
-	echo "skipping ic" > lib/ic/SKIP
-	echo "skipping jinterface" > lib/jinterface/SKIP
-	erl_config.sh && erl_build.sh
-
-## Spidermonkey
-
-Spidermonkey needs to be compiled with the Mozilla Build chain. This
-requires special and careful incantations. Launch your `SDK prompt` again.
-
-    call c:\mozilla-build\start-msvc10.bat
-    which cl link
-    # /c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/cl.exe
-    # /c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/link.exe
-    export INCLUDE='c:\relax\SDK\include;c:\relax\VC\VC\Include;c:\relax\VC\VC\Include\Sys;'
-    export LIB='c:\Program Files\Microsoft SDKs\Windows\v7.1\Lib;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib;c:\mozilla-build\atlthunk_compat'
-    export PATH=/c/relax/SDK/Bin:/c/relax/VC/VC/bin:$PATH
-    which cl lc link mt rc make
-    # /c/relax/VC/VC/bin/cl.exe
-    # /c/relax/SDK/Bin/lc.exe
-    # /c/relax/VC/VC/bin/link.exe
-    # /c/relax/SDK/Bin/mt.exe
-    # /c/relax/SDK/Bin/rc.exe
-    # /usr/local/bin/make
-    cd /c/relax
-    tar xzf bits/js185-1.0.0.tar.gz
-    cd /c/relax/js-1.8.5/js/src
-    autoconf-2.13
-    ./configure --enable-static --enable-shared-js --enable-debug-symbols
-    make
-    make check # optional, takes a while, check-date-format-tofte.js fails
-    exit
-
-Note: the above PATH and LIB hacks are a workaround for having both
-VS2012 + SDK7.1 installed side by side. It seems that having both of
-these installed breaks compilation of js-185. If you're building with
-the SDK 7.1 alone this is not required, but it's recommended to
-follow the steps above anyway for safety.
-
-Note: start-mssvc10.bat may fail saying it cannot find the VS10 Common Tools. To fix this add a string value
-registry entry for computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\Sxs\VS7\10.0 of
-“C:\Program Files (x86)\Microsoft Visual Studio 10.0\” (without the quotes).
-There should be an existing 11.0 value that you can copy and modify.
-
-## Building CouchDB itself
-
-start `SDK prompt`, then shell.cmd, option (4) for R14B04.
-
-    cd /relax && git clone http://git-wip-us.apache.org/repos/asf/couchdb.git
-    cd /relax/couchdb
-    git checkout --track origin/1.3.x ## or suitable tag here
-    git clean -fdx && git reset --hard
-    ./bootstrap && couchdb_config.sh && couchdb_build.sh
-
-This will produce a working CouchDB installation inside
-`$ERL_TOP/release/win32` that you can run directly, and also a full
-installer inside `$COUCH_TOP/etc/windows/` to transfer to other
-systems, without the build chain dependencies.
-
-Glazier prints out minimal instructions to transfer the logs and other files
-to a release directory of your choice. I typically use this when building
-from git to keep track of snapshots, and different erlang or couch build
-configurations.
diff --git a/bin/aria2c.exe b/bin/aria2c.exe
deleted file mode 100755
index 1770117..0000000
--- a/bin/aria2c.exe
+++ /dev/null
Binary files differ
diff --git a/bin/build_curl.cmd b/bin/build_curl.cmd
index 034f817..2a4b2e0 100755
--- a/bin/build_curl.cmd
+++ b/bin/build_curl.cmd
@@ -1,15 +1,13 @@
 ::setlocal

-path=%path%;%opt%\cmake\bin;c:\mozilla-build\7zip;%relax%\openssl\bin;

+path=%path%;%relax%\openssl\bin;

 

 for %%i in ("%relax%\bits\curl-*.zip") do set curl_ver=%%~ni

 setx CURL_VER %curl_ver%

-set CURL_SRC=%RELAX%\%curl_ver%

+set CURL_VER=%curl_ver%

 setx CURL_SRC %curl_src%

-set CURL_PATH=%relax%\curl

+set CURL_SRC=%RELAX%\%curl_ver%

 setx CURL_PATH %curl_path%

-

-:: settings for CMake

-set install=%curl_path%

+set CURL_PATH=%relax%\curl

 

 if not defined SSL_PATH echo OpenSSL not built && goto eof

 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

@@ -30,8 +28,13 @@
 set LIBPATH=%LIBPATH%;%SSL_PATH%\lib;

 set LIB=%LIB%;%SSL_PATH%\lib;

 pushd %curl_src%

-:: same makefile works for vc9 heh heh

-nmake VC=vc10 vc-ssl

+:: this make target works for vc2013

+:: there is no 64-bit DLL target, so we do it here ourselves

+nmake VC=VC12 VC12

+cd lib

+nmake /f Makefile.VC12 MACHINE=x64 cfg=release-dll

+cd ..\src

+nmake /f Makefile.VC12 MACHINE=x64 cfg=release-dll

 popd

 :: make this specific curl version available to CouchDB build script

 mklink /d %curl_path% %curl_src%

diff --git a/bin/build_icu.cmd b/bin/build_icu.cmd
index 0c5a846..1c2c1bd 100755
--- a/bin/build_icu.cmd
+++ b/bin/build_icu.cmd
@@ -9,7 +9,9 @@
 if exist "%icu_path%" rd /s/q %icu_path%

 7z x "%relax%\bits\icu4c-*src.zip" -o%relax% -y

 pushd %icu_path%

-msbuild /m /p:Configuration=Release /p:Platform=Win32 /v:m /clp:summary %icu_path%\source\allinone\allinone.sln 

+:: ICU is set up for MSVS 2010, this upgrades it to 2013 support

+devenv.com %icu_path%\source\allinone\allinone.sln /Upgrade

+devenv.com %icu_path%\source\allinone\allinone.sln /Build "Release|x64"

 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

 :eof

 endlocal

diff --git a/bin/build_openssl.cmd b/bin/build_openssl.cmd
index e0f2cbb..e17eb0c 100755
--- a/bin/build_openssl.cmd
+++ b/bin/build_openssl.cmd
@@ -17,25 +17,24 @@
 if exist "%ssl_path%" rd /s/q "%ssl_path%"

 :: set up a softlink for openssl as Erlang seems to dumb to find it

 if not exist c:\openssl mklink /j c:\openssl "%relax%\openssl"

+if not exist c:\OpenSSL-Win64 mklink /j c:\OpenSSL-Win64 "%relax%\openssl"

 if defined openssl_ver rd /s/q %relax%\%openssl_ver%

 7z x "%TEMP%\openssl-*.tar" -o%relax%\ -y

 

 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

 pushd %relax%\%openssl_ver%

-perl Configure VC-WIN32 --prefix=%ssl_path%

-call ms\do_nasm

+perl Configure VC-WIN64A --prefix=%ssl_path%

+call ms\do_win64a

+nmake -f ms\nt.mak clean

 nmake -f ms\nt.mak

 nmake -f ms\nt.mak test

 nmake -f ms\nt.mak install

 

-:: from Erlang/OTP R14B03 onwards, OpenSSL is compiled in statically

-:: this may need  adding enable-static-engine and using target nt.mak

-:: but currently there seems to be an upstream bug to catch first...

-::perl Configure VC-WIN32 --prefix=%RELAX%\openssl enable-static-engine

-::call ms\do_nasm

-::nmake -f ms\nt.mak

-::nmake -f ms\nt.mak test

-::nmake -f ms\nt.mak install

+:: You may be surprised: the 64bit artefacts are indeed output in the

+:: out32* sub-directories and bear names ending *32.dll. Fact is the

+:: 64 bit compile target is so far an incremental change over the legacy

+:: 32bit windows target. Numerous compile flags are still labelled "32"

+:: although those do apply to both 32 and 64bit targets. 

 

 popd

 endlocal

diff --git a/bin/build_wx.cmd b/bin/build_wx.cmd
deleted file mode 100755
index ef4eef1..0000000
--- a/bin/build_wx.cmd
+++ /dev/null
@@ -1,60 +0,0 @@
-setlocal

-path=%path%;c:\mozilla-build\7zip;

-:: read the version of wxWidgets from the wxMSW source distribution

-:: wx_ver is used later on only in this script to set up a softlink

-:: so that Erlang finds it in the correct location

-for %%i in ("%relax%\bits\wxMSW*.zip") do set wx_src=%%~ni

-set wx_ver=%wx_src:wxmsw=wxWidgets%

-setx wx_ver %wx_ver%

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-if exist c:\cygwin\opt\local\pgm\%wx_ver% goto build

-if exist %relax%\%wx_src% goto build

-7z.exe x %relax%\bits\wxMSW* -aoa -y -o%relax%\

-mkdir c:\cygwin\opt\local\pgm > NUL: 2>&1

-mklink /d c:\cygwin\opt\local\pgm\%wx_ver% %relax%\%wx_src%

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-:build

-:: we need to modify setup.h to have full wx support in Erlang

-:: wx docs also advise modifying the following

-::  lib\vc_lib\msw\wx\setup.h          VC++ static, wxMSW

-::  lib\vc_lib\mswud\wx\setup.h        VC++ static, wxMSW, Unicode, debug

-::  lib\vc_lib\mswunivd\wx\setup.h     VC++ static, wxUniversal, debug

-type %relax%\bits\wxwidgets_setup.h >> %relax%\%wx_src%\include\wx\msw\setup.h

-

-nmake BUILD=release SHARED=0 UNICODE=1 USE_OPENGL=1 USE_GDIPLUS=1 DIR_SUFFIX_CPU= -f makefile.vc

-pushd %RELAX%\%wx_src%\build\msw

-nmake BUILD=release SHARED=0 UNICODE=1 USE_OPENGL=1 USE_GDIPLUS=1 DIR_SUFFIX_CPU= -f makefile.vc

-::rd /s/q vc_msw vc_mswd vc_mswu vc_mswud >NUL: 2>&1

-popd

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-pushd %RELAX%\wxMSW*\contrib\build\stc

-nmake BUILD=release SHARED=0 UNICODE=1 USE_OPENGL=1 USE_GDIPLUS=1 DIR_SUFFIX_CPU= -f makefile.vc

-::rd /s/q vc_msw vc_mswd vc_mswu vc_mswudpopd >NUL: 2>&1

-goto eof

-:::::::::::::::::::::::::::::::::::::::::::::

-:: future notes for using 2.9.2

-:: hack ERL_TOP/lib/wx/configure.in and replace all 2.8 with 2.9

-:: it also looks like changes to setup.h might not be needed either

-:: folder names have shifted as well

-pushd %RELAX%\wxMSW*\src\msw

-pushd %RELAX%\wxMSW*\src\stc

-

-:: or try this approach

-:: under wxMSW 2.8.11 using the same upgrade shenanigans as before

-pushd %RELAX%\wxMSW*\build\msw

-set vsconsoleoutput=1

-devenv wx.sln /upgrade

-devenv wx.sln /build "Unicode Release|Win32"

-devenv wx.sln /build "Unicode Debug|Win32"

-pushd %RELAX%\wxMSW*\contrib\build\stc

-devenv stc.sln /upgrade

-devenv stc.sln /build "Unicode Release|Win32"

-devenv stc.sln /build "Unicode Debug|Win32"

-

-:: use this to re-test in Erlang under wx without rerunning configure

-:: pushd $ERL_TOP/lib/wx && /bin/sh ./configure --disable-option-checking '--prefix=/usr/local'  '--build=i686-pc-cygwin' 'build_alias=win32' '--host=win32' '--target=win32' 'CC=cc.sh' 'CXX=cc.sh' 'RANLIB=true' 'AR=ar.sh' '--enable-dynamic-ssl-lib' 'host_alias=win32' 'target_alias=win32' 'ERL_TOP=/relax/otp_src_R14B04' --cache-file=/relax/otp_src_R14B04/erts/autoconf/win32.config.cache --srcdir=.

-:eof

-endlocal

diff --git a/bin/build_zlib.cmd b/bin/build_zlib.cmd
deleted file mode 100755
index 7035dc6..0000000
--- a/bin/build_zlib.cmd
+++ /dev/null
@@ -1,22 +0,0 @@
-setlocal

-path=%path%;c:\mozilla-build\7zip;%opt%\nasm;%opt%\strawberry\perl\bin;

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-:: clean up existing installs

-7z x "%relax%\bits\zlib-*.zip" -y -o%relax%

-for %%i in ("%") do set zlib_ver=%%~ni

-if defined zlib_ver rd /s/q %relax%\%zlib_ver%

-setx zlib_ver %zlib_ver%

-popd

-

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-pushd %relax%\%zlib_ver%\contrib\masmx86

-call bld_ml32.bat

-popd

-pushd %relax%\%zlib_ver%

-nmake -f win32\Makefile.msc

-nmake -f win32\Makefile.msc test

-:: copy contrib\vstudio\vc9\x86\ZlibStatRelease\zlibstat.lib .

-popd

-endlocal

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

diff --git a/bin/couchdb_config_js180.sh b/bin/couchdb_config_js180.sh
deleted file mode 100755
index aaaf02d..0000000
--- a/bin/couchdb_config_js180.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-COUCH_TOP=`pwd`
-export COUCH_TOP
-
-# use config.cache to save hours of time on cygwin
-#--cache-file=/tmp/couchdb_config.cache \
-### --enable-static \
-
-./configure \
---prefix=$ERL_TOP/release/win32 \
---with-erlang=$ERL_TOP/release/win32/usr/include \
---with-win32-icu-binaries=$RELAX/icu \
---with-win32-curl=$RELAX/curl \
---with-openssl-bin-dir=$RELAX/openssl/bin \
---with-msvc-redist-dir=$RELAX \
---with-js-lib=$RELAX/tracemonkey-57a6ad20eae9/js/src/dist/lib \
---with-js-include=$RELAX/tracemonkey-57a6ad20eae9/js/src/dist/include \
-2>&1 | tee $COUCH_TOP/build_configure.txt
-
-echo DONE. | tee -a $COUCH_TOP/build_configure.txt
diff --git a/bin/rebar b/bin/rebar
new file mode 100644
index 0000000..6479d5a
--- /dev/null
+++ b/bin/rebar
Binary files differ
diff --git a/bin/rebar.cmd b/bin/rebar.cmd
new file mode 100644
index 0000000..6a2ce43
--- /dev/null
+++ b/bin/rebar.cmd
@@ -0,0 +1,2 @@
+@escript "%~dp0\rebar" %*
+
diff --git a/bin/relax.lnk b/bin/relax.lnk
deleted file mode 100644
index 3c9d01b..0000000
--- a/bin/relax.lnk
+++ /dev/null
Binary files differ
diff --git a/bin/relax.sh b/bin/relax.sh
deleted file mode 100755
index ebd85ba..0000000
--- a/bin/relax.sh
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/bin/bash
-
-# The PATH variable should be Cygwinish
-# which is normally done during the eval `./otp_build env_win32` build step
-# current ./otp_build seems to get cygwin tools in the wrong place so MS linker
-# is overridden by the GNU one, which is not what we want. Wwe rebuild the path
-# from scratch to ensure tools are found in the right order.
-# Note significant differences between win32 OS and win64 OS paths.
-# TODO we can find a better way to do this in future
-## this is what we are looking for in order
-## /cygdrive/c/src/otp_src_R13B04/erts/etc/win32/cygwin_tools/vc:/cygdrive/c/src/otp_src_R13B04/erts/etc/win32/cygwin_tools:/cygdrive/c/PROGRA~2/MICROS~1.0/Common7/IDE:/cygdrive/c/PROGRA~2/MICROS~1.0/VC/bin:/cygdrive/c/PROGRA~2/MICROS~1.0/Common7/Tools/:/cygdrive/c/Windows/MICROS~1.NET/FRAMEW~1/:/cygdrive/c/Windows/MICROS~1.NET/FRAMEW~1/:/cygdrive/c/Windows/MICROS~1.NET/FRAMEW~1/V20~1.507:/cygdrive/c/PROGRA~2/MICROS~1.0/VC/VCPACK~1:/cygdrive/c/PROGRA~1/MICROS~1/Windows/v6.0A/bin:/cygdrive/c/PROGRA~1/MICROS~1/Windows/v7.0/bin:/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WINDOW~1/v1.0/:/cygdrive/c/PROGRA~2/NSIS:/cygdrive/c/OpenSSL/bin
-
-# build for the right version of erlang
-echo Using Erlang $ERTS_VSN OTP $OTP_VER in $ERL_TOP
-echo
-
-echo doing sanity checks
-# here we want to see that junction points are set up and
-# rebuild path from scratch as ./otp_build env_win32 gets it wrong
-# first up are erlang build helper scripts
-PATH=$ERL_TOP/bootstrap/bin:$ERL_TOP/release/win32/erts-$ERTS_VSN/bin:$ERL_TOP/erts/etc/win32/cygwin_tools/vc:$ERL_TOP/erts/etc/win32/cygwin_tools
-
-# then MSVC9 binaries using the new junction points
-###PATH=$PATH:/cygdrive/c/PROGRA~2/MICROS~1.0/Common7/IDE:/cygdrive/c/PROGRA~2/MICROS~1.0/VC/BIN:/cygdrive/c/PROGRA~2/MICROS~1.0/Common7/Tools:/cygdrive/c/PROGRA~2/MICROS~1.0/VC/VCPACK~1
-PATH=$PATH:/relax/vc/Common7/IDE:/relax/VC/VC/BIN:/relax/VC/Common7/Tools:/relax/VC/VC/vcPackages
-
-#### then .Net framework which we need to have clean manifests and SxS for Win7 x64
-PATH=$PATH:/cygdrive/c/WINDOWS/Microsoft.NET/Framework:/cygdrive/c/Microsoft.NET/Framework/v4.0.30319:/cygdrive/c/Microsoft.NET/Framework/v3.5
-
-# then SDKs
-###PATH=$PATH:/cygdrive/c/PROGRA~1/MICROS~1/Windows/v7.0/bin
-###PATH=$PATH:/cygdrive/c/PROGRA~1/MICROS~1/Windows/v6.0A/bin
-PATH=$PATH:/relax/SDK/bin:/relax/SDK/bin/x64
-
-# some additional tools in SDK
-# C:\Program Files\Microsoft Windows Performance Toolkit;
-# C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools;
-PATH=$PATH:/cygdrive/c/Program\ Files/Microsoft\ Windows\ Performance\ Toolkit:/relax/SDK/bin/NETFX\ 4.0\ Tools
-
-# then erlang and couchdb build helper scripts
-PATH=$PATH:/relax/openssl:/relax/nsis:/relax/inno5
-
-# then cygwin tools
-PATH=$PATH:/usr/local/bin:/usr/bin:/bin
-
-# then glazier tools
-PATH=$PATH:/relax/bin:/relax/bits
-
-# then windows
-PATH=$PATH:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0
-
-# remaining settings from otp_build env_win32 script
-OVERRIDE_TARGET="win32"
-CC="cc.sh"
-CXX="cc.sh"
-AR="ar.sh"
-RANLIB="true"
-OVERRIDE_CONFIG_CACHE="$ERL_TOP/erts/autoconf/win32.config.cache"
-OVERRIDE_CONFIG_CACHE_STATIC="$ERL_TOP/erts/autoconf/win32.config.cache.static"
-OVERRIDE_TARGET="win32"
-WIN32_WRAPPER_PATH="$ERL_TOP/erts/etc/win32/cygwin_tools/vc:$ERL_TOP/erts/etc/win32/cygwin_tools"
-
-CC_SH_DEBUG_LOG=$TMP/cc_r$OTP_VER.log
-LD_SH_DEBUG_LOG=$TMP/ld_r$OTP_VER.log
-RC_SH_DEBUG_LOG=$TMP/rc_r$OTP_VER.log
-MD_SH_DEBUG_LOG=$TMP/md_r$OTP_VER.log
-MC_SH_DEBUG_LOG=$TMP/mc_r$OTP_VER.log
-
-export OVERRIDE_TARGET CC CXX AR RANLIB OVERRIDE_CONFIG_CACHE_STATIC OVERRIDE_CONFIG_CACHE INCLUDE LIB LIBPATH LINK CL PATH TMP CC_SH LD_SH RC_SH MD_SH MC_SH ERL_TOP ERTS_VSN OTP_VER SHELL RELAX GLAZIER WIN32_WRAPPER_PATH OVERRIDE_TARGET
-
-# ensure we have an ERL_TOP to go to
-mkdir -p $ERL_TOP > /dev/null 2>&1
-chdir $ERL_TOP
-
-# this shouldn't change anything really
-### eval `./otp_build env_win32`
-
-echo current path:
-echo $PATH | /bin/sed 's/:/\n/g'
-echo
-echo please check the toolkit paths point to Microsoft versions:
-which mc; which lc; which cl; which link; which mt
-echo
-
-echo Ready to build Erlang and CouchDB using Erlang $ERTS_VSN OTP $OTP_VER in $ERL_TOP
-echo Time to Relax.
-
-bash -i
diff --git a/bin/restart_couch.cmd b/bin/restart_couch.cmd
deleted file mode 100755
index 11196ef..0000000
--- a/bin/restart_couch.cmd
+++ /dev/null
@@ -1,10 +0,0 @@
-@echo off

-:restart

-for /l %%i in (1,1,100000000000) do @echo TEST_RUN %%i && call :curl %%i

-goto :eof

-

-:curl

-curl -H "Content-Type: application/json" -X POST http://localhost:5984/_restart

-:: check to see if couch died horribly

-if exist erl_crash.dump echo Woops!!!! && pause

-goto :eof

diff --git a/bin/setup.cmd b/bin/setup.cmd
deleted file mode 100755
index 42fd0fb..0000000
--- a/bin/setup.cmd
+++ /dev/null
@@ -1,147 +0,0 @@
-::@echo off

-title Prepare to Relax.

-:: this script should be run from within your preferred compilation environment

-:: either vcvars32.bat x86 (for Visual Studio)

-:: or setenv.cmd /Release /x86 (for Windows SDKs)

-:: this allows it to set up the correct links so that later scripts don't need

-:: to detect them - its a messy and complicated process to automate as each SDK

-:: or VC release, and each Windows version has slightly different locations.

-

-:: our goal is to get the path set up in this order:

-:: erlang and couchdb build helper scripts

-:: Microsoft VC compiler and SDK

-:: cygwin path for other build tools like make

-:: the remaining windows system path

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-

-:: find our source tree from one level up from current bin

-if defined RELAX goto mountpoints

-set RELAX=%~dp0..

-mkdir %RELAX%

-:: set these paths into the user environment for future usage

-setx RELAX %RELAX%

-

-:mountpoints

-:: now we can set up new paths as links

-echo setting up links to tools, SDK and VC++

-

-:: set up junction point to make finding stuff simpler in unix path

-

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-:: what build environment are we using?

-:: check for VC10/SDK7.1

-:: SDK 7.1 on Windows 7 x64:

-:: VS100COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\

-:: sdkdir=C:\Program Files\Microsoft SDKs\Windows\v7.1\

-:: where link.exe mc.exe cl.exe mt.exe lc.exe

-:: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe

-:: C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\MC.Exe

-:: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cl.exe

-:: C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\mt.exe

-:: C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools\lc.exe

-:: C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\lc.exe

-if defined WindowsSDKVersionOverride mklink /d "%OPT%\SDK" "%programfiles%\Microsoft SDKs\Windows\%WindowsSDKVersionOverride%"

-if defined SDKdir mklink /d "%OPT%\SDK" "%sdkdir%"

-if defined VS100COMNTOOLS mklink /d "%OPT%\VC" "%VS100COMNTOOLS%..\.."

-

-:: VS2010/SDK7.1

-

-:: VC90/SDK7.0

-:: VS90ComnTools is the only variable set by the initial install of VC++ 9.0

-:: VS90COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\

-:: the Windows SDK uses a different variable only after you've call SetEnv.cmd first

-:: VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\

-:: VCRoot=c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\

-:: SdkSetupDir=C:\Program Files\Microsoft SDKs\Windows\v7.0\Setup

-:: C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\link.exe

-:: C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\cl.exe

-:: C:\Program Files\Microsoft SDKs\Windows\v7.0\mc.exe

-:: etc.

-if defined VS90COMNTOOLS mklink /d "%OPT%\VC" "%VS90COMNTOOLS%..\.."

-if defined VCINSTALLDIR  mklink /d "%OPT%\VC" "%VCINSTALLDIR%.."

-if defined SdkSetupDir mklink /d "%OPT%\VC" "%SdkSetupDir%\.."

-if not exist "%OPT%\SDK" mklink /d "%OPT%\SDK" "%programfiles%\Microsoft SDKs\Windows\v7.0"

-

-:: last chance

-if defined VCINSTALLDIR  mklink /d "%OPT%\VC" "%VCINSTALLDIR%\.."

-if defined WindowsSDKDir mklink /d "%OPT%\SDK" "%WindowsSDKDir%"

-

-::TODO

-if not exist %OPT%\sdk goto fail

-if not exist %OPT%\vc goto fail

-

-:: components

-if not exist "c:\cygwin\relax" mklink /d C:\cygwin\relax "%relax%"

-

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-goto eof

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-:fail

-echo [ERROR] unable to determine SDK and VC++ install locations

-exit /b 1

-goto eof

-rem :: example relevant environment variables from a

-rem windows 7 enterprise x64 install

-rem ::::: SDK vars

-rem CPU=i386

-rem FxTools=C:\Windows\Microsoft.NET\Framework\v3.5;C:\Windows\Microsoft.NET\Framework\v2.0.50727

-rem Include=c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include;C:\Program Files\Microsoft SDKs\Windows\v7.0\Include;C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\gl;

-rem Lib=c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Lib;C:\Program Files\Microsoft SDKs\Windows\v7.0\Lib;

-rem MSSdk=C:\Program Files\Microsoft SDKs\Windows\v7.0

-rem NODEBUG=1

-rem ORIGINALPATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\relax\winmerge;c:\mozilla-build\7zip;c:\relax\cmake\bin;c:\relax\bin;Z:\Dropbox\tools\pstools;c:\erlang\bin;C:\NuGet\bin;

-rem OS=Windows_NT

-rem Path=c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\x64;C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin;C:\Windows\Microsoft.NET\Framework\v3.5;C:\Windows\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft SDKs\Windows\v7.0\Setup;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\relax\winmerge;c:\mozilla-build\7zip;c:\relax\cmake\bin;c:\relax\bin;Z:\Dropbox\tools\pstools;c:\erlang\bin;C:\NuGet\bin;

-rem RegKeyPath=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7

-rem SdkSetupDir=C:\Program Files\Microsoft SDKs\Windows\v7.0\Setup

-rem SdkTools=C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\x64;C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin

-rem TARGETOS=WINNT

-rem VCINSTALLDIR=c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\

-rem VCRoot=c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\

-rem VSRegKeyPath=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7

-rem

-rem :: base env vars

-rem ALLUSERSPROFILE=C:\ProgramData

-rem APPDATA=C:\Users\couch\AppData\Roaming

-rem CommonProgramFiles=C:\Program Files\Common Files

-rem CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files

-rem CommonProgramW6432=C:\Program Files\Common Files

-rem COMPUTERNAME=RELAX

-rem ComSpec=C:\Windows\system32\cmd.exe

-rem FP_NO_HOST_CHECK=NO

-rem GLAZIER=Z:\r\glazier\bin\..

-rem HOMEDRIVE=C:

-rem HOMEPATH=\Users\couch

-rem LOCALAPPDATA=C:\Users\couch\AppData\Local

-rem LOGONSERVER=\\RELAX

-rem NUMBER_OF_PROCESSORS=2

-rem OS=Windows_NT

-rem Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\relax\winmerge;c:\mozilla-build\7zip;c:\relax\cmake\bin;c:\relax\bin;Z:\Dropbox\tools\pstools;c:\erlang\bin;C:\NuGet\bin;

-rem PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

-rem PROCESSOR_ARCHITECTURE=AMD64

-rem PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 42 Stepping 7, GenuineIntel

-rem PROCESSOR_LEVEL=6

-rem PROCESSOR_REVISION=2a07

-rem ProgramData=C:\ProgramData

-rem ProgramFiles=C:\Program Files

-rem ProgramFiles(x86)=C:\Program Files (x86)

-rem ProgramW6432=C:\Program Files

-rem PROMPT=$P$G

-rem PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\

-rem PUBLIC=C:\Users\Public

-rem RELAX=C:\relax

-rem SESSIONNAME=Console

-rem SystemDrive=C:

-rem SystemRoot=C:\Windows

-rem TEMP=C:\Users\couch\AppData\Local\Temp

-rem TMP=C:\Users\couch\AppData\Local\Temp

-rem tools=z:\Dropbox\tools

-rem USERDOMAIN=relax

-rem USERNAME=couch

-rem USERPROFILE=C:\Users\couch

-rem VS100COMNTOOLS=c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\

-rem windir=C:\Windows

-rem windows_tracing_flags=3

-rem windows_tracing_logfile=C:\BVTBin\Tests\installpackage\csilogfile.log

-rem

-:eof

diff --git a/bin/shell.cmd b/bin/shell.cmd
index fd3e592..e1c3dc3 100755
--- a/bin/shell.cmd
+++ b/bin/shell.cmd
@@ -2,9 +2,9 @@
 title Time to Relax.

 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

 set CYGWIN=nontsec nodosfilewarning

-if not exist c:\tmp mkdir c:\tmp

-set TEMP=c:\tmp

-set TMP=c:\tmp

+if not exist c:\temp mkdir c:\temp

+set TEMP=c:\temp

+set TMP=c:\temp

 

 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

 :: following settings allow Erlang build to locate openssl correctly

@@ -17,11 +17,6 @@
 if not defined ZLIB_PATH set ZLIB_PATH=%RELAX%\zlib

 

 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-:: haul in MSVC compiler configuration

-:: TODO remove dependency on x86 flag

-call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86 /release

-

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

 :: LIB and INCLUDE are preset by Windows SDK and/or Visual C++ shells

 :: however VC++ uses LIB & INCLUDE and SDK uses Lib & Include. In Cygwin

 :: these are *NOT* the same but when we shell out to CL.exe and LINK.exe

@@ -30,13 +25,10 @@
 :: relax for couchdb

 :: werldir for building erlang

 

+if not defined RELAX setx RELAX c:\relax > NUL:

 if not defined RELAX set RELAX=c:\relax

+if not defined WERL_DIR setx WERL_DIR c:\werl > NUL:

 if not defined WERL_DIR set WERL_DIR=c:\werl

-setx WERL_DIR %WERL_DIR% > NUL:

-setx RELAX %RELAX% > NUL:

-

-set LIB=%RELAX%\VC\VC\lib;%RELAX%\SDK\lib;%LIB%

-SET INCLUDE=%RELAX%\VC\VC\Include;%RELAX%\SDK\Include;%RELAX%\SDK\Include\gl;%INCLUDE%

 

 set INCLUDE=%INCLUDE%;%SSL_PATH%\include\openssl;%SSL_PATH%\include;%CURL_PATH%\include\curl;%ICU_PATH%\include;

 set LIBPATH=%LIBPATH%;%SSL_PATH%\lib;%CURL_PATH%\lib;%ICU_PATH%\lib;

@@ -51,78 +43,74 @@
 :: no default, so let's ask the user instead!

 :: choice.exe exists on all windows platforms since MSDOS but not on XP

 :select

-echo select:

-echo       4 for R14b04

-echo       3 for R15b03-1

-echo       1 for R16b01

-echo       2 for R16b02

-echo       A for R17A

-echo       B for R17B

-echo       8 for 18.1

-

-set /p choice=or 0 to exit to the shell.

-:: then get to unix goodness as fast as possible

+echo Select an Erlang:

+echo       7 for Erlang 17.5 (default)

+echo       8 for Erlang 18.0

+echo       1 for Erlang 18.1

+set /p choice="Make your selection ===> "

 if /i "%choice%"=="0" goto win_shell

-::::if /i "%choice%"=="2" goto R......

-if /i "%choice%"=="3" goto R15B03-1

-if /i "%choice%"=="4" goto R14B04

-if /i "%choice%"=="A" goto R17A

-if /i "%choice%"=="B" goto R17B

-if /i "%choice%"=="2" goto R16B02

-if /i "%choice%"=="1" goto R16B01

-if /i "%choice%"=="8" goto OTP18

+if /i "%choice%"=="7" goto 17.5

+if /i "%choice%"=="8" goto 18.0

+if /i "%choice%"=="1" goto 18.1

 :: else

-goto eof

+goto 18.1

 

 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-:OTP18

+:17.5

+set ERTS_VSN=6.4

+set OTP_REL=17.5

+goto shell_select

+

+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

+:18.0

+set ERTS_VSN=7.0

+set OTP_REL=18.0

+goto shell_select

+

+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

+:18.1

 set ERTS_VSN=7.1

 set OTP_REL=18.1

-goto unix_shell

+goto shell_select

 

 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-:R14B04

-set ERTS_VSN=5.8.5

-set OTP_REL=R14B04

-goto unix_shell

+:shell_select

+for /f "usebackq" %%i in (`c:\tools\cygwin\bin\cygpath.exe %WERL_DIR%`) do @set WERL_PATH=%%i

+set ERL_TOP=%WERL_PATH%/otp_src_%OTP_REL%

 

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-:R15B03-1

-set ERTS_VSN=5.9.3.1

-set OTP_REL=R15B03-1

-goto unix_shell

+echo Select a shell:

+echo       w for Windows prompt (default)

+echo       b for bash prompt

+echo       p for PowerShell prompt

+set /p choice="Make your selection ===> "

+if /i "%choice%"=="w" goto win_shell

+if /i "%choice%"=="b" goto unix_shell

+if /i "%choice%"=="p" goto ps_shell

+:: else

+goto :win_shell

 

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-:R16B01

-set ERTS_VSN=5.10.2

-set OTP_REL=R16B01

-goto unix_shell

-

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-:R16B02

-set ERTS_VSN=5.10.3

-set OTP_REL=R16B02

-goto unix_shell

-

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-:R16B03

-set ERTS_VSN=5.10.4

-set OTP_REL=R16B03

-goto unix_shell

-

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

 :unix_shell

 color

 title Building in %ERL_TOP% with OTP %OTP_REL% and Erlang v%ERTS_VSN%

-for /f "usebackq" %%i in (`c:\cygwin\bin\cygpath.exe %WERL_DIR%`) do @set WERL_PATH=%%i

-set ERL_TOP=%WERL_PATH%/otp_src_%OTP_REL%

-c:\cygwin\bin\bash %relax%\bin\shell.sh

+c:\tools\cygwin\bin\bash %relax%\bin\shell.sh

 goto eof

 

 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

 :win_shell

-echo type exit to stop relaxing.

+echo Type exit to stop relaxing.

+title On the couch. Type exit to stop relaxing.

+:: Need these things on the path to build/run CouchDB

+set PATH=%ERL_TOP%\release\win32\erts-%ERTS_VSN%\bin;%ERL_TOP%\bootstrap\bin;%ERL_TOP%\erts\etc\win32\cygwin_tools\vc;%ERL_TOP%\erts\etc\win32\cygwin_tools;c:\relax\bin;%PATH%;%ICU_PATH%\bin64;C:\Relax\js-1.8.5\js\src\dist\bin;C:\relax\curl\lib

 cmd.exe /k

+goto eof

+

+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

+:ps_shell

+echo Type exit to stop relaxing.

+title On the couch. Type exit to stop relaxing.

+set PATH=%ERL_TOP%\release\win32\erts-%ERTS_VSN%\bin;%ERL_TOP%\bootstrap\bin;%ERL_TOP%\erts\etc\win32\cygwin_tools\vc;%ERL_TOP%\erts\etc\win32\cygwin_tools;c:\relax\bin;%PATH%;%ICU_PATH%\bin64;C:\Relax\js-1.8.5\js\src\dist\bin;C:\relax\curl\lib

+powershell

+goto eof

 

 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

 :eof

diff --git a/bin/shell.sh b/bin/shell.sh
index a3647e1..6b445d1 100755
--- a/bin/shell.sh
+++ b/bin/shell.sh
@@ -1,64 +1,79 @@
 #!/bin/bash
+# inspired by https://github.com/erlang/otp/blob/master/HOWTO/INSTALL-WIN32.md
+# written by joan touzet (@wohali) and dave cottlehuber (@dch)
 
-# The PATH variable should be Cygwinish
-# which is normally done during the eval `./otp_build env_win32` build step
-# current ./otp_build seems to get cygwin tools in the wrong place so MS linker
-# is overridden by the GNU one, which is not what we want. Wwe rebuild the path
-# from scratch to ensure tools are found in the right order.
-# Note significant differences between win32 OS and win64 OS paths.
-# TODO we can find a better way to do this in future
-## this is what we are looking for in order
-## /cygdrive/c/src/otp_src_R13B04/erts/etc/win32/cygwin_tools/vc:/cygdrive/c/src/otp_src_R13B04/erts/etc/win32/cygwin_tools:/cygdrive/c/PROGRA~2/MICROS~1.0/Common7/IDE:/cygdrive/c/PROGRA~2/MICROS~1.0/VC/bin:/cygdrive/c/PROGRA~2/MICROS~1.0/Common7/Tools/:/cygdrive/c/Windows/MICROS~1.NET/FRAMEW~1/:/cygdrive/c/Windows/MICROS~1.NET/FRAMEW~1/:/cygdrive/c/Windows/MICROS~1.NET/FRAMEW~1/V20~1.507:/cygdrive/c/PROGRA~2/MICROS~1.0/VC/VCPACK~1:/cygdrive/c/PROGRA~1/MICROS~1/Windows/v6.0A/bin:/cygdrive/c/PROGRA~1/MICROS~1/Windows/v7.0/bin:/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WINDOW~1/v1.0/:/cygdrive/c/PROGRA~2/NSIS:/cygdrive/c/OpenSSL/bin
+# first, a base default path for cygwin
+PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:\
+/cygdrive/c/windows/system32:/cygdrive/c/windows:\
+/cygdrive/c/windows/system32/Wbem
+
+# utility functions from INSTALL-WIN32.md, forced to cygwin mode
+make_winpath()
+{
+  P=$1
+  cygpath -d "$P"
+}
+
+make_upath()
+{
+  P=$1
+  cygpath "$P"
+}
+
 
 # build for the right version of erlang
 echo Using Erlang $ERTS_VSN OTP $OTP_VER in $ERL_TOP
 echo
 
-echo doing sanity checks
-# here we want to see that junction points are set up and
-# rebuild path from scratch as ./otp_build env_win32 gets it wrong
-# first up are erlang build helper scripts
-PATH=$ERL_TOP/release/win32/erts-$ERTS_VSN/bin:$ERL_TOP/bootstrap/bin:$ERL_TOP/erts/etc/win32/cygwin_tools/vc:$ERL_TOP/erts/etc/win32/cygwin_tools
+# convenience variables
+C_DRV=/cygdrive/c
+PRG_FLS64=$C_DRV/Program\ Files
+PRG_FLS32=$C_DRV/Program\ Files\ \(x86\)
 
-# then MSVC9 binaries using the new junction points
-###PATH=$PATH:/cygdrive/c/PROGRA~2/MICROS~1.0/Common7/IDE:/cygdrive/c/PROGRA~2/MICROS~1.0/VC/BIN:/cygdrive/c/PROGRA~2/MICROS~1.0/Common7/Tools:/cygdrive/c/PROGRA~2/MICROS~1.0/VC/VCPACK~1
-PATH=$PATH:/relax/vc/Common7/IDE:/relax/VC/VC/BIN:/relax/VC/Common7/Tools/relax/VC/VC/vcPackages
+# MSVS 2013
+VISUAL_STUDIO_ROOT32=$PRG_FLS32/Microsoft\ Visual\ Studio\ 12.0
+MS_SDK_ROOT64=$PRG_FLS32/Windows\ Kits/8.1
+NETFX_ROOT64=$PRG_FLS32/Microsoft\ SDKs/Windows/v8.1A/bin/NETFX\ 4.5.1\ Tools/x64
+# Okay, now mangle the paths and get rid of spaces by using short names
+WIN_VCROOT32=`make_winpath "$VISUAL_STUDIO_ROOT32"`
+VCROOT32=`make_upath $WIN_VCROOT32`
+WIN_SDKROOT64=`make_winpath "$MS_SDK_ROOT64"`
+SDKROOT64=`make_upath $WIN_SDKROOT64`
+WIN_NETFXROOT64=`make_winpath "$NETFX_ROOT64"`
+NETFXROOT64=`make_upath $WIN_NETFXROOT64`
+WIN_PROGRAMFILES32=`make_winpath "$PRG_FLS32"`
+PROGRAMFILES32=`make_upath $WIN_PROGRAMFILES32`
 
-#### then .Net framework which we need to have clean manifests and SxS for Win7 x64
-PATH=$PATH:/cygdrive/c/WINDOWS/Microsoft.NET/Framework:/cygdrive/c/Microsoft.NET/Framework/v4.0.30319:/cygdrive/c/Microsoft.NET/Framework/v3.5
+WIN_PROGRAMFILES64=`make_winpath "$PRG_FLS64"`
+PROGRAMFILES64=`make_upath $WIN_PROGRAMFILES64`
 
-# then SDKs
-###PATH=$PATH:/cygdrive/c/PROGRA~1/MICROS~1/Windows/v7.0/bin
-###PATH=$PATH:/cygdrive/c/PROGRA~1/MICROS~1/Windows/v6.0A/bin
-PATH=$PATH:/relax/SDK/bin:/relax/SDK/bin/x64
+# nsis
+NSIS_BIN=$PRG_FLS32/NSIS
+# openssl
+OPENSSL_BIN=/cygdrive/c/relax/openssl/bin
+# skipping java
 
-# some additional tools in SDK
-# C:\Program Files\Microsoft Windows Performance Toolkit;
-# C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools;
-PATH=$PATH:/cygdrive/c/Program\ Files/Microsoft\ Windows\ Performance\ Toolkit:/relax/SDK/bin/NETFX\ 4.0\ Tools
+# now a path to everything we are about to build
+ERL_PATH=$ERL_TOP/release/win32/erts-$ERTS_VSN/bin:\
+$ERL_TOP/bootstrap/bin:\
+$ERL_TOP/erts/etc/win32/cygwin_tools/vc:\
+$ERL_TOP/erts/etc/win32/cygwin_tools
 
-# then erlang and couchdb build helper scripts
-PATH=$PATH:/cygdrive/c/openssl/bin:/cygdrive/c/relax/nsis:/cygdrive/c/relax/inno5
+# path to everything Visual Studio 2013
+VC_PATH=$VCROOT32/Common7/IDE:$VCROOT32/VC/BIN/amd64:$VCROOT32/Common7/Tools:\
+$VCROOT32/VC/VCPackages:$NETFXROOT64:$SDKROOT64/bin/x64:\
+$SDKROOT64/bin
 
-# then cygwin tools
-PATH=$PATH:/usr/local/bin:/usr/bin:/bin
+# .Net framework which we need to have clean manifests and SxS for Win7 x64
+DOTNET_PATH=/cygdrive/c/WINDOWS/Microsoft.NET/Framework:/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v4.0.30319:/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v3.5
 
-# then glazier tools
-PATH=$PATH:/relax/bin:/relax/bits
+# glazier tools
+GLAZIER_PATH=$PATH:/relax/bin:/relax/bits
 
-# then windows
-PATH=$PATH:`/usr/bin/cygpath $WINDIR`/system32:`/usr/bin/cygpath $WINDIR`:`/usr/bin/cygpath $WINDIR`/System32/Wbem:`/usr/bin/cygpath $WINDIR`/system32/WindowsPowerShell/v1.0
+# put it all together
+PATH=$NSIS_BIN:$OPENSSL_BIN:$VC_PATH:$PATH:$DOTNET_PATH:$ERL_PATH:$GLAZIER_PATH
 
-# remaining settings from otp_build env_win32 script
-OVERRIDE_TARGET="win32"
-CC="cc.sh"
-CXX="cc.sh"
-AR="ar.sh"
-RANLIB="true"
-OVERRIDE_CONFIG_CACHE="$ERL_TOP/erts/autoconf/win32.config.cache"
-OVERRIDE_CONFIG_CACHE_STATIC="$ERL_TOP/erts/autoconf/win32.config.cache.static"
-OVERRIDE_TARGET="win32"
-WIN32_WRAPPER_PATH="$ERL_TOP/erts/etc/win32/cygwin_tools/vc:$ERL_TOP/erts/etc/win32/cygwin_tools"
+# Microsoft SDK libpaths are set by setup.cmd
 
 CC_SH_DEBUG_LOG=$TMP/cc_r$OTP_VER.log
 LD_SH_DEBUG_LOG=$TMP/ld_r$OTP_VER.log
@@ -68,19 +83,20 @@
 
 TERM=xterm
 
-export OVERRIDE_TARGET CC CXX AR RANLIB OVERRIDE_CONFIG_CACHE_STATIC OVERRIDE_CONFIG_CACHE INCLUDE LIB LIBPATH LINK CL PATH TMP CC_SH LD_SH RC_SH MD_SH MC_SH ERL_TOP ERTS_VSN OTP_VER SHELL RELAX WIN32_WRAPPER_PATH OVERRIDE_TARGET TERM
+export INCLUDE LIB LIBPATH PATH TMP ERL_TOP ERTS_VSN OTP_VER SHELL RELAX TERM CC_SH_DEBUG_LOG LD_SH_DEBUG_LOG RC_SH_DEBUG_LOG MD_SH_DEBUG_LOG MC_SH_DEBUG_LOG
 
 # ensure we have an ERL_TOP to go to
 mkdir -p $ERL_TOP > /dev/null 2>&1
 
-# this shouldn't change anything really
-### eval `./otp_build env_win32`
+# add in otp_build settings
+eval `$ERL_TOP/otp_build env_win32 x64`
 
+echo doing sanity checks...
 echo current path:
 echo $PATH | /bin/sed 's/:/\n/g'
 echo
 echo please check the toolkit paths point to Microsoft versions:
-which mc lc cl link mt rc
+which mc lc cl link mt rc cvtres
 echo
 
 echo Ready to build Erlang and CouchDB using Erlang $ERTS_VSN OTP $OTP_VER in $ERL_TOP
diff --git a/bits/js185-msvc2013.patch b/bits/js185-msvc2013.patch
new file mode 100644
index 0000000..6a60682
--- /dev/null
+++ b/bits/js185-msvc2013.patch
@@ -0,0 +1,4434 @@
+diff -Naurb js-1.8.5-dist/js/src/configure js-1.8.5/js/src/configure
+--- js-1.8.5-dist/js/src/configure	2011-03-31 15:08:36 -0400
++++ js-1.8.5/js/src/configure	2015-08-26 12:33:27 -0400
+@@ -2944,6 +2944,17 @@
+ #define _CRT_NONSTDC_NO_WARNINGS 1
+ EOF
+ 
++        elif test "$_CC_MAJOR_VERSION" = "18"; then
++            _CC_SUITE=12
++            CXXFLAGS="$CXXFLAGS -Zc:wchar_t-"
++            cat >> confdefs.h <<\EOF
++#define _CRT_SECURE_NO_WARNINGS 1
++EOF
++
++            cat >> confdefs.h <<\EOF
++#define _CRT_NONSTDC_NO_WARNINGS 1
++EOF
++
+         else
+             { echo "configure: error: This version ($CC_VERSION) of the MSVC compiler is unsupported. See https://developer.mozilla.org/en/Windows_Build_Prerequisites." 1>&2; exit 1; }
+         fi
+@@ -2986,7 +2997,7 @@
+         # Windows Server 2008 and newer SDKs have WinSDKVer.h, get the version
+         # from there
+         echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+-echo "configure:2990: checking how to run the C preprocessor" >&5
++echo "configure:3001: checking how to run the C preprocessor" >&5
+ # On Suns, sometimes $CPP names a directory.
+ if test -n "$CPP" && test -d "$CPP"; then
+   CPP=
+@@ -3001,13 +3012,13 @@
+   # On the NeXT, cc -E runs the code through the compiler's parser,
+   # not just through cpp.
+   cat > conftest.$ac_ext <<EOF
+-#line 3005 "configure"
++#line 3016 "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:3011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:3022: \"$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
+   :
+@@ -3018,13 +3029,13 @@
+   rm -rf conftest*
+   CPP="${CC-cc} -E -traditional-cpp"
+   cat > conftest.$ac_ext <<EOF
+-#line 3022 "configure"
++#line 3033 "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:3028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:3039: \"$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
+   :
+@@ -3035,13 +3046,13 @@
+   rm -rf conftest*
+   CPP="${CC-cc} -nologo -E"
+   cat > conftest.$ac_ext <<EOF
+-#line 3039 "configure"
++#line 3050 "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:3045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:3056: \"$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
+   :
+@@ -3069,17 +3080,17 @@
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:3073: checking for $ac_hdr" >&5
++echo "configure:3084: 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 3078 "configure"
++#line 3089 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:3083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:3094: \"$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*
+@@ -3111,7 +3122,7 @@
+             # This is done because the Windows 7 beta SDK reports its
+             # NTDDI_MAXVER to be 0x06000100 instead of 0x06010000, as it should
+             echo $ac_n "checking for highest Windows version supported by this SDK""... $ac_c" 1>&6
+-echo "configure:3115: checking for highest Windows version supported by this SDK" >&5
++echo "configure:3126: checking for highest Windows version supported by this SDK" >&5
+ if eval "test \"`echo '$''{'ac_cv_winsdk_maxver'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -3141,17 +3152,17 @@
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:3145: checking for $ac_hdr" >&5
++echo "configure:3156: 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 3150 "configure"
++#line 3161 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:3155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:3166: \"$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*
+@@ -3188,7 +3199,7 @@
+         unset _MSVC_VER_FILTER
+ 
+         echo $ac_n "checking for std::_Throw""... $ac_c" 1>&6
+-echo "configure:3192: checking for std::_Throw" >&5
++echo "configure:3203: checking for std::_Throw" >&5
+ if eval "test \"`echo '$''{'ac_cv_have_std__Throw'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -3204,14 +3215,14 @@
+                 _SAVE_CXXFLAGS="$CXXFLAGS"
+                 CXXFLAGS="${CXXFLAGS} -D_HAS_EXCEPTIONS=0"
+                 cat > conftest.$ac_ext <<EOF
+-#line 3208 "configure"
++#line 3219 "configure"
+ #include "confdefs.h"
+ #include <exception>
+ int main() {
+ std::_Throw(std::exception()); return 0;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:3226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_have_std__Throw="yes"
+ else
+@@ -3236,7 +3247,7 @@
+ 
+         if test "$ac_cv_have_std__Throw" == "yes"; then
+             echo $ac_n "checking for |class __declspec(dllimport) exception| bug""... $ac_c" 1>&6
+-echo "configure:3240: checking for |class __declspec(dllimport) exception| bug" >&5
++echo "configure:3251: checking for |class __declspec(dllimport) exception| bug" >&5
+ if eval "test \"`echo '$''{'ac_cv_have_dllimport_exception_bug'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -3252,14 +3263,14 @@
+                     _SAVE_CXXFLAGS="$CXXFLAGS"
+                     CXXFLAGS="${CXXFLAGS} -D_HAS_EXCEPTIONS=0"
+                     cat > conftest.$ac_ext <<EOF
+-#line 3256 "configure"
++#line 3267 "configure"
+ #include "confdefs.h"
+ #include <vector>
+ int main() {
+ std::vector<int> v; return v.at(1);
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:3274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_cv_have_dllimport_exception_bug="no"
+ else
+@@ -3291,7 +3302,7 @@
+             fi
+         else
+             echo $ac_n "checking for overridable _RAISE""... $ac_c" 1>&6
+-echo "configure:3295: checking for overridable _RAISE" >&5
++echo "configure:3306: checking for overridable _RAISE" >&5
+ if eval "test \"`echo '$''{'ac_cv_have__RAISE'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -3307,7 +3318,7 @@
+                     _SAVE_CXXFLAGS="$CXXFLAGS"
+                     CXXFLAGS="${CXXFLAGS} -D_HAS_EXCEPTIONS=0"
+                     cat > conftest.$ac_ext <<EOF
+-#line 3311 "configure"
++#line 3322 "configure"
+ #include "confdefs.h"
+ #include <xstddef>
+                                     #undef _RAISE
+@@ -3318,7 +3329,7 @@
+ std::vector<int> v; return v.at(1);
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:3333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_have__RAISE="no"
+ else
+@@ -3360,9 +3371,9 @@
+         _W32API_MAJOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $1 }'`
+         _W32API_MINOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $2 }'`
+         echo $ac_n "checking for w32api version >= $W32API_VERSION""... $ac_c" 1>&6
+-echo "configure:3364: checking for w32api version >= $W32API_VERSION" >&5
++echo "configure:3375: checking for w32api version >= $W32API_VERSION" >&5
+         cat > conftest.$ac_ext <<EOF
+-#line 3366 "configure"
++#line 3377 "configure"
+ #include "confdefs.h"
+ #include <w32api.h>
+ int main() {
+@@ -3374,7 +3385,7 @@
+             
+ ; return 0; }
+ EOF
+-if { (eval echo configure:3378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:3389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+    res=yes 
+ else
+@@ -3390,7 +3401,7 @@
+         fi
+         # Check windres version
+         echo $ac_n "checking for windres version >= $WINDRES_VERSION""... $ac_c" 1>&6
+-echo "configure:3394: checking for windres version >= $WINDRES_VERSION" >&5
++echo "configure:3405: checking for windres version >= $WINDRES_VERSION" >&5
+         _WINDRES_VERSION=`${WINDRES} --version 2>&1 | grep -i windres 2>/dev/null | $AWK '{ print $3 }'`
+         echo "$ac_t""$_WINDRES_VERSION" 1>&6
+         _WINDRES_MAJOR_VERSION=`echo $_WINDRES_VERSION | $AWK -F\. '{ print $1 }'`
+@@ -3430,7 +3441,7 @@
+     # If the maximum version supported by this SDK is lower than the target
+     # version, error out
+     echo $ac_n "checking for Windows SDK being recent enough""... $ac_c" 1>&6
+-echo "configure:3434: checking for Windows SDK being recent enough" >&5
++echo "configure:3445: checking for Windows SDK being recent enough" >&5
+     if $PERL -e "exit(0x$MOZ_WINSDK_TARGETVER > $MOZ_WINSDK_MAXVER)"; then
+         echo "$ac_t"""yes"" 1>&6
+     else
+@@ -3461,10 +3472,10 @@
+ if test "$CC" != "icc" -a -z "$_WIN32_MSVC"; 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:3465: checking whether $CC and cc understand -c and -o together" >&5
++echo "configure:3476: 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:3468: checking whether cc understands -c and -o together" >&5
++echo "configure:3479: 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]/_/'`"
+@@ -3476,16 +3487,16 @@
+ # 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:3480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+-   test -f conftest.o && { (eval echo configure:3481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
++if { (eval echo configure:3491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
++   test -f conftest.o && { (eval echo configure:3492: \"$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:3486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
++    if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:3497: \"$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:3488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+-	 test -f conftest.o && { (eval echo configure:3489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
++      if { (eval echo configure:3499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
++	 test -f conftest.o && { (eval echo configure:3500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+       then
+         # cc works too.
+         :
+@@ -3521,7 +3532,7 @@
+ fi
+ 
+ echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+-echo "configure:3525: checking how to run the C preprocessor" >&5
++echo "configure:3536: checking how to run the C preprocessor" >&5
+ # On Suns, sometimes $CPP names a directory.
+ if test -n "$CPP" && test -d "$CPP"; then
+   CPP=
+@@ -3536,13 +3547,13 @@
+   # On the NeXT, cc -E runs the code through the compiler's parser,
+   # not just through cpp.
+   cat > conftest.$ac_ext <<EOF
+-#line 3540 "configure"
++#line 3551 "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:3546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:3557: \"$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
+   :
+@@ -3553,13 +3564,13 @@
+   rm -rf conftest*
+   CPP="${CC-cc} -E -traditional-cpp"
+   cat > conftest.$ac_ext <<EOF
+-#line 3557 "configure"
++#line 3568 "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:3563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:3574: \"$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
+   :
+@@ -3570,13 +3581,13 @@
+   rm -rf conftest*
+   CPP="${CC-cc} -nologo -E"
+   cat > conftest.$ac_ext <<EOF
+-#line 3574 "configure"
++#line 3585 "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:3580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:3591: \"$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
+   :
+@@ -3601,7 +3612,7 @@
+ echo "$ac_t""$CPP" 1>&6
+ 
+ echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
+-echo "configure:3605: checking how to run the C++ preprocessor" >&5
++echo "configure:3616: 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
+@@ -3614,12 +3625,12 @@
+ cross_compiling=$ac_cv_prog_cxx_cross
+   CXXCPP="${CXX-g++} -E"
+   cat > conftest.$ac_ext <<EOF
+-#line 3618 "configure"
++#line 3629 "configure"
+ #include "confdefs.h"
+ #include <stdlib.h>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:3623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:3634: \"$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
+   :
+@@ -3709,7 +3720,7 @@
+ # 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:3713: checking for $ac_word" >&5
++echo "configure:3724: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_SBCONF'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -3776,7 +3787,7 @@
+ # 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:3780: checking for a BSD compatible install" >&5
++echo "configure:3791: 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
+@@ -3829,7 +3840,7 @@
+ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+ 
+ echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+-echo "configure:3833: checking whether ln -s works" >&5
++echo "configure:3844: 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
+@@ -3852,7 +3863,7 @@
+ 
+ if test -z "$TINDERBOX_SKIP_PERL_VERSION_CHECK"; then
+ echo $ac_n "checking for minimum required perl version >= $PERL_VERSION""... $ac_c" 1>&6
+-echo "configure:3856: checking for minimum required perl version >= $PERL_VERSION" >&5
++echo "configure:3867: 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
+@@ -3863,7 +3874,7 @@
+ fi
+ 
+ echo $ac_n "checking for full perl installation""... $ac_c" 1>&6
+-echo "configure:3867: checking for full perl installation" >&5
++echo "configure:3878: 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
+@@ -3878,7 +3889,7 @@
+ # 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:3882: checking for $ac_word" >&5
++echo "configure:3893: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -3938,7 +3949,7 @@
+  # 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:3942: checking for $ac_word" >&5
++echo "configure:3953: 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
+@@ -3987,7 +3998,7 @@
+  # 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:3991: checking for $ac_word" >&5
++echo "configure:4002: 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
+@@ -4036,7 +4047,7 @@
+  # 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:4040: checking for $ac_word" >&5
++echo "configure:4051: 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
+@@ -4087,7 +4098,7 @@
+ # 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:4091: checking for $ac_word" >&5
++echo "configure:4102: 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
+@@ -4141,7 +4152,7 @@
+  # 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:4145: checking for $ac_word" >&5
++echo "configure:4156: 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
+@@ -4189,7 +4200,7 @@
+  # 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:4193: checking for $ac_word" >&5
++echo "configure:4204: 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
+@@ -4263,7 +4274,7 @@
+ # 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:4267: checking for $ac_word" >&5
++echo "configure:4278: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_path_PBBUILD'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -4326,7 +4337,7 @@
+              # Extract the first word of "sdp", so it can be a program name with args.
+ set dummy sdp; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:4330: checking for $ac_word" >&5
++echo "configure:4341: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_path_SDP'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -4452,7 +4463,7 @@
+ 
+   
+   echo $ac_n "checking for valid compiler/Mac OS X SDK combination""... $ac_c" 1>&6
+-echo "configure:4456: checking for valid compiler/Mac OS X SDK combination" >&5
++echo "configure:4467: checking for valid compiler/Mac OS X SDK combination" >&5
+   ac_ext=C
+ # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CXXCPP $CPPFLAGS'
+@@ -4461,7 +4472,7 @@
+ cross_compiling=$ac_cv_prog_cxx_cross
+ 
+   cat > conftest.$ac_ext <<EOF
+-#line 4465 "configure"
++#line 4476 "configure"
+ #include "confdefs.h"
+ #include <new>
+                  int main() { return 0; }
+@@ -4469,7 +4480,7 @@
+ result=yes
+ ; return 0; }
+ EOF
+-if { (eval echo configure:4473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:4484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   result=no
+ else
+@@ -4506,7 +4517,7 @@
+ # 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:4510: checking for $ac_word" >&5
++echo "configure:4521: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_path_GMAKE'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -4562,7 +4573,7 @@
+ # 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:4566: checking for $ac_word" >&5
++echo "configure:4577: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_path_GMAKE'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -4625,7 +4636,7 @@
+ # 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:4629: checking for X" >&5
++echo "configure:4640: checking for X" >&5
+ 
+ # Check whether --with-x or --without-x was given.
+ if test "${with_x+set}" = set; then
+@@ -4687,12 +4698,12 @@
+ 
+   # First, try using that file with no special directory specified.
+ cat > conftest.$ac_ext <<EOF
+-#line 4691 "configure"
++#line 4702 "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:4696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:4707: \"$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*
+@@ -4761,14 +4772,14 @@
+   ac_save_LIBS="$LIBS"
+   LIBS="-l$x_direct_test_library $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 4765 "configure"
++#line 4776 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ ${x_direct_test_function}()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:4772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:4783: \"$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.
+@@ -4874,17 +4885,17 @@
+     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:4878: checking whether -R must be followed by a space" >&5
++echo "configure:4889: 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 4881 "configure"
++#line 4892 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:4888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:4899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_R_nospace=yes
+ else
+@@ -4900,14 +4911,14 @@
+       else
+ 	LIBS="$ac_xsave_LIBS -R $x_libraries"
+ 	cat > conftest.$ac_ext <<EOF
+-#line 4904 "configure"
++#line 4915 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:4911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:4922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_R_space=yes
+ else
+@@ -4939,7 +4950,7 @@
+     # 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:4943: checking for dnet_ntoa in -ldnet" >&5
++echo "configure:4954: 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
+@@ -4947,7 +4958,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-ldnet  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 4951 "configure"
++#line 4962 "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
+@@ -4958,7 +4969,7 @@
+ dnet_ntoa()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:4962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:4973: \"$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
+@@ -4980,7 +4991,7 @@
+ 
+     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:4984: checking for dnet_ntoa in -ldnet_stub" >&5
++echo "configure:4995: 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
+@@ -4988,7 +4999,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-ldnet_stub  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 4992 "configure"
++#line 5003 "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
+@@ -4999,7 +5010,7 @@
+ dnet_ntoa()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:5003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5014: \"$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
+@@ -5028,12 +5039,12 @@
+     # 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:5032: checking for gethostbyname" >&5
++echo "configure:5043: 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 5037 "configure"
++#line 5048 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char gethostbyname(); below.  */
+@@ -5056,7 +5067,7 @@
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:5060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5071: \"$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
+@@ -5077,7 +5088,7 @@
+ 
+     if test $ac_cv_func_gethostbyname = no; then
+       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
+-echo "configure:5081: checking for gethostbyname in -lnsl" >&5
++echo "configure:5092: 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
+@@ -5085,7 +5096,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lnsl  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 5089 "configure"
++#line 5100 "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
+@@ -5096,7 +5107,7 @@
+ gethostbyname()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:5100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5111: \"$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
+@@ -5126,12 +5137,12 @@
+     # -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:5130: checking for connect" >&5
++echo "configure:5141: 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 5135 "configure"
++#line 5146 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char connect(); below.  */
+@@ -5154,7 +5165,7 @@
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:5158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5169: \"$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
+@@ -5175,7 +5186,7 @@
+ 
+     if test $ac_cv_func_connect = no; then
+       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
+-echo "configure:5179: checking for connect in -lsocket" >&5
++echo "configure:5190: 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
+@@ -5183,7 +5194,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 5187 "configure"
++#line 5198 "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
+@@ -5194,7 +5205,7 @@
+ connect()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:5198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5209: \"$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
+@@ -5218,12 +5229,12 @@
+ 
+     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
+     echo $ac_n "checking for remove""... $ac_c" 1>&6
+-echo "configure:5222: checking for remove" >&5
++echo "configure:5233: 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 5227 "configure"
++#line 5238 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char remove(); below.  */
+@@ -5246,7 +5257,7 @@
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:5250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5261: \"$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
+@@ -5267,7 +5278,7 @@
+ 
+     if test $ac_cv_func_remove = no; then
+       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
+-echo "configure:5271: checking for remove in -lposix" >&5
++echo "configure:5282: 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
+@@ -5275,7 +5286,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lposix  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 5279 "configure"
++#line 5290 "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
+@@ -5286,7 +5297,7 @@
+ remove()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:5290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5301: \"$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
+@@ -5310,12 +5321,12 @@
+ 
+     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+     echo $ac_n "checking for shmat""... $ac_c" 1>&6
+-echo "configure:5314: checking for shmat" >&5
++echo "configure:5325: 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 5319 "configure"
++#line 5330 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char shmat(); below.  */
+@@ -5338,7 +5349,7 @@
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:5342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5353: \"$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
+@@ -5359,7 +5370,7 @@
+ 
+     if test $ac_cv_func_shmat = no; then
+       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
+-echo "configure:5363: checking for shmat in -lipc" >&5
++echo "configure:5374: 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
+@@ -5367,7 +5378,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lipc  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 5371 "configure"
++#line 5382 "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
+@@ -5378,7 +5389,7 @@
+ shmat()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:5382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5393: \"$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
+@@ -5411,7 +5422,7 @@
+   # 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:5415: checking for IceConnectionNumber in -lICE" >&5
++echo "configure:5426: 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
+@@ -5419,7 +5430,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lICE $X_EXTRA_LIBS $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 5423 "configure"
++#line 5434 "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
+@@ -5430,7 +5441,7 @@
+ IceConnectionNumber()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:5434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:5445: \"$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
+@@ -5913,7 +5924,7 @@
+     _USE_CPP_INCLUDE_FLAG=1
+ 
+     echo $ac_n "checking whether the compiler supports -Wno-invalid-offsetof""... $ac_c" 1>&6
+-echo "configure:5917: checking whether the compiler supports -Wno-invalid-offsetof" >&5
++echo "configure:5928: checking whether the compiler supports -Wno-invalid-offsetof" >&5
+ if eval "test \"`echo '$''{'ac_has_wno_invalid_offsetof'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -5929,14 +5940,14 @@
+             _SAVE_CXXFLAGS="$CXXFLAGS"
+             CXXFLAGS="$CXXFLAGS ${_COMPILER_PREFIX}-Wno-invalid-offsetof"
+             cat > conftest.$ac_ext <<EOF
+-#line 5933 "configure"
++#line 5944 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ return(0);
+ ; return 0; }
+ EOF
+-if { (eval echo configure:5940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:5951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_has_wno_invalid_offsetof="yes"
+ else
+@@ -5963,7 +5974,7 @@
+     fi
+ 
+     echo $ac_n "checking whether the compiler supports -Wno-variadic-macros""... $ac_c" 1>&6
+-echo "configure:5967: checking whether the compiler supports -Wno-variadic-macros" >&5
++echo "configure:5978: checking whether the compiler supports -Wno-variadic-macros" >&5
+ if eval "test \"`echo '$''{'ac_has_wno_variadic_macros'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -5979,14 +5990,14 @@
+             _SAVE_CXXFLAGS="$CXXFLAGS"
+             CXXFLAGS="$CXXFLAGS ${_COMPILER_PREFIX}-Wno-variadic-macros"
+             cat > conftest.$ac_ext <<EOF
+-#line 5983 "configure"
++#line 5994 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ return(0);
+ ; return 0; }
+ EOF
+-if { (eval echo configure:5990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:6001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_has_wno_variadic_macros="yes"
+ else
+@@ -6013,7 +6024,7 @@
+     fi
+ 
+     echo $ac_n "checking whether the compiler supports -Werror=return-type""... $ac_c" 1>&6
+-echo "configure:6017: checking whether the compiler supports -Werror=return-type" >&5
++echo "configure:6028: checking whether the compiler supports -Werror=return-type" >&5
+ if eval "test \"`echo '$''{'ac_has_werror_return_type'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -6029,14 +6040,14 @@
+             _SAVE_CXXFLAGS="$CXXFLAGS"
+             CXXFLAGS="$CXXFLAGS -Werror=return-type"
+             cat > conftest.$ac_ext <<EOF
+-#line 6033 "configure"
++#line 6044 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ return(0);
+ ; return 0; }
+ EOF
+-if { (eval echo configure:6040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:6051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_has_werror_return_type="yes"
+ else
+@@ -6072,7 +6083,7 @@
+ if test "$COMPILE_ENVIRONMENT"; then
+ if test "$GNU_CC"; then
+   echo $ac_n "checking whether ld has archive extraction flags""... $ac_c" 1>&6
+-echo "configure:6076: checking whether ld has archive extraction flags" >&5
++echo "configure:6087: 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
+@@ -6089,14 +6100,14 @@
+       LDFLAGS=$force
+       LIBS=$unforce
+       cat > conftest.$ac_ext <<EOF
+-#line 6093 "configure"
++#line 6104 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:6100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:6111: \"$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
+@@ -6129,7 +6140,7 @@
+ '
+ 
+ echo $ac_n "checking that static assertion macros used in autoconf tests work""... $ac_c" 1>&6
+-echo "configure:6133: checking that static assertion macros used in autoconf tests work" >&5
++echo "configure:6144: checking that static assertion macros used in autoconf tests work" >&5
+ if eval "test \"`echo '$''{'ac_cv_static_assertion_macros_work'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -6143,14 +6154,14 @@
+ 
+   ac_cv_static_assertion_macros_work="yes"
+   cat > conftest.$ac_ext <<EOF
+-#line 6147 "configure"
++#line 6158 "configure"
+ #include "confdefs.h"
+ $configure_static_assert_macros
+ int main() {
+ CONFIGURE_STATIC_ASSERT(1)
+ ; return 0; }
+ EOF
+-if { (eval echo configure:6154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:6165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   :
+ else
+   echo "configure: failed program was:" >&5
+@@ -6160,14 +6171,14 @@
+ fi
+ rm -f conftest*
+   cat > conftest.$ac_ext <<EOF
+-#line 6164 "configure"
++#line 6175 "configure"
+ #include "confdefs.h"
+ $configure_static_assert_macros
+ int main() {
+ CONFIGURE_STATIC_ASSERT(0)
+ ; return 0; }
+ EOF
+-if { (eval echo configure:6171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:6182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_static_assertion_macros_work="no"
+ else
+@@ -6183,14 +6194,14 @@
+ cross_compiling=$ac_cv_prog_cxx_cross
+ 
+   cat > conftest.$ac_ext <<EOF
+-#line 6187 "configure"
++#line 6198 "configure"
+ #include "confdefs.h"
+ $configure_static_assert_macros
+ int main() {
+ CONFIGURE_STATIC_ASSERT(1)
+ ; return 0; }
+ EOF
+-if { (eval echo configure:6194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:6205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   :
+ else
+   echo "configure: failed program was:" >&5
+@@ -6200,14 +6211,14 @@
+ fi
+ rm -f conftest*
+   cat > conftest.$ac_ext <<EOF
+-#line 6204 "configure"
++#line 6215 "configure"
+ #include "confdefs.h"
+ $configure_static_assert_macros
+ int main() {
+ CONFIGURE_STATIC_ASSERT(0)
+ ; return 0; }
+ EOF
+-if { (eval echo configure:6211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:6222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_static_assertion_macros_work="no"
+ else
+@@ -6241,16 +6252,16 @@
+ cross_compiling=$ac_cv_prog_cc_cross
+ 
+ echo $ac_n "checking for 64-bit OS""... $ac_c" 1>&6
+-echo "configure:6245: checking for 64-bit OS" >&5
++echo "configure:6256: checking for 64-bit OS" >&5
+ cat > conftest.$ac_ext <<EOF
+-#line 6247 "configure"
++#line 6258 "configure"
+ #include "confdefs.h"
+ $configure_static_assert_macros
+ int main() {
+ CONFIGURE_STATIC_ASSERT(sizeof(void*) == 8)
+ ; return 0; }
+ EOF
+-if { (eval echo configure:6254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:6265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   result="yes"
+ else
+@@ -6389,7 +6400,7 @@
+ esac
+ 
+ echo $ac_n "checking for Python version >= $PYTHON_VERSION but not 3.x""... $ac_c" 1>&6
+-echo "configure:6393: checking for Python version >= $PYTHON_VERSION but not 3.x" >&5
++echo "configure:6404: checking for Python version >= $PYTHON_VERSION but not 3.x" >&5
+ 
+ $PYTHON -c "import sys; sys.exit(sys.version[:3] < sys.argv[1] or sys.version[:2] != '2.')" $PYTHON_VERSION
+ _python_res=$?
+@@ -6437,9 +6448,9 @@
+ cross_compiling=$ac_cv_prog_cxx_cross
+ 
+             echo $ac_n "checking for IBM XLC/C++ compiler version >= 9.0.0.7""... $ac_c" 1>&6
+-echo "configure:6441: checking for IBM XLC/C++ compiler version >= 9.0.0.7" >&5
++echo "configure:6452: checking for IBM XLC/C++ compiler version >= 9.0.0.7" >&5
+             cat > conftest.$ac_ext <<EOF
+-#line 6443 "configure"
++#line 6454 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+@@ -6448,7 +6459,7 @@
+                  #endif
+ ; return 0; }
+ EOF
+-if { (eval echo configure:6452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:6463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   _BAD_COMPILER=
+ else
+@@ -6486,17 +6497,17 @@
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:6490: checking for $ac_hdr" >&5
++echo "configure:6501: 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 6495 "configure"
++#line 6506 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:6500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:6511: \"$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*
+@@ -6542,7 +6553,7 @@
+     LIBS="$LIBS -lbe"
+     if test "$COMPILE_ENVIRONMENT"; then
+         echo $ac_n "checking for main in -lbind""... $ac_c" 1>&6
+-echo "configure:6546: checking for main in -lbind" >&5
++echo "configure:6557: 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
+@@ -6550,14 +6561,14 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lbind  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 6554 "configure"
++#line 6565 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ main()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:6561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:6572: \"$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
+@@ -6578,7 +6589,7 @@
+ fi
+ 
+         echo $ac_n "checking for main in -lzeta""... $ac_c" 1>&6
+-echo "configure:6582: checking for main in -lzeta" >&5
++echo "configure:6593: checking for main in -lzeta" >&5
+ ac_lib_var=`echo zeta'_'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
+@@ -6586,14 +6597,14 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lzeta  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 6590 "configure"
++#line 6601 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ main()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:6597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:6608: \"$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
+@@ -6667,18 +6678,18 @@
+         echo "Skipping -dead_strip because DTrace is enabled. See bug 403132."
+     else
+                 echo $ac_n "checking for -dead_strip option to ld""... $ac_c" 1>&6
+-echo "configure:6671: checking for -dead_strip option to ld" >&5
++echo "configure:6682: checking for -dead_strip option to ld" >&5
+         _SAVE_LDFLAGS=$LDFLAGS
+         LDFLAGS="$LDFLAGS -Wl,-dead_strip"
+         cat > conftest.$ac_ext <<EOF
+-#line 6675 "configure"
++#line 6686 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ return 0;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:6682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:6693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   _HAVE_DEAD_STRIP=1
+ else
+@@ -7250,17 +7261,17 @@
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:7254: checking for $ac_hdr" >&5
++echo "configure:7265: 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 7259 "configure"
++#line 7270 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:7264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:7275: \"$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*
+@@ -7492,19 +7503,19 @@
+     _DEFINES_CXXFLAGS="$_DEFINES_CXXFLAGS -Uunix -U__unix -U__unix__"
+ 
+     echo $ac_n "checking for __declspec(dllexport)""... $ac_c" 1>&6
+-echo "configure:7496: checking for __declspec(dllexport)" >&5
++echo "configure:7507: checking for __declspec(dllexport)" >&5
+ if eval "test \"`echo '$''{'ac_os2_declspec'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 7501 "configure"
++#line 7512 "configure"
+ #include "confdefs.h"
+ __declspec(dllexport) void ac_os2_declspec(void) {}
+ int main() {
+ return 0;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:7508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:7519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_os2_declspec="yes"
+ else
+@@ -7625,14 +7636,14 @@
+            _SAVE_LDFLAGS=$LDFLAGS
+            LDFLAGS="-M /usr/lib/ld/map.noexstk $LDFLAGS" 
+            cat > conftest.$ac_ext <<EOF
+-#line 7629 "configure"
++#line 7640 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ int main() {
+ printf("Hello World\n");
+ ; return 0; }
+ EOF
+-if { (eval echo configure:7636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:7647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   :
+ else
+   echo "configure: failed program was:" >&5
+@@ -7661,7 +7672,7 @@
+        CC_VERSION=`$CC -V 2>&1 | grep '^cc:' 2>/dev/null | $AWK -F\: '{ print $2 }'`
+        CXX_VERSION=`$CXX -V 2>&1 | grep '^CC:' 2>/dev/null | $AWK -F\: '{ print $2 }'`
+        echo $ac_n "checking for Sun C++ compiler version >= 5.9""... $ac_c" 1>&6
+-echo "configure:7665: checking for Sun C++ compiler version >= 5.9" >&5
++echo "configure:7676: checking for Sun C++ compiler version >= 5.9" >&5
+        
+        ac_ext=C
+ # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+@@ -7671,7 +7682,7 @@
+ cross_compiling=$ac_cv_prog_cxx_cross
+ 
+        cat > conftest.$ac_ext <<EOF
+-#line 7675 "configure"
++#line 7686 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+@@ -7680,7 +7691,7 @@
+            #endif
+ ; return 0; }
+ EOF
+-if { (eval echo configure:7684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:7695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   _BAD_COMPILER=
+ else
+@@ -7697,7 +7708,7 @@
+            _res="yes"
+        fi
+        cat > conftest.$ac_ext <<EOF
+-#line 7701 "configure"
++#line 7712 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+@@ -7706,7 +7717,7 @@
+            #endif
+ ; return 0; }
+ EOF
+-if { (eval echo configure:7710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:7721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   _ABOVE_SS12U1=
+ else
+@@ -8122,12 +8133,12 @@
+ 
+ if test -z "$SKIP_COMPILER_CHECKS"; then
+ echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+-echo "configure:8126: checking for ANSI C header files" >&5
++echo "configure:8137: 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 8131 "configure"
++#line 8142 "configure"
+ #include "confdefs.h"
+ #include <stdlib.h>
+ #include <stdarg.h>
+@@ -8135,7 +8146,7 @@
+ #include <float.h>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:8139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:8150: \"$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*
+@@ -8152,7 +8163,7 @@
+ 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 8156 "configure"
++#line 8167 "configure"
+ #include "confdefs.h"
+ #include <string.h>
+ EOF
+@@ -8170,7 +8181,7 @@
+ 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 8174 "configure"
++#line 8185 "configure"
+ #include "confdefs.h"
+ #include <stdlib.h>
+ EOF
+@@ -8191,7 +8202,7 @@
+   :
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 8195 "configure"
++#line 8206 "configure"
+ #include "confdefs.h"
+ #include <ctype.h>
+ #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+@@ -8202,7 +8213,7 @@
+ exit (0); }
+ 
+ EOF
+-if { (eval echo configure:8206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:8217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+   :
+ else
+@@ -8226,12 +8237,12 @@
+ fi
+ 
+ echo $ac_n "checking for working const""... $ac_c" 1>&6
+-echo "configure:8230: checking for working const" >&5
++echo "configure:8241: 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 8235 "configure"
++#line 8246 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+@@ -8280,7 +8291,7 @@
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:8295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_c_const=yes
+ else
+@@ -8301,12 +8312,12 @@
+ fi
+ 
+ echo $ac_n "checking for mode_t""... $ac_c" 1>&6
+-echo "configure:8305: checking for mode_t" >&5
++echo "configure:8316: 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 8310 "configure"
++#line 8321 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #if STDC_HEADERS
+@@ -8334,12 +8345,12 @@
+ fi
+ 
+ echo $ac_n "checking for off_t""... $ac_c" 1>&6
+-echo "configure:8338: checking for off_t" >&5
++echo "configure:8349: 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 8343 "configure"
++#line 8354 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #if STDC_HEADERS
+@@ -8367,12 +8378,12 @@
+ fi
+ 
+ echo $ac_n "checking for pid_t""... $ac_c" 1>&6
+-echo "configure:8371: checking for pid_t" >&5
++echo "configure:8382: 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 8376 "configure"
++#line 8387 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #if STDC_HEADERS
+@@ -8400,12 +8411,12 @@
+ fi
+ 
+ echo $ac_n "checking for size_t""... $ac_c" 1>&6
+-echo "configure:8404: checking for size_t" >&5
++echo "configure:8415: 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 8409 "configure"
++#line 8420 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #if STDC_HEADERS
+@@ -8440,12 +8451,12 @@
+ cross_compiling=$ac_cv_prog_cxx_cross
+ 
+ echo $ac_n "checking for __stdcall""... $ac_c" 1>&6
+-echo "configure:8444: checking for __stdcall" >&5
++echo "configure:8455: checking for __stdcall" >&5
+ if eval "test \"`echo '$''{'ac_cv___stdcall'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 8449 "configure"
++#line 8460 "configure"
+ #include "confdefs.h"
+ template <typename Method> struct foo;
+                   template <> struct foo<void (*)()> {};
+@@ -8454,7 +8465,7 @@
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:8469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv___stdcall=true
+ else
+@@ -8483,12 +8494,12 @@
+ cross_compiling=$ac_cv_prog_cc_cross
+ 
+ echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
+-echo "configure:8487: checking for ssize_t" >&5
++echo "configure:8498: checking for ssize_t" >&5
+ if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 8492 "configure"
++#line 8503 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+                   #include <sys/types.h>
+@@ -8496,7 +8507,7 @@
+ ssize_t foo = 0;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:8511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_type_ssize_t=true
+ else
+@@ -8518,12 +8529,12 @@
+   echo "$ac_t""no" 1>&6
+ fi
+ echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
+-echo "configure:8522: checking for st_blksize in struct stat" >&5
++echo "configure:8533: 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 8527 "configure"
++#line 8538 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -8531,7 +8542,7 @@
+ struct stat s; s.st_blksize;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:8546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_struct_st_blksize=yes
+ else
+@@ -8552,12 +8563,12 @@
+ fi
+ 
+ echo $ac_n "checking for siginfo_t""... $ac_c" 1>&6
+-echo "configure:8556: checking for siginfo_t" >&5
++echo "configure:8567: checking for siginfo_t" >&5
+ if eval "test \"`echo '$''{'ac_cv_siginfo_t'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 8561 "configure"
++#line 8572 "configure"
+ #include "confdefs.h"
+ #define _POSIX_C_SOURCE 199506L
+                   #include <signal.h>
+@@ -8565,7 +8576,7 @@
+ siginfo_t* info;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:8580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_siginfo_t=true
+ else
+@@ -8590,17 +8601,17 @@
+ 
+ ac_safe=`echo "stdint.h" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for stdint.h""... $ac_c" 1>&6
+-echo "configure:8594: checking for stdint.h" >&5
++echo "configure:8605: checking for stdint.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 8599 "configure"
++#line 8610 "configure"
+ #include "confdefs.h"
+ #include <stdint.h>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:8604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:8615: \"$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*
+@@ -8629,7 +8640,7 @@
+ else
+                     
+ echo $ac_n "checking for a 1-byte type""... $ac_c" 1>&6
+-echo "configure:8633: checking for a 1-byte type" >&5
++echo "configure:8644: checking for a 1-byte type" >&5
+ if eval "test \"`echo '$''{'moz_cv_n_byte_type_JS_INT8_TYPE'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -8637,7 +8648,7 @@
+   moz_cv_n_byte_type_JS_INT8_TYPE=
+   for type in char; do
+     cat > conftest.$ac_ext <<EOF
+-#line 8641 "configure"
++#line 8652 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+@@ -8647,7 +8658,7 @@
+                    
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:8662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   moz_cv_n_byte_type_JS_INT8_TYPE=$type; break
+ else
+@@ -8670,7 +8681,7 @@
+ 
+     
+ echo $ac_n "checking for a 2-byte type""... $ac_c" 1>&6
+-echo "configure:8674: checking for a 2-byte type" >&5
++echo "configure:8685: checking for a 2-byte type" >&5
+ if eval "test \"`echo '$''{'moz_cv_n_byte_type_JS_INT16_TYPE'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -8678,7 +8689,7 @@
+   moz_cv_n_byte_type_JS_INT16_TYPE=
+   for type in short int long; do
+     cat > conftest.$ac_ext <<EOF
+-#line 8682 "configure"
++#line 8693 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+@@ -8688,7 +8699,7 @@
+                    
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:8703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   moz_cv_n_byte_type_JS_INT16_TYPE=$type; break
+ else
+@@ -8711,7 +8722,7 @@
+ 
+     
+ echo $ac_n "checking for a 4-byte type""... $ac_c" 1>&6
+-echo "configure:8715: checking for a 4-byte type" >&5
++echo "configure:8726: checking for a 4-byte type" >&5
+ if eval "test \"`echo '$''{'moz_cv_n_byte_type_JS_INT32_TYPE'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -8719,7 +8730,7 @@
+   moz_cv_n_byte_type_JS_INT32_TYPE=
+   for type in int long 'long long' short; do
+     cat > conftest.$ac_ext <<EOF
+-#line 8723 "configure"
++#line 8734 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+@@ -8729,7 +8740,7 @@
+                    
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:8744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   moz_cv_n_byte_type_JS_INT32_TYPE=$type; break
+ else
+@@ -8752,7 +8763,7 @@
+ 
+     
+ echo $ac_n "checking for a 8-byte type""... $ac_c" 1>&6
+-echo "configure:8756: checking for a 8-byte type" >&5
++echo "configure:8767: checking for a 8-byte type" >&5
+ if eval "test \"`echo '$''{'moz_cv_n_byte_type_JS_INT64_TYPE'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -8760,7 +8771,7 @@
+   moz_cv_n_byte_type_JS_INT64_TYPE=
+   for type in int long 'long long'; do
+     cat > conftest.$ac_ext <<EOF
+-#line 8764 "configure"
++#line 8775 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+@@ -8770,7 +8781,7 @@
+                    
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:8785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   moz_cv_n_byte_type_JS_INT64_TYPE=$type; break
+ else
+@@ -8793,7 +8804,7 @@
+ 
+     
+ echo $ac_n "checking for a sizeof (void *)-byte type""... $ac_c" 1>&6
+-echo "configure:8797: checking for a sizeof (void *)-byte type" >&5
++echo "configure:8808: checking for a sizeof (void *)-byte type" >&5
+ if eval "test \"`echo '$''{'moz_cv_n_byte_type_JS_INTPTR_TYPE'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -8801,7 +8812,7 @@
+   moz_cv_n_byte_type_JS_INTPTR_TYPE=
+   for type in int long 'long long' short; do
+     cat > conftest.$ac_ext <<EOF
+-#line 8805 "configure"
++#line 8816 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+@@ -8811,7 +8822,7 @@
+                    
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:8826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   moz_cv_n_byte_type_JS_INTPTR_TYPE=$type; break
+ else
+@@ -8836,7 +8847,7 @@
+ 
+ 
+ echo $ac_n "checking for the size of void*""... $ac_c" 1>&6
+-echo "configure:8840: checking for the size of void*" >&5
++echo "configure:8851: checking for the size of void*" >&5
+ if eval "test \"`echo '$''{'moz_cv_size_of_JS_BYTES_PER_WORD'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -8844,7 +8855,7 @@
+   moz_cv_size_of_JS_BYTES_PER_WORD=
+   for size in 4 8; do
+     cat > conftest.$ac_ext <<EOF
+-#line 8848 "configure"
++#line 8859 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+@@ -8854,7 +8865,7 @@
+                    
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:8869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   moz_cv_size_of_JS_BYTES_PER_WORD=$size; break
+ else
+@@ -8891,7 +8902,7 @@
+ 
+ 
+ echo $ac_n "checking for the alignment of void*""... $ac_c" 1>&6
+-echo "configure:8895: checking for the alignment of void*" >&5
++echo "configure:8906: checking for the alignment of void*" >&5
+ if eval "test \"`echo '$''{'moz_cv_align_of_JS_ALIGN_OF_POINTER'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -8899,7 +8910,7 @@
+   moz_cv_align_of_JS_ALIGN_OF_POINTER=
+   for align in 2 4 8 16; do
+     cat > conftest.$ac_ext <<EOF
+-#line 8903 "configure"
++#line 8914 "configure"
+ #include "confdefs.h"
+ 
+                      #include <stddef.h>
+@@ -8912,7 +8923,7 @@
+                    
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:8927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   moz_cv_align_of_JS_ALIGN_OF_POINTER=$align; break
+ else
+@@ -8935,7 +8946,7 @@
+ 
+ 
+ echo $ac_n "checking for the size of double""... $ac_c" 1>&6
+-echo "configure:8939: checking for the size of double" >&5
++echo "configure:8950: checking for the size of double" >&5
+ if eval "test \"`echo '$''{'moz_cv_size_of_JS_BYTES_PER_DOUBLE'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -8943,7 +8954,7 @@
+   moz_cv_size_of_JS_BYTES_PER_DOUBLE=
+   for size in 6 8 10 12 14; do
+     cat > conftest.$ac_ext <<EOF
+-#line 8947 "configure"
++#line 8958 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+@@ -8953,7 +8964,7 @@
+                    
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:8968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   moz_cv_size_of_JS_BYTES_PER_DOUBLE=$size; break
+ else
+@@ -8976,12 +8987,12 @@
+ 
+ 
+ echo $ac_n "checking for int16_t""... $ac_c" 1>&6
+-echo "configure:8980: checking for int16_t" >&5
++echo "configure:8991: 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 8985 "configure"
++#line 8996 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+                   #include <sys/types.h>
+@@ -8989,7 +9000,7 @@
+ int16_t foo = 0;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:8993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:9004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_int16_t=true
+ else
+@@ -9011,12 +9022,12 @@
+   echo "$ac_t""no" 1>&6
+ fi
+ echo $ac_n "checking for int32_t""... $ac_c" 1>&6
+-echo "configure:9015: checking for int32_t" >&5
++echo "configure:9026: 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 9020 "configure"
++#line 9031 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+                   #include <sys/types.h>
+@@ -9024,7 +9035,7 @@
+ int32_t foo = 0;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:9028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:9039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_int32_t=true
+ else
+@@ -9046,12 +9057,12 @@
+   echo "$ac_t""no" 1>&6
+ fi
+ echo $ac_n "checking for int64_t""... $ac_c" 1>&6
+-echo "configure:9050: checking for int64_t" >&5
++echo "configure:9061: 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 9055 "configure"
++#line 9066 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+                   #include <sys/types.h>
+@@ -9059,7 +9070,7 @@
+ int64_t foo = 0;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:9063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:9074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_int64_t=true
+ else
+@@ -9081,12 +9092,12 @@
+   echo "$ac_t""no" 1>&6
+ fi
+ echo $ac_n "checking for int64""... $ac_c" 1>&6
+-echo "configure:9085: checking for int64" >&5
++echo "configure:9096: 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 9090 "configure"
++#line 9101 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+                   #include <sys/types.h>
+@@ -9094,7 +9105,7 @@
+ int64 foo = 0;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:9098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:9109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_int64=true
+ else
+@@ -9116,12 +9127,12 @@
+   echo "$ac_t""no" 1>&6
+ fi
+ echo $ac_n "checking for uint""... $ac_c" 1>&6
+-echo "configure:9120: checking for uint" >&5
++echo "configure:9131: 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 9125 "configure"
++#line 9136 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+                   #include <sys/types.h>
+@@ -9129,7 +9140,7 @@
+ uint foo = 0;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:9133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:9144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_uint=true
+ else
+@@ -9151,12 +9162,12 @@
+   echo "$ac_t""no" 1>&6
+ fi
+ echo $ac_n "checking for uint_t""... $ac_c" 1>&6
+-echo "configure:9155: checking for uint_t" >&5
++echo "configure:9166: 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 9160 "configure"
++#line 9171 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+                   #include <sys/types.h>
+@@ -9164,7 +9175,7 @@
+ uint_t foo = 0;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:9168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:9179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_uint_t=true
+ else
+@@ -9186,12 +9197,12 @@
+   echo "$ac_t""no" 1>&6
+ fi
+ echo $ac_n "checking for uint16_t""... $ac_c" 1>&6
+-echo "configure:9190: checking for uint16_t" >&5
++echo "configure:9201: 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 9195 "configure"
++#line 9206 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+                   #include <sys/types.h>
+@@ -9199,7 +9210,7 @@
+ uint16_t foo = 0;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:9203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:9214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_uint16_t=true
+ else
+@@ -9230,12 +9241,12 @@
+ 
+ 
+ echo $ac_n "checking for uname.domainname""... $ac_c" 1>&6
+-echo "configure:9234: checking for uname.domainname" >&5
++echo "configure:9245: 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 9239 "configure"
++#line 9250 "configure"
+ #include "confdefs.h"
+ #include <sys/utsname.h>
+ int main() {
+@@ -9243,7 +9254,7 @@
+             (void)uname(res);  if (res != 0) { domain = res->domainname; } 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:9247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:9258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_have_uname_domainname_field=true
+ else
+@@ -9267,12 +9278,12 @@
+ fi
+ 
+ echo $ac_n "checking for uname.__domainname""... $ac_c" 1>&6
+-echo "configure:9271: checking for uname.__domainname" >&5
++echo "configure:9282: 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 9276 "configure"
++#line 9287 "configure"
+ #include "confdefs.h"
+ #include <sys/utsname.h>
+ int main() {
+@@ -9280,7 +9291,7 @@
+             (void)uname(res);  if (res != 0) { domain = res->__domainname; } 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:9284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:9295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_have_uname_us_domainname_field=true
+ else
+@@ -9313,7 +9324,7 @@
+ 
+ if test "$GNU_CC"; then
+   echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6
+-echo "configure:9317: checking for visibility(hidden) attribute" >&5
++echo "configure:9328: checking for visibility(hidden) attribute" >&5
+ if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -9338,7 +9349,7 @@
+ 
+ 
+     echo $ac_n "checking for visibility(default) attribute""... $ac_c" 1>&6
+-echo "configure:9342: checking for visibility(default) attribute" >&5
++echo "configure:9353: checking for visibility(default) attribute" >&5
+ if eval "test \"`echo '$''{'ac_cv_visibility_default'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -9363,7 +9374,7 @@
+ 
+ 
+       echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6
+-echo "configure:9367: checking for visibility pragma support" >&5
++echo "configure:9378: checking for visibility pragma support" >&5
+ if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -9388,7 +9399,7 @@
+ echo "$ac_t""$ac_cv_visibility_pragma" 1>&6
+       if test "$ac_cv_visibility_pragma" = "yes"; then
+         echo $ac_n "checking For gcc visibility bug with class-level attributes (GCC bug 26905)""... $ac_c" 1>&6
+-echo "configure:9392: checking For gcc visibility bug with class-level attributes (GCC bug 26905)" >&5
++echo "configure:9403: checking For gcc visibility bug with class-level attributes (GCC bug 26905)" >&5
+ if eval "test \"`echo '$''{'ac_cv_have_visibility_class_bug'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -9416,7 +9427,7 @@
+ echo "$ac_t""$ac_cv_have_visibility_class_bug" 1>&6
+ 
+         echo $ac_n "checking For x86_64 gcc visibility bug with builtins (GCC bug 20297)""... $ac_c" 1>&6
+-echo "configure:9420: checking For x86_64 gcc visibility bug with builtins (GCC bug 20297)" >&5
++echo "configure:9431: checking For x86_64 gcc visibility bug with builtins (GCC bug 20297)" >&5
+ if eval "test \"`echo '$''{'ac_cv_have_visibility_builtin_bug'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -9470,19 +9481,19 @@
+   CFLAGS_save="${CFLAGS}"
+   CFLAGS="${CFLAGS} -Werror"
+   echo $ac_n "checking for __force_align_arg_pointer__ attribute""... $ac_c" 1>&6
+-echo "configure:9474: checking for __force_align_arg_pointer__ attribute" >&5
++echo "configure:9485: checking for __force_align_arg_pointer__ attribute" >&5
+ if eval "test \"`echo '$''{'ac_cv_force_align_arg_pointer'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 9479 "configure"
++#line 9490 "configure"
+ #include "confdefs.h"
+ __attribute__ ((__force_align_arg_pointer__)) void test() {}
+ int main() {
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:9486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:9497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_force_align_arg_pointer="yes"
+ else
+@@ -9509,12 +9520,12 @@
+ 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:9513: checking for $ac_hdr that defines DIR" >&5
++echo "configure:9524: 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 9518 "configure"
++#line 9529 "configure"
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #include <$ac_hdr>
+@@ -9522,7 +9533,7 @@
+ DIR *dirp = 0;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:9526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:9537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   eval "ac_cv_header_dirent_$ac_safe=yes"
+ else
+@@ -9547,7 +9558,7 @@
+ # 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:9551: checking for opendir in -ldir" >&5
++echo "configure:9562: 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
+@@ -9555,7 +9566,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-ldir  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 9559 "configure"
++#line 9570 "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
+@@ -9566,7 +9577,7 @@
+ opendir()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:9570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:9581: \"$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
+@@ -9588,7 +9599,7 @@
+ 
+ else
+ echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
+-echo "configure:9592: checking for opendir in -lx" >&5
++echo "configure:9603: 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
+@@ -9596,7 +9607,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lx  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 9600 "configure"
++#line 9611 "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
+@@ -9607,7 +9618,7 @@
+ opendir()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:9611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:9622: \"$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
+@@ -9639,17 +9650,17 @@
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:9643: checking for $ac_hdr" >&5
++echo "configure:9654: 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 9648 "configure"
++#line 9659 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:9653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:9664: \"$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*
+@@ -9679,17 +9690,17 @@
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:9683: checking for $ac_hdr" >&5
++echo "configure:9694: 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 9688 "configure"
++#line 9699 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:9693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:9704: \"$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*
+@@ -9719,17 +9730,17 @@
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:9723: checking for $ac_hdr" >&5
++echo "configure:9734: 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 9728 "configure"
++#line 9739 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:9733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:9744: \"$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*
+@@ -9759,17 +9770,17 @@
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:9763: checking for $ac_hdr" >&5
++echo "configure:9774: 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 9768 "configure"
++#line 9779 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:9773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:9784: \"$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*
+@@ -9799,17 +9810,17 @@
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:9803: checking for $ac_hdr" >&5
++echo "configure:9814: 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 9808 "configure"
++#line 9819 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:9813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:9824: \"$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*
+@@ -9839,17 +9850,17 @@
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:9843: checking for $ac_hdr" >&5
++echo "configure:9854: 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 9848 "configure"
++#line 9859 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:9853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:9864: \"$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*
+@@ -9880,17 +9891,17 @@
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:9884: checking for $ac_hdr" >&5
++echo "configure:9895: 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 9889 "configure"
++#line 9900 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:9894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:9905: \"$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*
+@@ -9921,17 +9932,17 @@
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:9925: checking for $ac_hdr" >&5
++echo "configure:9936: 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 9930 "configure"
++#line 9941 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:9935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:9946: \"$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*
+@@ -9961,17 +9972,17 @@
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:9965: checking for $ac_hdr" >&5
++echo "configure:9976: 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 9970 "configure"
++#line 9981 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:9975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:9986: \"$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*
+@@ -10002,17 +10013,17 @@
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:10006: checking for $ac_hdr" >&5
++echo "configure:10017: 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 10011 "configure"
++#line 10022 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:10016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:10027: \"$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*
+@@ -10049,17 +10060,17 @@
+ NEW_H=new.h
+ ac_safe=`echo "new" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for new""... $ac_c" 1>&6
+-echo "configure:10053: checking for new" >&5
++echo "configure:10064: checking for new" >&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 10058 "configure"
++#line 10069 "configure"
+ #include "confdefs.h"
+ #include <new>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:10063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:10074: \"$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*
+@@ -10101,17 +10112,17 @@
+ if test "x$enable_dtrace" = "xyes"; then
+   ac_safe=`echo "sys/sdt.h" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for sys/sdt.h""... $ac_c" 1>&6
+-echo "configure:10105: checking for sys/sdt.h" >&5
++echo "configure:10116: checking for sys/sdt.h" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 10110 "configure"
++#line 10121 "configure"
+ #include "confdefs.h"
+ #include <sys/sdt.h>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:10115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:10126: \"$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*
+@@ -10151,17 +10162,17 @@
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:10155: checking for $ac_hdr" >&5
++echo "configure:10166: 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 10160 "configure"
++#line 10171 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:10165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:10176: \"$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*
+@@ -10192,17 +10203,17 @@
+ 
+ ac_safe=`echo "linux/perf_event.h" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for linux/perf_event.h""... $ac_c" 1>&6
+-echo "configure:10196: checking for linux/perf_event.h" >&5
++echo "configure:10207: checking for linux/perf_event.h" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 10201 "configure"
++#line 10212 "configure"
+ #include "confdefs.h"
+ #include <linux/perf_event.h>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:10206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:10217: \"$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*
+@@ -10230,7 +10241,7 @@
+ 	;;
+ *)
+ 	echo $ac_n "checking for gethostbyname_r in -lc_r""... $ac_c" 1>&6
+-echo "configure:10234: checking for gethostbyname_r in -lc_r" >&5
++echo "configure:10245: 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
+@@ -10238,7 +10249,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lc_r  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 10242 "configure"
++#line 10253 "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
+@@ -10249,7 +10260,7 @@
+ gethostbyname_r()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:10253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:10264: \"$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
+@@ -10289,14 +10300,14 @@
+ *)
+     
+ echo $ac_n "checking for library containing dlopen""... $ac_c" 1>&6
+-echo "configure:10293: checking for library containing dlopen" >&5
++echo "configure:10304: checking for library containing dlopen" >&5
+ if eval "test \"`echo '$''{'ac_cv_search_dlopen'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_func_search_save_LIBS="$LIBS"
+ ac_cv_search_dlopen="no"
+ cat > conftest.$ac_ext <<EOF
+-#line 10300 "configure"
++#line 10311 "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
+@@ -10307,7 +10318,7 @@
+ dlopen()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:10311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:10322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_cv_search_dlopen="none required"
+ else
+@@ -10318,7 +10329,7 @@
+ test "$ac_cv_search_dlopen" = "no" && for i in dl; do
+ LIBS="-l$i  $ac_func_search_save_LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 10322 "configure"
++#line 10333 "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
+@@ -10329,7 +10340,7 @@
+ dlopen()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:10333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:10344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_cv_search_dlopen="-l$i"
+ break
+@@ -10347,17 +10358,17 @@
+   test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS"
+   ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
+-echo "configure:10351: checking for dlfcn.h" >&5
++echo "configure:10362: checking for dlfcn.h" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 10356 "configure"
++#line 10367 "configure"
+ #include "confdefs.h"
+ #include <dlfcn.h>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:10361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:10372: \"$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*
+@@ -10392,12 +10403,12 @@
+ for ac_func in dladdr
+ do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+-echo "configure:10396: checking for $ac_func" >&5
++echo "configure:10407: 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 10401 "configure"
++#line 10412 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char $ac_func(); below.  */
+@@ -10420,7 +10431,7 @@
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:10424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:10435: \"$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
+@@ -10451,7 +10462,7 @@
+     case $target in
+     *-aix*)
+ 	echo $ac_n "checking for demangle in -lC_r""... $ac_c" 1>&6
+-echo "configure:10455: checking for demangle in -lC_r" >&5
++echo "configure:10466: 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
+@@ -10459,7 +10470,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lC_r  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 10463 "configure"
++#line 10474 "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
+@@ -10470,7 +10481,7 @@
+ demangle()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:10474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:10485: \"$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
+@@ -10500,7 +10511,7 @@
+ 	;;
+      *)
+ 	echo $ac_n "checking for demangle in -lC""... $ac_c" 1>&6
+-echo "configure:10504: checking for demangle in -lC" >&5
++echo "configure:10515: 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
+@@ -10508,7 +10519,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lC  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 10512 "configure"
++#line 10523 "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
+@@ -10519,7 +10530,7 @@
+ demangle()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:10523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:10534: \"$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
+@@ -10555,7 +10566,7 @@
+     ;;
+ *)
+     echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
+-echo "configure:10559: checking for socket in -lsocket" >&5
++echo "configure:10570: 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
+@@ -10563,7 +10574,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lsocket  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 10567 "configure"
++#line 10578 "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
+@@ -10574,7 +10585,7 @@
+ socket()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:10578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:10589: \"$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
+@@ -10604,16 +10615,16 @@
+ esac
+ 
+ echo $ac_n "checking for ARM SIMD support in compiler""... $ac_c" 1>&6
+-echo "configure:10608: checking for ARM SIMD support in compiler" >&5
++echo "configure:10619: checking for ARM SIMD support in compiler" >&5
+ cat > conftest.$ac_ext <<EOF
+-#line 10610 "configure"
++#line 10621 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ asm("uqadd8 r1, r1, r2");
+ ; return 0; }
+ EOF
+-if { (eval echo configure:10617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:10628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   result="yes"
+ else
+@@ -10634,21 +10645,21 @@
+ 
+ 
+ echo $ac_n "checking for ARM NEON support in compiler""... $ac_c" 1>&6
+-echo "configure:10638: checking for ARM NEON support in compiler" >&5
++echo "configure:10649: checking for ARM NEON support in compiler" >&5
+ _SAVE_CFLAGS="$CFLAGS"
+ if test "$GNU_CC"; then
+   # gcc needs -mfpu=neon to recognize NEON instructions
+   CFLAGS="$CFLAGS -mfpu=neon -mfloat-abi=softfp"
+ fi
+ cat > conftest.$ac_ext <<EOF
+-#line 10645 "configure"
++#line 10656 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ asm("vadd.i8 d0, d0, d0");
+ ; return 0; }
+ EOF
+-if { (eval echo configure:10652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:10663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   result="yes"
+ else
+@@ -10676,7 +10687,7 @@
+ *)
+     
+ echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
+-echo "configure:10680: checking for pthread_create in -lpthreads" >&5
++echo "configure:10691: checking for pthread_create in -lpthreads" >&5
+ echo "
+     #include <pthread.h>
+     #include <stdlib.h>
+@@ -10699,7 +10710,7 @@
+         echo "$ac_t""no" 1>&6
+         
+ echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
+-echo "configure:10703: checking for pthread_create in -lpthread" >&5
++echo "configure:10714: checking for pthread_create in -lpthread" >&5
+ echo "
+     #include <pthread.h>
+     #include <stdlib.h>
+@@ -10722,7 +10733,7 @@
+         echo "$ac_t""no" 1>&6
+         
+ echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
+-echo "configure:10726: checking for pthread_create in -lc_r" >&5
++echo "configure:10737: checking for pthread_create in -lc_r" >&5
+ echo "
+     #include <pthread.h>
+     #include <stdlib.h>
+@@ -10745,7 +10756,7 @@
+         echo "$ac_t""no" 1>&6
+         
+ echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
+-echo "configure:10749: checking for pthread_create in -lc" >&5
++echo "configure:10760: checking for pthread_create in -lc" >&5
+ echo "
+     #include <pthread.h>
+     #include <stdlib.h>
+@@ -10804,7 +10815,7 @@
+ 				rm -f conftest*
+ 	ac_cv_have_dash_pthread=no
+ 	echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
+-echo "configure:10808: checking whether ${CC-cc} accepts -pthread" >&5
++echo "configure:10819: 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
+@@ -10827,7 +10838,7 @@
+ 			    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:10831: checking whether ${CC-cc} accepts -pthreads" >&5
++echo "configure:10842: 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
+@@ -10922,7 +10933,7 @@
+ fi
+ 
+ echo $ac_n "checking whether mmap() sees write()s""... $ac_c" 1>&6
+-echo "configure:10926: checking whether mmap() sees write()s" >&5
++echo "configure:10937: checking whether mmap() sees write()s" >&5
+ 
+ 
+ mmap_test_prog='
+@@ -10961,11 +10972,11 @@
+   result="yes"
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 10965 "configure"
++#line 10976 "configure"
+ #include "confdefs.h"
+ $mmap_test_prog 
+ EOF
+-if { (eval echo configure:10969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:10980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+   result="yes"
+ else
+@@ -10990,13 +11001,13 @@
+ 
+ if test $ac_cv_prog_gcc = yes; then
+     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
+-echo "configure:10994: checking whether ${CC-cc} needs -traditional" >&5
++echo "configure:11005: 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 11000 "configure"
++#line 11011 "configure"
+ #include "confdefs.h"
+ #include <sgtty.h>
+ Autoconf TIOCGETP
+@@ -11014,7 +11025,7 @@
+ 
+   if test $ac_cv_prog_gcc_traditional = no; then
+     cat > conftest.$ac_ext <<EOF
+-#line 11018 "configure"
++#line 11029 "configure"
+ #include "confdefs.h"
+ #include <termio.h>
+ Autoconf TCGETA
+@@ -11036,7 +11047,7 @@
+ fi
+ 
+ echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
+-echo "configure:11040: checking for 8-bit clean memcmp" >&5
++echo "configure:11051: 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
+@@ -11044,7 +11055,7 @@
+   ac_cv_func_memcmp_clean=no
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 11048 "configure"
++#line 11059 "configure"
+ #include "confdefs.h"
+ 
+ main()
+@@ -11054,7 +11065,7 @@
+ }
+ 
+ EOF
+-if { (eval echo configure:11058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:11069: \"$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
+@@ -11076,12 +11087,12 @@
+                 stat64 statvfs statvfs64 strerror strtok_r truncate64
+ do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+-echo "configure:11080: checking for $ac_func" >&5
++echo "configure:11091: 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 11085 "configure"
++#line 11096 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char $ac_func(); below.  */
+@@ -11104,7 +11115,7 @@
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:11108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:11119: \"$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
+@@ -11132,12 +11143,12 @@
+ _SAVE_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -lrt"
+ echo $ac_n "checking for clock_gettime(CLOCK_MONOTONIC) and -lrt""... $ac_c" 1>&6
+-echo "configure:11136: checking for clock_gettime(CLOCK_MONOTONIC) and -lrt" >&5
++echo "configure:11147: checking for clock_gettime(CLOCK_MONOTONIC) and -lrt" >&5
+ if eval "test \"`echo '$''{'ac_cv_have_clock_monotonic'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 11141 "configure"
++#line 11152 "configure"
+ #include "confdefs.h"
+ #include <time.h>
+ int main() {
+@@ -11145,7 +11156,7 @@
+                               clock_gettime(CLOCK_MONOTONIC, &ts); 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:11149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:11160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_cv_have_clock_monotonic=yes
+ else
+@@ -11171,14 +11182,14 @@
+ fi
+ 
+ cat > conftest.$ac_ext <<EOF
+-#line 11175 "configure"
++#line 11186 "configure"
+ #include "confdefs.h"
+ #include <windows.h>
+ int main() {
+ SYSTEMTIME st;FILETIME ft;SystemTimeToFileTime(&st,&ft);
+ ; return 0; }
+ EOF
+-if { (eval echo configure:11182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:11193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_cv_have_systemtimetofiletime="yes"
+ else
+@@ -11195,14 +11206,14 @@
+ 
+ fi
+ cat > conftest.$ac_ext <<EOF
+-#line 11199 "configure"
++#line 11210 "configure"
+ #include "confdefs.h"
+ #include <windows.h>
+ int main() {
+ FILETIME ft;GetSystemTimeAsFileTime(&ft);
+ ; return 0; }
+ EOF
+-if { (eval echo configure:11206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:11217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_cv_have_getsystemtimeasfiletime="yes"
+ else
+@@ -11229,19 +11240,19 @@
+ cross_compiling=$ac_cv_prog_cxx_cross
+ 
+ echo $ac_n "checking for wcrtomb""... $ac_c" 1>&6
+-echo "configure:11233: checking for wcrtomb" >&5
++echo "configure:11244: checking for wcrtomb" >&5
+ if eval "test \"`echo '$''{'ac_cv_have_wcrtomb'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 11238 "configure"
++#line 11249 "configure"
+ #include "confdefs.h"
+ #include <wchar.h>
+ int main() {
+ mbstate_t ps={0};wcrtomb(0,'f',&ps);
+ ; return 0; }
+ EOF
+-if { (eval echo configure:11245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:11256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_cv_have_wcrtomb="yes"
+ else
+@@ -11261,19 +11272,19 @@
+ 
+ fi
+ echo $ac_n "checking for mbrtowc""... $ac_c" 1>&6
+-echo "configure:11265: checking for mbrtowc" >&5
++echo "configure:11276: checking for mbrtowc" >&5
+ if eval "test \"`echo '$''{'ac_cv_have_mbrtowc'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 11270 "configure"
++#line 11281 "configure"
+ #include "confdefs.h"
+ #include <wchar.h>
+ int main() {
+ mbstate_t ps={0};mbrtowc(0,0,0,&ps);
+ ; return 0; }
+ EOF
+-if { (eval echo configure:11277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:11288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_cv_have_mbrtowc="yes"
+ else
+@@ -11302,12 +11313,12 @@
+ fi
+ 
+ echo $ac_n "checking for res_ninit()""... $ac_c" 1>&6
+-echo "configure:11306: checking for res_ninit()" >&5
++echo "configure:11317: checking for res_ninit()" >&5
+ if eval "test \"`echo '$''{'ac_cv_func_res_ninit'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 11311 "configure"
++#line 11322 "configure"
+ #include "confdefs.h"
+ 
+         #ifdef linux
+@@ -11319,7 +11330,7 @@
+ int foo = res_ninit(&_res);
+ ; return 0; }
+ EOF
+-if { (eval echo configure:11323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:11334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_cv_func_res_ninit=yes
+ else
+@@ -11349,12 +11360,12 @@
+ cross_compiling=$ac_cv_prog_cxx_cross
+ 
+ echo $ac_n "checking for gnu_get_libc_version()""... $ac_c" 1>&6
+-echo "configure:11353: checking for gnu_get_libc_version()" >&5
++echo "configure:11364: 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 11358 "configure"
++#line 11369 "configure"
+ #include "confdefs.h"
+ 
+         #ifdef HAVE_GNU_LIBC_VERSION_H
+@@ -11365,7 +11376,7 @@
+ const char *glibc_version = gnu_get_libc_version();
+ ; return 0; }
+ EOF
+-if { (eval echo configure:11369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:11380: \"$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
+@@ -11394,7 +11405,7 @@
+     *)
+     
+ echo $ac_n "checking for iconv in -lc""... $ac_c" 1>&6
+-echo "configure:11398: checking for iconv in -lc" >&5
++echo "configure:11409: checking for iconv in -lc" >&5
+ ac_lib_var=`echo c'_'iconv | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -11402,7 +11413,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lc  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 11406 "configure"
++#line 11417 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ #ifdef __cplusplus
+@@ -11416,7 +11427,7 @@
+ iconv()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:11420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++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
+@@ -11435,7 +11446,7 @@
+ else
+   echo "$ac_t""no" 1>&6
+ echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
+-echo "configure:11439: checking for iconv in -liconv" >&5
++echo "configure:11450: checking for iconv in -liconv" >&5
+ ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -11443,7 +11454,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-liconv  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 11447 "configure"
++#line 11458 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ #ifdef __cplusplus
+@@ -11457,7 +11468,7 @@
+ iconv()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:11461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:11472: \"$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
+@@ -11476,7 +11487,7 @@
+ else
+   echo "$ac_t""no" 1>&6
+ echo $ac_n "checking for libiconv in -liconv""... $ac_c" 1>&6
+-echo "configure:11480: checking for libiconv in -liconv" >&5
++echo "configure:11491: checking for libiconv in -liconv" >&5
+ ac_lib_var=`echo iconv'_'libiconv | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -11484,7 +11495,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-liconv  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 11488 "configure"
++#line 11499 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ #ifdef __cplusplus
+@@ -11498,7 +11509,7 @@
+ libiconv()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:11502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:11513: \"$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
+@@ -11525,12 +11536,12 @@
+ _SAVE_LIBS=$LIBS
+ LIBS="$LIBS $_ICONV_LIBS"
+ echo $ac_n "checking for iconv()""... $ac_c" 1>&6
+-echo "configure:11529: checking for iconv()" >&5
++echo "configure:11540: checking for iconv()" >&5
+ if eval "test \"`echo '$''{'ac_cv_func_iconv'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 11534 "configure"
++#line 11545 "configure"
+ #include "confdefs.h"
+ 
+         #include <stdlib.h>
+@@ -11544,7 +11555,7 @@
+         
+ ; return 0; }
+ EOF
+-if { (eval echo configure:11548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:11559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_cv_func_iconv=yes
+ else
+@@ -11568,12 +11579,12 @@
+     LIBXUL_LIBS="$LIBXUL_LIBS $_ICONV_LIBS"
+     LIBICONV="$_ICONV_LIBS"
+     echo $ac_n "checking for iconv() with const input""... $ac_c" 1>&6
+-echo "configure:11572: checking for iconv() with const input" >&5
++echo "configure:11583: checking for iconv() with const input" >&5
+ if eval "test \"`echo '$''{'ac_cv_func_const_iconv'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 11577 "configure"
++#line 11588 "configure"
+ #include "confdefs.h"
+ 
+             #include <stdlib.h>
+@@ -11588,7 +11599,7 @@
+             
+ ; return 0; }
+ EOF
+-if { (eval echo configure:11592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:11603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_func_const_iconv=yes
+ else
+@@ -11624,7 +11635,7 @@
+ 
+ 
+ echo $ac_n "checking for an implementation of va_copy()""... $ac_c" 1>&6
+-echo "configure:11628: checking for an implementation of va_copy()" >&5
++echo "configure:11639: checking for an implementation of va_copy()" >&5
+ if eval "test \"`echo '$''{'ac_cv_va_copy'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -11634,7 +11645,7 @@
+     
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 11638 "configure"
++#line 11649 "configure"
+ #include "confdefs.h"
+ 
+         #include <stdarg.h>
+@@ -11648,7 +11659,7 @@
+         }
+         int main() { f (0, 42); return 0; }
+ EOF
+-if { (eval echo configure:11652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:11663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+   ac_cv_va_copy=yes
+ else
+@@ -11665,7 +11676,7 @@
+ 
+ echo "$ac_t""$ac_cv_va_copy" 1>&6
+ echo $ac_n "checking for an implementation of __va_copy()""... $ac_c" 1>&6
+-echo "configure:11669: checking for an implementation of __va_copy()" >&5
++echo "configure:11680: checking for an implementation of __va_copy()" >&5
+ if eval "test \"`echo '$''{'ac_cv___va_copy'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -11675,7 +11686,7 @@
+     
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 11679 "configure"
++#line 11690 "configure"
+ #include "confdefs.h"
+ 
+         #include <stdarg.h>
+@@ -11689,7 +11700,7 @@
+         }
+         int main() { f (0, 42); return 0; }
+ EOF
+-if { (eval echo configure:11693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:11704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+   ac_cv___va_copy=yes
+ else
+@@ -11706,7 +11717,7 @@
+ 
+ echo "$ac_t""$ac_cv___va_copy" 1>&6
+ echo $ac_n "checking whether va_lists can be copied by value""... $ac_c" 1>&6
+-echo "configure:11710: checking whether va_lists can be copied by value" >&5
++echo "configure:11721: checking whether va_lists can be copied by value" >&5
+ if eval "test \"`echo '$''{'ac_cv_va_val_copy'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -11716,7 +11727,7 @@
+     
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 11720 "configure"
++#line 11731 "configure"
+ #include "confdefs.h"
+ 
+         #include <stdarg.h>
+@@ -11730,7 +11741,7 @@
+         }
+         int main() { f (0, 42); return 0; }
+ EOF
+-if { (eval echo configure:11734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:11745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+   ac_cv_va_val_copy=yes
+ else
+@@ -11839,12 +11850,12 @@
+ if test "$GNU_CC"; then
+   if test "$CPU_ARCH" = "arm" ; then
+     echo $ac_n "checking for ARM EABI""... $ac_c" 1>&6
+-echo "configure:11843: checking for ARM EABI" >&5
++echo "configure:11854: checking for ARM EABI" >&5
+ if eval "test \"`echo '$''{'ac_cv_gcc_arm_eabi'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 11848 "configure"
++#line 11859 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+@@ -11857,7 +11868,7 @@
+                         
+ ; return 0; }
+ EOF
+-if { (eval echo configure:11861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:11872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_gcc_arm_eabi="yes"
+ else
+@@ -11879,12 +11890,12 @@
+   fi
+ 
+   echo $ac_n "checking for gcc 3.0 ABI""... $ac_c" 1>&6
+-echo "configure:11883: checking for gcc 3.0 ABI" >&5
++echo "configure:11894: 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 11888 "configure"
++#line 11899 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+@@ -11897,7 +11908,7 @@
+                       
+ ; return 0; }
+ EOF
+-if { (eval echo configure:11901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:11912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_gcc_three_abi="yes"
+ else
+@@ -11921,12 +11932,12 @@
+ 
+ 
+ echo $ac_n "checking for C++ \"explicit\" keyword""... $ac_c" 1>&6
+-echo "configure:11925: checking for C++ \"explicit\" keyword" >&5
++echo "configure:11936: 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 11930 "configure"
++#line 11941 "configure"
+ #include "confdefs.h"
+ class X {
+                                public: explicit X(int i) : i_(i) {}
+@@ -11936,7 +11947,7 @@
+ X x(3);
+ ; return 0; }
+ EOF
+-if { (eval echo configure:11940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:11951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_cpp_explicit=yes
+ else
+@@ -11957,12 +11968,12 @@
+ fi
+ 
+ echo $ac_n "checking for C++ \"typename\" keyword""... $ac_c" 1>&6
+-echo "configure:11961: checking for C++ \"typename\" keyword" >&5
++echo "configure:11972: checking for C++ \"typename\" keyword" >&5
+ if eval "test \"`echo '$''{'ac_cv_cpp_typename'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 11966 "configure"
++#line 11977 "configure"
+ #include "confdefs.h"
+ class param {
+                                public:
+@@ -11981,7 +11992,7 @@
+                                A.foo(0);
+ ; return 0; }
+ EOF
+-if { (eval echo configure:11985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:11996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_cpp_typename=yes
+ else
+@@ -12002,12 +12013,12 @@
+ fi
+ 
+ echo $ac_n "checking for modern C++ template specialization syntax support""... $ac_c" 1>&6
+-echo "configure:12006: checking for modern C++ template specialization syntax support" >&5
++echo "configure:12017: 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 12011 "configure"
++#line 12022 "configure"
+ #include "confdefs.h"
+ template <class T> struct X { int a; };
+                                class Y {};
+@@ -12017,7 +12028,7 @@
+                                X<Y> y_x;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:12021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:12032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_cpp_modern_specialize_template_syntax=yes
+ else
+@@ -12039,12 +12050,12 @@
+ 
+ 
+ echo $ac_n "checking whether partial template specialization works""... $ac_c" 1>&6
+-echo "configure:12043: checking whether partial template specialization works" >&5
++echo "configure:12054: 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 12048 "configure"
++#line 12059 "configure"
+ #include "confdefs.h"
+ template <class T> class Foo {};
+                                template <class T> class Foo<T*> {};
+@@ -12052,7 +12063,7 @@
+ return 0;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:12056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:12067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_cpp_partial_specialization=yes
+ else
+@@ -12073,12 +12084,12 @@
+ fi
+ 
+ echo $ac_n "checking whether operators must be re-defined for templates derived from templates""... $ac_c" 1>&6
+-echo "configure:12077: checking whether operators must be re-defined for templates derived from templates" >&5
++echo "configure:12088: 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 12082 "configure"
++#line 12093 "configure"
+ #include "confdefs.h"
+ template <class T> class Base { };
+                                 template <class T>
+@@ -12090,7 +12101,7 @@
+                                 return 0;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:12094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:12105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_need_derived_template_operators=no
+ else
+@@ -12112,12 +12123,12 @@
+ 
+ 
+ echo $ac_n "checking whether we need to cast a derived template to pass as its base class""... $ac_c" 1>&6
+-echo "configure:12116: checking whether we need to cast a derived template to pass as its base class" >&5
++echo "configure:12127: 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 12121 "configure"
++#line 12132 "configure"
+ #include "confdefs.h"
+ template <class T> class Base { };
+                                 template <class T> class Derived : public Base<T> { };
+@@ -12126,7 +12137,7 @@
+ Derived<char> bar; return foo(bar);
+ ; return 0; }
+ EOF
+-if { (eval echo configure:12130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:12141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_need_cpp_template_cast_to_base=no
+ else
+@@ -12147,12 +12158,12 @@
+ fi
+ 
+ echo $ac_n "checking whether the compiler can resolve const ambiguities for templates""... $ac_c" 1>&6
+-echo "configure:12151: checking whether the compiler can resolve const ambiguities for templates" >&5
++echo "configure:12162: 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 12156 "configure"
++#line 12167 "configure"
+ #include "confdefs.h"
+ 
+                                 template <class T> class ptrClass {
+@@ -12173,7 +12184,7 @@
+                                  a(&i); 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:12177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:12188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_can_resolve_const_ambiguity=yes
+ else
+@@ -12195,12 +12206,12 @@
+ 
+ 
+ echo $ac_n "checking whether the C++ \"using\" keyword can change access""... $ac_c" 1>&6
+-echo "configure:12199: checking whether the C++ \"using\" keyword can change access" >&5
++echo "configure:12210: checking whether the C++ \"using\" keyword can change access" >&5
+ if eval "test \"`echo '$''{'ac_cv_cpp_access_changing_using2'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 12204 "configure"
++#line 12215 "configure"
+ #include "confdefs.h"
+ class A { protected: int foo() { return 0; } };
+                    class B : public A { public: using A::foo; };
+@@ -12208,10 +12219,10 @@
+ B b; return b.foo();
+ ; return 0; }
+ EOF
+-if { (eval echo configure:12212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:12223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   cat > conftest.$ac_ext <<EOF
+-#line 12215 "configure"
++#line 12226 "configure"
+ #include "confdefs.h"
+ class A { public: int foo() { return 1; } };
+                        class B : public A { private: using A::foo; };
+@@ -12219,7 +12230,7 @@
+ B b; return b.foo();
+ ; return 0; }
+ EOF
+-if { (eval echo configure:12223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:12234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_cpp_access_changing_using2=no
+ else
+@@ -12247,12 +12258,12 @@
+ fi
+ 
+ echo $ac_n "checking whether the C++ \"using\" keyword resolves ambiguity""... $ac_c" 1>&6
+-echo "configure:12251: checking whether the C++ \"using\" keyword resolves ambiguity" >&5
++echo "configure:12262: 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 12256 "configure"
++#line 12267 "configure"
+ #include "confdefs.h"
+ class X { 
+                                  public: int go(const X&) {return 3;}
+@@ -12268,7 +12279,7 @@
+ X x; Y y; y.jo(x);
+ ; return 0; }
+ EOF
+-if { (eval echo configure:12272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:12283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_cpp_ambiguity_resolving_using=yes
+ else
+@@ -12289,19 +12300,19 @@
+ fi
+ 
+ echo $ac_n "checking for \"std::\" namespace""... $ac_c" 1>&6
+-echo "configure:12293: checking for \"std::\" namespace" >&5
++echo "configure:12304: 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 12298 "configure"
++#line 12309 "configure"
+ #include "confdefs.h"
+ #include <algorithm>
+ int main() {
+ return std::min(0, 1);
+ ; return 0; }
+ EOF
+-if { (eval echo configure:12305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:12316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_cpp_namespace_std=yes
+ else
+@@ -12322,12 +12333,12 @@
+ fi
+ 
+ echo $ac_n "checking whether standard template operator!=() is ambiguous""... $ac_c" 1>&6
+-echo "configure:12326: checking whether standard template operator!=() is ambiguous" >&5
++echo "configure:12337: 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 12331 "configure"
++#line 12342 "configure"
+ #include "confdefs.h"
+ #include <algorithm>
+                                 struct T1 {};
+@@ -12337,7 +12348,7 @@
+ T1 a,b; return a != b;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:12341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:12352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_cpp_unambiguous_std_notequal=unambiguous
+ else
+@@ -12359,12 +12370,12 @@
+ 
+ 
+ echo $ac_n "checking for C++ reinterpret_cast""... $ac_c" 1>&6
+-echo "configure:12363: checking for C++ reinterpret_cast" >&5
++echo "configure:12374: 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 12368 "configure"
++#line 12379 "configure"
+ #include "confdefs.h"
+ struct X { int i; };
+                                struct Y { int i; };
+@@ -12372,7 +12383,7 @@
+ X x; X*const z = &x;Y*y = reinterpret_cast<Y*>(z);
+ ; return 0; }
+ EOF
+-if { (eval echo configure:12376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:12387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_cpp_reinterpret_cast=yes
+ else
+@@ -12393,7 +12404,7 @@
+ fi
+ 
+ echo $ac_n "checking for C++ dynamic_cast to void*""... $ac_c" 1>&6
+-echo "configure:12397: checking for C++ dynamic_cast to void*" >&5
++echo "configure:12408: 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
+@@ -12401,7 +12412,7 @@
+   ac_cv_cpp_dynamic_cast_void_ptr=no
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 12405 "configure"
++#line 12416 "configure"
+ #include "confdefs.h"
+ #ifdef __cplusplus
+ extern "C" void exit(int);
+@@ -12420,7 +12431,7 @@
+                                            ((void*)&mdo == dynamic_cast<void*>(suby))));
+                             }
+ EOF
+-if { (eval echo configure:12424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:12435: \"$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
+@@ -12444,19 +12455,19 @@
+ 
+ 
+ echo $ac_n "checking whether C++ requires implementation of unused virtual methods""... $ac_c" 1>&6
+-echo "configure:12448: checking whether C++ requires implementation of unused virtual methods" >&5
++echo "configure:12459: 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 12453 "configure"
++#line 12464 "configure"
+ #include "confdefs.h"
+ class X {private: virtual void never_called();};
+ int main() {
+ X x;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:12460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:12471: \"$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
+@@ -12479,12 +12490,12 @@
+ 
+ 
+ echo $ac_n "checking for trouble comparing to zero near std::operator!=()""... $ac_c" 1>&6
+-echo "configure:12483: checking for trouble comparing to zero near std::operator!=()" >&5
++echo "configure:12494: 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 12488 "configure"
++#line 12499 "configure"
+ #include "confdefs.h"
+ #include <algorithm>
+                                 template <class T> class Foo {};
+@@ -12495,7 +12506,7 @@
+ Foo<int> f; return (0 != f);
+ ; return 0; }
+ EOF
+-if { (eval echo configure:12499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:12510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_trouble_comparing_to_zero=no
+ else
+@@ -12519,19 +12530,19 @@
+ _SAVE_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS $DSO_PIC_CFLAGS $DSO_LDOPTS"
+ echo $ac_n "checking for __thread keyword for TLS variables""... $ac_c" 1>&6
+-echo "configure:12523: checking for __thread keyword for TLS variables" >&5
++echo "configure:12534: checking for __thread keyword for TLS variables" >&5
+ if eval "test \"`echo '$''{'ac_cv_thread_keyword'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 12528 "configure"
++#line 12539 "configure"
+ #include "confdefs.h"
+ __thread bool tlsIsMainThread = false;
+ int main() {
+ return tlsIsMainThread;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:12535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:12546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_cv_thread_keyword=yes
+ else
+@@ -12568,17 +12579,17 @@
+ MALLOC_H=
+ ac_safe=`echo "malloc.h" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for malloc.h""... $ac_c" 1>&6
+-echo "configure:12572: checking for malloc.h" >&5
++echo "configure:12583: checking for malloc.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 12577 "configure"
++#line 12588 "configure"
+ #include "confdefs.h"
+ #include <malloc.h>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:12582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:12593: \"$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*
+@@ -12602,17 +12613,17 @@
+ if test "$MALLOC_H" = ""; then
+   ac_safe=`echo "malloc/malloc.h" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for malloc/malloc.h""... $ac_c" 1>&6
+-echo "configure:12606: checking for malloc/malloc.h" >&5
++echo "configure:12617: checking for malloc/malloc.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 12611 "configure"
++#line 12622 "configure"
+ #include "confdefs.h"
+ #include <malloc/malloc.h>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:12616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:12627: \"$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*
+@@ -12636,17 +12647,17 @@
+   if test "$MALLOC_H" = ""; then
+     ac_safe=`echo "sys/malloc.h" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for sys/malloc.h""... $ac_c" 1>&6
+-echo "configure:12640: checking for sys/malloc.h" >&5
++echo "configure:12651: checking for sys/malloc.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 12645 "configure"
++#line 12656 "configure"
+ #include "confdefs.h"
+ #include <sys/malloc.h>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:12650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:12661: \"$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*
+@@ -12680,12 +12691,12 @@
+ for ac_func in strndup posix_memalign memalign valloc
+ do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+-echo "configure:12684: checking for $ac_func" >&5
++echo "configure:12695: 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 12689 "configure"
++#line 12700 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char $ac_func(); below.  */
+@@ -12711,7 +12722,7 @@
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:12715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:12726: \"$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
+@@ -12738,19 +12749,19 @@
+ 
+ 
+ echo $ac_n "checking for __attribute__((always_inline))""... $ac_c" 1>&6
+-echo "configure:12742: checking for __attribute__((always_inline))" >&5
++echo "configure:12753: checking for __attribute__((always_inline))" >&5
+ if eval "test \"`echo '$''{'ac_cv_attribute_always_inline'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 12747 "configure"
++#line 12758 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ inline void f(void) __attribute__((always_inline));
+ ; return 0; }
+ EOF
+-if { (eval echo configure:12754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:12765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_attribute_always_inline=yes
+ else
+@@ -12765,19 +12776,19 @@
+ echo "$ac_t""$ac_cv_attribute_always_inline" 1>&6
+ 
+ echo $ac_n "checking for __attribute__((malloc))""... $ac_c" 1>&6
+-echo "configure:12769: checking for __attribute__((malloc))" >&5
++echo "configure:12780: checking for __attribute__((malloc))" >&5
+ if eval "test \"`echo '$''{'ac_cv_attribute_malloc'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 12774 "configure"
++#line 12785 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ void* f(int) __attribute__((malloc));
+ ; return 0; }
+ EOF
+-if { (eval echo configure:12781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:12792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_attribute_malloc=yes
+ else
+@@ -12792,19 +12803,19 @@
+ echo "$ac_t""$ac_cv_attribute_malloc" 1>&6
+ 
+ echo $ac_n "checking for __attribute__((warn_unused_result))""... $ac_c" 1>&6
+-echo "configure:12796: checking for __attribute__((warn_unused_result))" >&5
++echo "configure:12807: checking for __attribute__((warn_unused_result))" >&5
+ if eval "test \"`echo '$''{'ac_cv_attribute_warn_unused'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 12801 "configure"
++#line 12812 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ int f(void) __attribute__((warn_unused_result));
+ ; return 0; }
+ EOF
+-if { (eval echo configure:12808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:12819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_attribute_warn_unused=yes
+ else
+@@ -12819,19 +12830,19 @@
+ echo "$ac_t""$ac_cv_attribute_warn_unused" 1>&6
+ 
+ echo $ac_n "checking for __attribute__((noreturn))""... $ac_c" 1>&6
+-echo "configure:12823: checking for __attribute__((noreturn))" >&5
++echo "configure:12834: checking for __attribute__((noreturn))" >&5
+ if eval "test \"`echo '$''{'ac_cv_attribute_noreturn'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 12828 "configure"
++#line 12839 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ void f(void) __attribute__((noreturn));
+ ; return 0; }
+ EOF
+-if { (eval echo configure:12835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:12846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_attribute_noreturn=yes
+ else
+@@ -12855,19 +12866,19 @@
+ 
+ 
+ echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
+-echo "configure:12859: checking for LC_MESSAGES" >&5
++echo "configure:12870: 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 12864 "configure"
++#line 12875 "configure"
+ #include "confdefs.h"
+ #include <locale.h>
+ int main() {
+ int category = LC_MESSAGES;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:12871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:12882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_i18n_lc_messages=yes
+ else
+@@ -12890,12 +12901,12 @@
+ for ac_func in localeconv
+ do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+-echo "configure:12894: checking for $ac_func" >&5
++echo "configure:12905: 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 12899 "configure"
++#line 12910 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char $ac_func(); below.  */
+@@ -12918,7 +12929,7 @@
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:12922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:12933: \"$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
+@@ -13088,7 +13099,7 @@
+ 	# 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:13092: checking for $ac_word" >&5
++echo "configure:13103: 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
+@@ -13123,7 +13134,7 @@
+ 
+ 	min_nspr_version=4.7.0
+ 	echo $ac_n "checking for NSPR - version >= $min_nspr_version""... $ac_c" 1>&6
+-echo "configure:13127: checking for NSPR - version >= $min_nspr_version" >&5
++echo "configure:13138: checking for NSPR - version >= $min_nspr_version" >&5
+ 
+ 	no_nspr=""
+ 	if test "$NSPR_CONFIG" != "no"; then
+@@ -13182,7 +13193,7 @@
+     _SAVE_CFLAGS=$CFLAGS
+     CFLAGS="$CFLAGS $NSPR_CFLAGS"
+     cat > conftest.$ac_ext <<EOF
+-#line 13186 "configure"
++#line 13197 "configure"
+ #include "confdefs.h"
+ #include "prlog.h"
+ int main() {
+@@ -13191,7 +13202,7 @@
+                  #endif
+ ; return 0; }
+ EOF
+-if { (eval echo configure:13195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:13206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   MOZ_NATIVE_NSPR=1
+ else
+@@ -13389,18 +13400,18 @@
+ 
+ if test -n "$MOZ_DEBUG"; then
+     echo $ac_n "checking for valid debug flags""... $ac_c" 1>&6
+-echo "configure:13393: checking for valid debug flags" >&5
++echo "configure:13404: checking for valid debug flags" >&5
+     _SAVE_CFLAGS=$CFLAGS
+     CFLAGS="$CFLAGS $MOZ_DEBUG_FLAGS"
+     cat > conftest.$ac_ext <<EOF
+-#line 13397 "configure"
++#line 13408 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ int main() {
+ printf("Hello World\n");
+ ; return 0; }
+ EOF
+-if { (eval echo configure:13404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:13415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   _results=yes
+ else
+@@ -13441,18 +13452,18 @@
+ if test "$COMPILE_ENVIRONMENT"; then
+ if test -n "$MOZ_OPTIMIZE"; then
+     echo $ac_n "checking for valid optimization flags""... $ac_c" 1>&6
+-echo "configure:13445: checking for valid optimization flags" >&5
++echo "configure:13456: checking for valid optimization flags" >&5
+     _SAVE_CFLAGS=$CFLAGS
+     CFLAGS="$CFLAGS $MOZ_OPTIMIZE_FLAGS"
+     cat > conftest.$ac_ext <<EOF
+-#line 13449 "configure"
++#line 13460 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ int main() {
+ printf("Hello World\n");
+ ; return 0; }
+ EOF
+-if { (eval echo configure:13456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:13467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   _results=yes
+ else
+@@ -13581,7 +13592,7 @@
+     fi
+   else
+     echo $ac_n "checking size of int *""... $ac_c" 1>&6
+-echo "configure:13585: checking size of int *" >&5
++echo "configure:13596: checking size of int *" >&5
+ if eval "test \"`echo '$''{'ac_cv_sizeof_int_p'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -13589,7 +13600,7 @@
+   ac_cv_sizeof_int_p=4
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 13593 "configure"
++#line 13604 "configure"
+ #include "confdefs.h"
+ #include <stdio.h>
+ main()
+@@ -13600,7 +13611,7 @@
+   exit(0);
+ }
+ EOF
+-if { (eval echo configure:13604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:13615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+   ac_cv_sizeof_int_p=`cat conftestval`
+ else
+@@ -13847,17 +13858,17 @@
+ if test -n "$MOZ_VALGRIND"; then
+     ac_safe=`echo "valgrind/valgrind.h" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for valgrind/valgrind.h""... $ac_c" 1>&6
+-echo "configure:13851: checking for valgrind/valgrind.h" >&5
++echo "configure:13862: checking for valgrind/valgrind.h" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 13856 "configure"
++#line 13867 "configure"
+ #include "confdefs.h"
+ #include <valgrind/valgrind.h>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:13861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:13872: \"$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*
+@@ -14012,7 +14023,7 @@
+ # 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:14016: checking for $ac_word" >&5
++echo "configure:14027: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_path_CCACHE'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -14163,12 +14174,12 @@
+     for ac_func in __cxa_demangle
+ do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+-echo "configure:14167: checking for $ac_func" >&5
++echo "configure:14178: 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 14172 "configure"
++#line 14183 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char $ac_func(); below.  */
+@@ -14194,7 +14205,7 @@
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:14198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:14209: \"$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
+@@ -14242,17 +14253,17 @@
+ if test "$HAVE_GCC3_ABI" -a -z "$SKIP_LIBRARY_CHECKS"; then
+     ac_safe=`echo "unwind.h" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for unwind.h""... $ac_c" 1>&6
+-echo "configure:14246: checking for unwind.h" >&5
++echo "configure:14257: checking for unwind.h" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 14251 "configure"
++#line 14262 "configure"
+ #include "confdefs.h"
+ #include <unwind.h>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:14256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:14267: \"$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*
+@@ -14271,12 +14282,12 @@
+   for ac_func in _Unwind_Backtrace
+ do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+-echo "configure:14275: checking for $ac_func" >&5
++echo "configure:14286: 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 14280 "configure"
++#line 14291 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char $ac_func(); below.  */
+@@ -14299,7 +14310,7 @@
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:14303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:14314: \"$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
+@@ -14348,7 +14359,7 @@
+ # Compiler Options
+ 
+ echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
+-echo "configure:14352: checking for gcc -pipe support" >&5
++echo "configure:14363: checking for gcc -pipe support" >&5
+ if test -n "$GNU_CC" -a -n "$GNU_CXX" -a -n "$GNU_AS"; then
+     echo '#include <stdio.h>' > dummy-hello.c
+     echo 'int main() { printf("Hello World\n"); exit(0); }' >> dummy-hello.c
+@@ -14363,14 +14374,14 @@
+         _SAVE_CFLAGS=$CFLAGS
+         CFLAGS="$CFLAGS -pipe"
+         cat > conftest.$ac_ext <<EOF
+-#line 14367 "configure"
++#line 14378 "configure"
+ #include "confdefs.h"
+  #include <stdio.h> 
+ int main() {
+ printf("Hello World\n");
+ ; return 0; }
+ EOF
+-if { (eval echo configure:14374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:14385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   _res_gcc_pipe="yes"
+ else
+@@ -14415,16 +14426,16 @@
+ CFLAGS="$CFLAGS -fprofile-generate -fprofile-correction"
+ 
+ echo $ac_n "checking whether C compiler supports -fprofile-generate""... $ac_c" 1>&6
+-echo "configure:14419: checking whether C compiler supports -fprofile-generate" >&5
++echo "configure:14430: checking whether C compiler supports -fprofile-generate" >&5
+ cat > conftest.$ac_ext <<EOF
+-#line 14421 "configure"
++#line 14432 "configure"
+ #include "confdefs.h"
+ 
+ int main() {
+ return 0;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:14428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:14439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+    PROFILE_GEN_CFLAGS="-fprofile-generate"
+                  result="yes" 
+@@ -14488,16 +14499,16 @@
+     _SAVE_CXXFLAGS=$CXXFLAGS
+     CXXFLAGS="$CXXFLAGS ${_WARNINGS_CXXFLAGS} ${_COMPILER_PREFIX}-pedantic ${_COMPILER_PREFIX}-Wno-long-long"
+     echo $ac_n "checking whether C++ compiler has -pedantic long long bug""... $ac_c" 1>&6
+-echo "configure:14492: checking whether C++ compiler has -pedantic long long bug" >&5
++echo "configure:14503: checking whether C++ compiler has -pedantic long long bug" >&5
+     cat > conftest.$ac_ext <<EOF
+-#line 14494 "configure"
++#line 14505 "configure"
+ #include "confdefs.h"
+ $configure_static_assert_macros
+ int main() {
+ CONFIGURE_STATIC_ASSERT(sizeof(long long) == 8)
+ ; return 0; }
+ EOF
+-if { (eval echo configure:14501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:14512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   result="no"
+ else
+@@ -14522,12 +14533,12 @@
+ fi
+ 
+ echo $ac_n "checking for correct temporary object destruction order""... $ac_c" 1>&6
+-echo "configure:14526: checking for correct temporary object destruction order" >&5
++echo "configure:14537: checking for correct temporary object destruction order" >&5
+ if test "$cross_compiling" = yes; then
+   result="maybe"
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 14531 "configure"
++#line 14542 "configure"
+ #include "confdefs.h"
+ #ifdef __cplusplus
+ extern "C" void exit(int);
+@@ -14550,7 +14561,7 @@
+              }
+              
+ EOF
+-if { (eval echo configure:14554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:14565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+   result="yes"
+ else
+@@ -14571,12 +14582,12 @@
+ _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:14575: checking for correct overload resolution with const and templates" >&5
++echo "configure:14586: 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 14580 "configure"
++#line 14591 "configure"
+ #include "confdefs.h"
+ 
+                       template <class T>
+@@ -14606,7 +14617,7 @@
+                     
+ ; return 0; }
+ EOF
+-if { (eval echo configure:14610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:14621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_nscap_nonconst_opeq_bug="no"
+ else
+@@ -14629,19 +14640,19 @@
+ fi
+ 
+ echo $ac_n "checking for tm_zone tm_gmtoff in struct tm""... $ac_c" 1>&6
+-echo "configure:14633: checking for tm_zone tm_gmtoff in struct tm" >&5
++echo "configure:14644: checking for tm_zone tm_gmtoff in struct tm" >&5
+ if eval "test \"`echo '$''{'ac_cv_struct_tm_zone_tm_gmtoff'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   cat > conftest.$ac_ext <<EOF
+-#line 14638 "configure"
++#line 14649 "configure"
+ #include "confdefs.h"
+ #include <time.h>
+ int main() {
+ struct tm tm; tm.tm_zone = 0; tm.tm_gmtoff = 1;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:14645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:14656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   rm -rf conftest*
+   ac_cv_struct_tm_zone_tm_gmtoff="yes"
+ else
+@@ -14855,7 +14866,7 @@
+ if test -z "$SKIP_LIBRARY_CHECKS" -a -z "$NO_EDITLINE"; then
+   if test -n "$JS_WANT_READLINE"; then
+     echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
+-echo "configure:14859: checking for readline in -lreadline" >&5
++echo "configure:14870: checking for readline in -lreadline" >&5
+ ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -14863,7 +14874,7 @@
+   ac_save_LIBS="$LIBS"
+ LIBS="-lreadline  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+-#line 14867 "configure"
++#line 14878 "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
+@@ -14874,7 +14885,7 @@
+ readline()
+ ; return 0; }
+ EOF
+-if { (eval echo configure:14878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:14889: \"$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
+@@ -15123,9 +15134,9 @@
+ fi
+ 
+ echo $ac_n "checking for posix_fallocate""... $ac_c" 1>&6
+-echo "configure:15127: checking for posix_fallocate" >&5
++echo "configure:15138: checking for posix_fallocate" >&5
+ cat > conftest.$ac_ext <<EOF
+-#line 15129 "configure"
++#line 15140 "configure"
+ #include "confdefs.h"
+ #define _XOPEN_SOURCE 600
+   #include <fcntl.h>
+@@ -15133,7 +15144,7 @@
+ posix_fallocate(0, 0, 0);
+ ; return 0; }
+ EOF
+-if { (eval echo configure:15137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:15148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_cv___posix_fallocate=true
+ else
+@@ -15159,7 +15170,7 @@
+                 _SAVE_CFLAGS=$CFLAGS
+     CFLAGS="$CFLAGS $XCFLAGS"
+     cat > conftest.$ac_ext <<EOF
+-#line 15163 "configure"
++#line 15174 "configure"
+ #include "confdefs.h"
+ 
+         #include <stdio.h>
+@@ -15177,7 +15188,7 @@
+     
+ ; return 0; }
+ EOF
+-if { (eval echo configure:15181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:15192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+   :
+ else
+   echo "configure: failed program was:" >&5
+@@ -15278,12 +15289,12 @@
+ for ac_func in setlocale
+ do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+-echo "configure:15282: checking for $ac_func" >&5
++echo "configure:15293: 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 15287 "configure"
++#line 15298 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char $ac_func(); below.  */
+@@ -15306,7 +15317,7 @@
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:15310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:15321: \"$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
+@@ -15333,12 +15344,12 @@
+ for ac_func in localeconv
+ do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+-echo "configure:15337: checking for $ac_func" >&5
++echo "configure:15348: 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 15342 "configure"
++#line 15353 "configure"
+ #include "confdefs.h"
+ /* System header to define __stub macros and hopefully few prototypes,
+     which can conflict with char $ac_func(); below.  */
+@@ -15361,7 +15372,7 @@
+ 
+ ; return 0; }
+ EOF
+-if { (eval echo configure:15365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:15376: \"$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
+diff -Naurb js-1.8.5-dist/js/src/configure.in js-1.8.5/js/src/configure.in
+--- js-1.8.5-dist/js/src/configure.in	2011-03-31 15:08:36 -0400
++++ js-1.8.5/js/src/configure.in	2015-08-26 01:07:04 -0400
+@@ -665,6 +665,11 @@
+             CXXFLAGS="$CXXFLAGS -Zc:wchar_t-"
+             AC_DEFINE(_CRT_SECURE_NO_WARNINGS)
+             AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS)
++        elif test "$_CC_MAJOR_VERSION" = "18"; then
++            _CC_SUITE=12
++            CXXFLAGS="$CXXFLAGS -Zc:wchar_t-"
++            AC_DEFINE(_CRT_SECURE_NO_WARNINGS)
++            AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS)
+         else
+             AC_MSG_ERROR([This version ($CC_VERSION) of the MSVC compiler is unsupported. See https://developer.mozilla.org/en/Windows_Build_Prerequisites.])
+         fi
+diff -Naurb js-1.8.5-dist/js/src/jsapi-tests/Makefile.in js-1.8.5/js/src/jsapi-tests/Makefile.in
+--- js-1.8.5-dist/js/src/jsapi-tests/Makefile.in	2011-03-31 15:08:36 -0400
++++ js-1.8.5/js/src/jsapi-tests/Makefile.in	2015-08-26 12:06:29 -0400
+@@ -46,6 +46,7 @@
+ 
+ PROGRAM         = jsapi-tests$(BIN_SUFFIX)
+ 
++#  testDeepFreeze.cpp 
+ CPPSRCS = \
+   tests.cpp \
+   selfTest.cpp \
+@@ -55,7 +56,6 @@
+   testConservativeGC.cpp \
+   testContexts.cpp \
+   testDebugger.cpp \
+-  testDeepFreeze.cpp \
+   testDefineGetterSetterNonEnumerable.cpp \
+   testDefineProperty.cpp \
+   testExtendedEq.cpp \
+diff -Naurb js-1.8.5-dist/js/src/nanojit/RegAlloc.h js-1.8.5/js/src/nanojit/RegAlloc.h
+--- js-1.8.5-dist/js/src/nanojit/RegAlloc.h	2011-03-31 15:08:36 -0400
++++ js-1.8.5/js/src/nanojit/RegAlloc.h	2015-08-26 11:50:43 -0400
+@@ -186,7 +186,7 @@
+     inline Register lsReg(RegisterMask mask) {
+         // This is faster than it looks; we rely on the C++ optimizer
+         // to strip the dead branch and inline just one alternative.
+-        Register r = { (sizeof(RegisterMask) == 4) ? lsbSet32(mask) : lsbSet64(mask) };
++        Register r = { (uint32_t) ((sizeof(RegisterMask) == 4) ? lsbSet32(mask) : lsbSet64(mask)) };
+         return r;
+     }
+ 
+@@ -194,7 +194,7 @@
+     inline Register msReg(RegisterMask mask) {
+         // This is faster than it looks; we rely on the C++ optimizer
+         // to strip the dead branch and inline just one alternative.
+-        Register r = { (sizeof(RegisterMask) == 4) ? msbSet32(mask) : msbSet64(mask) };
++        Register r = { (uint32_t) ((sizeof(RegisterMask) == 4) ? msbSet32(mask) : msbSet64(mask)) };
+         return r;
+     }
+ 
+diff -Naurb js-1.8.5-dist/js/src/v8-dtoa/platform.cc js-1.8.5/js/src/v8-dtoa/platform.cc
+--- js-1.8.5-dist/js/src/v8-dtoa/platform.cc	2011-03-31 15:08:36 -0400
++++ js-1.8.5/js/src/v8-dtoa/platform.cc	2015-08-26 12:00:22 -0400
+@@ -90,6 +90,7 @@
+ 
+ #include <float.h>
+ 
++#if _MSC_VER < 1800
+ // Classify floating point number - usually defined in math.h
+ int fpclassify(double x) {
+   // Use the MS-specific _fpclass() for classification.
+@@ -107,6 +108,7 @@
+   return FP_NAN;
+ }
+ 
++#endif  // _MSC_VER < 1800
+ 
+ #endif  // _MSC_VER
+ 
+diff -Naurb js-1.8.5-dist/js/src/v8-dtoa/platform.h js-1.8.5/js/src/v8-dtoa/platform.h
+--- js-1.8.5-dist/js/src/v8-dtoa/platform.h	2011-03-31 15:08:36 -0400
++++ js-1.8.5/js/src/v8-dtoa/platform.h	2015-08-26 11:57:49 -0400
+@@ -48,7 +48,7 @@
+ #ifdef WIN32
+ 
+ // Microsoft Visual C++ specific stuff.
+-#ifdef _MSC_VER
++#if _MSC_VER < 1800
+ 
+ enum {
+   FP_NAN,
diff --git a/downloads.md b/downloads.md
index b645e2b..5285e64 100644
--- a/downloads.md
+++ b/downloads.md
@@ -1,26 +1,23 @@
 ### list of all files needed for build chain ###################################
 ################################################################################
-### wxWidgets
-http://prdownloads.sourceforge.net/wxwindows/wxMSW-2.8.12.zip
-### vcredist is very carefully chosen to match SDK and VC++ latest patches
-# http://www.microsoft.com/download/en/details.aspx?id=26999 for vc10
-http://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe
+### MSVC vcredist is very carefully chosen to match SDK and VC++ latest patches
+# http://www.microsoft.com/en-us/download/details.aspx?id=40784 for vc12
+http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe
 ################################################################################
-### OpenSSL and libcURL
+### OpenSSL
 http://openssl.org/source/openssl-1.0.2e.tar.gz
 ################################################################################
-### bits required to build erlang
-http://www.erlang.org/download/otp_src_R15B03-1.tar.gz
-http://www.erlang.org/download/otp_src_R14B04.tar.gz
+### libcurl
+http://curl.haxx.se/download/curl-7.44.0.zip
+################################################################################
+### Erlang
+http://www.erlang.org/download/otp_src_17.5.tar.gz
+http://www.erlang.org/download/otp_src_18.0.tar.gz
 http://www.erlang.org/download/otp_src_18.1.tar.gz
 ################################################################################
-# bits required to build couch
-http://curl.haxx.se/download/curl-7.23.1.zip
-### libicu  icu4c-4_6_1-src.zip for MSVC10
-http://download.icu-project.org/files/icu4c/4.6.1/icu4c-4_6_1-src.zip
+### ICU4C
+http://download.icu-project.org/files/icu4c/55.1/icu4c-55_1-src.zip
+################################################################################
 ### spidermonkey    js185-1.0.0.tar.gz
 http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz
 ################################################################################
-## CouchDB source not reqd checkout from git instead
-# autoconf archive now needed as M4 macros were removed
-http://ftpmirror.gnu.org/autoconf-archive/autoconf-archive-2012.09.08.tar.gz
\ No newline at end of file
diff --git a/downloads.md5 b/downloads.md5
index a830b1c..dc8b408 100755
--- a/downloads.md5
+++ b/downloads.md5
@@ -1,12 +1,12 @@
-cd126219b9cb69a4c521abd6960807a6 *apache-couchdb-1.1.1.tar.gz
-a5cbbcaac288831b3d8a08b725657f10 *apache-couchdb-1.2.0.tar.gz
-be464adce11266492a2ccc8fc6b53c90 *curl-7.23.1.zip
-eb0d2dcca17c0c05480cbb114dffb83f *icu4c-4_6_1-src.zip
+7b718ea36aa4c69c672d2a021d453779 *curl-7.44.0.zip
+4cddf1e1d47622fdd9de2cd7bb5001fd *icu4c-55_1-src.zip
 a4574365938222adca0a6bd33329cb32 *js185-1.0.0.tar.gz
+7fbb850e4dd92b9905f5ab312bc39101 *js185-msvc2013.patch
 5262bfa25b60ed9de9f28d5d52d77fc5 *openssl-1.0.2e.tar.gz
-4b469729f103f52702bfb1fb24529dc0 *otp_src_R14B04.tar.gz
-eccd1e6dda6132993555e088005019f2 *otp_src_R15B03-1.tar.gz
+346dd0136bf1cc28cebc140e505206bb *otp_src_17.5.tar.gz
+232acb0c278ee05c8d787cbaf6399be5 *otp_src_18.0.tar.gz
 fa64015fdd133e155b5b19bf90ac8678 *otp_src_18.1.tar.gz
 1801436936e64598bab5b87b37dc7f87 *vcredist_x86.exe
+96b61b8e069832e6b809f24ea74567ba *vcredist_x64.exe
 b6f4be9dd32090c42994765ff0a832cb *wxMSW-2.8.12.zip
 387d90b328a9f84534c919f1f2c0d3ec *autoconf-archive-2012.09.08.tar.gz