Skip to content

Commit

Permalink
Port the SpiderMonkey check to Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
pgj authored and janl committed Jan 26, 2023
1 parent 576ab21 commit 23efd8e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions configure.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,22 @@ If ($Test) {
exit 0
}

# Use the MSVC linker to determine if the respective SpiderMonkey library
# is available on the linker path. This heuristic is taken from
# src/couch/rebar.config.script, please keep them in sync.
If ($SpiderMonkeyVersion -eq "1.8.5") {
$SpiderMonkeyLib = "mozjs185-1.0.lib"
}
else {
$SpiderMonkeyLib = "mozjs-$SpiderMonkeyVersion.lib"
}

&link $SpiderMonkeyLib /SUBSYSTEM:CONSOLE /NOENTRY /DLL /OUT:NUL *> $null
If ($LASTEXITCODE -ne 0) {
Write-Output "ERROR: SpiderMonkey $SpiderMonkeyVersion is not found. Please specify with -SpiderMonkeyVersion."
exit 1
}

# Translate ./configure variables to CouchDB variables
$PackageAuthorName="The Apache Software Foundation"
$InstallDir="$LibDir\couchdb"
Expand Down

0 comments on commit 23efd8e

Please sign in to comment.