Blob Blame History Raw
diff -up bolzplatz2006-1.0.3/libsrc/lwjgl/src/native/common/extal.c~ bolzplatz2006-1.0.3/libsrc/lwjgl/src/native/common/extal.c
--- bolzplatz2006-1.0.3/libsrc/lwjgl/src/native/common/extal.c~	2006-05-29 18:49:26.000000000 +0200
+++ bolzplatz2006-1.0.3/libsrc/lwjgl/src/native/common/extal.c	2009-11-04 16:02:55.000000000 +0100
@@ -117,12 +117,26 @@ static void tryLoadLibrary(JNIEnv *env, 
 		free(path_str);
 #endif
 #ifdef _X11
+		char *versioned_path_str;
 		char *path_str = GetStringNativeChars(env, path);
-		printfDebugJava(env, "Testing '%s'", path_str);
-		handleOAL = dlopen(path_str, RTLD_LAZY);
-		if (handleOAL != NULL) {
-			printfDebugJava(env, "Found OpenAL at '%s'", path_str);
+		
+		if (asprintf(&versioned_path_str, "%s.0", path_str) != -1) {
+			printfDebugJava(env, "Testing '%s'", versioned_path_str);
+			handleOAL = dlopen(versioned_path_str, RTLD_LAZY);
+			if (handleOAL != NULL) {
+				printfDebugJava(env, "Found OpenAL at '%s'", versioned_path_str);
+			}
+			free(versioned_path_str);
 		}
+
+		if (handleOAL == NULL) {
+			printfDebugJava(env, "Testing '%s'", path_str);
+			handleOAL = dlopen(path_str, RTLD_LAZY);
+			if (handleOAL != NULL) {
+				printfDebugJava(env, "Found OpenAL at '%s'", path_str);
+			}
+		}
+
 		free(path_str);
 #endif
 #ifdef _MACOSX