summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmake/gluegen-cpptasks.xml6
-rwxr-xr-xsrc/java/com/sun/gluegen/runtime/NativeLibrary.java8
2 files changed, 13 insertions, 1 deletions
diff --git a/make/gluegen-cpptasks.xml b/make/gluegen-cpptasks.xml
index 6720784..02f2d64 100755
--- a/make/gluegen-cpptasks.xml
+++ b/make/gluegen-cpptasks.xml
@@ -273,6 +273,8 @@
<property name="os.and.arch" value="linux-i586" />
</target>
+ <target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86" unless="gluegen.cpptasks.detected.os" />
+
<target name="gluegen.cpptasks.detect.os.osx.ppc" unless="gluegen.cpptasks.detected.os" if="isOSXPPC">
<property name="os.and.arch" value="macosx-ppc" />
</target>
@@ -301,6 +303,8 @@
<property name="os.and.arch" value="solaris-i586" />
</target>
+ <target name="gluegen.cpptasks.detect.os.solaris" depends="gluegen.cpptasks.detect.os.solaris.sparc,gluegen.cpptasks.detect.os.solaris.sparcv9,gluegen.cpptasks.detect.os.solaris.amd64,gluegen.cpptasks.detect.os.solaris.x86" unless="gluegen.cpptasks.detected.os" />
+
<target name="gluegen.cpptasks.detect.os.unix" unless="gluegen.cpptasks.detected.os" if="isUnix">
<property name="native.library.suffix" value="so" />
</target>
@@ -317,7 +321,7 @@
<property name="native.library.suffix" value="dll" />
</target>
- <target name="gluegen.cpptasks.detect.os.2" depends="gluegen.cpptasks.detect.os.freebsd,gluegen.cpptasks.detect.os.hpux,gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.osx,gluegen.cpptasks.detect.os.solaris.sparc,gluegen.cpptasks.detect.os.solaris.amd64,gluegen.cpptasks.detect.os.solaris.x86,gluegen.cpptasks.detect.os.unix,gluegen.cpptasks.detect.os.windows" unless="gluegen.cpptasks.detected.os">
+ <target name="gluegen.cpptasks.detect.os.2" depends="gluegen.cpptasks.detect.os.freebsd,gluegen.cpptasks.detect.os.hpux,gluegen.cpptasks.detect.os.linux,gluegen.cpptasks.detect.os.osx,gluegen.cpptasks.detect.os.solaris,gluegen.cpptasks.detect.os.unix,gluegen.cpptasks.detect.os.windows" unless="gluegen.cpptasks.detected.os">
</target>
<target name="gluegen.cpptasks.detect.os" depends="gluegen.cpptasks.detect.os.1,gluegen.cpptasks.detect.os.2">
diff --git a/src/java/com/sun/gluegen/runtime/NativeLibrary.java b/src/java/com/sun/gluegen/runtime/NativeLibrary.java
index 7ae9cdf..20419d9 100755
--- a/src/java/com/sun/gluegen/runtime/NativeLibrary.java
+++ b/src/java/com/sun/gluegen/runtime/NativeLibrary.java
@@ -221,6 +221,14 @@ public class NativeLibrary {
String libName = selectName(windowsLibName, unixLibName, macOSXLibName);
if (libName == null)
return paths;
+
+ // Allow user's full path specification to override our building pf paths
+ File file = new File(libName);
+ if (file.isAbsolute()) {
+ paths.add(libName);
+ return paths;
+ }
+
String[] baseNames = buildNames(libName);
if (searchSystemPathFirst) {