Skip to content

Commit ab9bf21

Browse files
committed
Merge branch 'master' of github.com:nearinfinity/node-oracle
2 parents 97fdeb5 + 711539e commit ab9bf21

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

mnm.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,16 @@ builder.appendUnique('CXXFLAGS', [ '-I' + ociIncludeDir ]);
1313

1414
ociLibDir = process.env["OCI_LIB_DIR"] || "/usr/lib/oracle/11.2/client/lib/";
1515
builder.failIfNotExists(ociLibDir, 'Could not find "%s" check OCI_LIB_DIR environment variable.');
16-
builder.appendUnique('LINKFLAGS', [ '-L' + ociLibDir ]);
16+
builder.appendLinkerSearchDir(ociLibDir);
1717

1818
builder.appendLinkerLibrary("occi");
1919
builder.appendLinkerLibrary("clntsh");
20-
builder.appendLinkerLibrary("nnz11");
20+
if (path.existsSync(path.join(ociLibDir, "libnnz10.dylib"))
21+
|| path.existsSync(path.join(ociLibDir, "libnnz10.so"))) {
22+
builder.appendLinkerLibrary("nnz10");
23+
} else {
24+
builder.appendLinkerLibrary("nnz11");
25+
}
2126

2227
builder.target = "oracle_bindings"
2328
builder.appendSourceDir('./src');

0 commit comments

Comments
 (0)