In order to avoid a functional regression with previous releases, the JAR file needs to be able to load either the 64-bit or 32-bit JNI library on Un*x systems.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@950 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
@@ -41,7 +41,18 @@ final class TJLoader {
|
||||
System.load("/usr/lib/libturbojpeg.jnilib");
|
||||
}
|
||||
} else {
|
||||
System.load("%{__libdir}/libturbojpeg.so");
|
||||
try {
|
||||
System.load("%{__libdir}/libturbojpeg.so");
|
||||
} catch (java.lang.UnsatisfiedLinkError e3) {
|
||||
String libdir = "%{__libdir}";
|
||||
if (libdir.equals("/opt/libjpeg-turbo/lib64")) {
|
||||
System.load("/opt/libjpeg-turbo/lib32/libturbojpeg.so");
|
||||
} else if (libdir.equals("/opt/libjpeg-turbo/lib32")) {
|
||||
System.load("/opt/libjpeg-turbo/lib64/libturbojpeg.so");
|
||||
} else {
|
||||
throw e3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user