Browse files

check for version 10 of the oci drivers

  • Loading branch information...
1 parent 2d52c3a commit 711539edfea7bb609da2a6a5b24f63c4f53b0491 Joe Ferner committed Feb 7, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 mnm.js
View
9 mnm.js
@@ -13,11 +13,16 @@ builder.appendUnique('CXXFLAGS', [ '-I' + ociIncludeDir ]);
ociLibDir = process.env["OCI_LIB_DIR"] || "/usr/lib/oracle/11.2/client/lib/";
builder.failIfNotExists(ociLibDir, 'Could not find "%s" check OCI_LIB_DIR environment variable.');
-builder.appendUnique('LINKFLAGS', [ '-L' + ociLibDir ]);
+builder.appendLinkerSearchDir(ociLibDir);
builder.appendLinkerLibrary("occi");
builder.appendLinkerLibrary("clntsh");
-builder.appendLinkerLibrary("nnz11");
+if (path.existsSync(path.join(ociLibDir, "libnnz10.dylib"))
+ || path.existsSync(path.join(ociLibDir, "libnnz10.so"))) {
+ builder.appendLinkerLibrary("nnz10");
+} else {
+ builder.appendLinkerLibrary("nnz11");
+}
builder.target = "oracle_bindings"
builder.appendSourceDir('./src');

0 comments on commit 711539e

Please sign in to comment.