From 15583ca328c416bf664396025086a60afb34bd84 Mon Sep 17 00:00:00 2001
From: Xerxes Rånby <xerxes@zafena.se>
Date: Wed, 30 Jan 2013 15:08:56 +0100
Subject: Bug 662: Add a flag to favour OpenALSoft
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

If the property jnlp.joal.SystemOpenAL or -Djoal.SystemOpenAL
is defined then include the system OpenAL libnames.
This will favour use of the bundled OpenALSoft by default.

Signed-off-by: Xerxes Rånby <xerxes@zafena.se>
---
 .../jogamp/openal/ALDynamicLibraryBundleInfo.java    | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

(limited to 'src/java/jogamp')

diff --git a/src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java b/src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java
index 53aed12..70ca34b 100644
--- a/src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java
+++ b/src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java
@@ -80,15 +80,17 @@ public class ALDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo  {
 
         List<String> alLibNames = new ArrayList<String>();
 
-        // this is the default AL lib name, according to the spec
-        alLibNames.add("libopenal.so.1"); // unix
-        alLibNames.add("OpenAL32"); // windows
-        alLibNames.add("OpenAL"); // OSX
-
-        // try this one as well, if spec fails
-        alLibNames.add("libOpenAL.so.1");
-        alLibNames.add("libopenal.so");
-        alLibNames.add("libOpenAL.so");
+        if(isPropertyDefined("joal.SystemOpenAL", true) {
+            // this is the default AL lib name, according to the spec
+            alLibNames.add("libopenal.so.1"); // unix
+            alLibNames.add("OpenAL32"); // windows
+            alLibNames.add("OpenAL"); // OSX
+
+            // try this one as well, if spec fails
+            alLibNames.add("libOpenAL.so.1");
+            alLibNames.add("libopenal.so");
+            alLibNames.add("libOpenAL.so");
+        }
 
         // last but not least .. the generic one
         alLibNames.add("openal");
-- 
cgit v1.2.3