diff --git a/autobuild.xml b/autobuild.xml
index a7349a09a840ddf3652094c2aed228c030adb4da..a3a4aa702128bd39dd9ae2bc9c0bbccc41718854 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -2302,13 +2302,13 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
       <key>openal</key>
       <map>
         <key>copyright</key>
-        <string>Creative Labs</string>
+        <string>Copyright (C) 1999-2007 by authors.</string>
         <key>description</key>
-        <string>OpenAL is a cross-platform 3D audio API appropriate for use with gaming applications and many other types of audio applications.</string>
+        <string>OpenAL Soft is a software implementation of the OpenAL 3D audio API.</string>
         <key>license</key>
-        <string>lgpl</string>
+        <string>LGPL2</string>
         <key>license_file</key>
-        <string>LICENSES/openal.txt</string>
+        <string>LICENSES/openal-soft.txt</string>
         <key>name</key>
         <string>openal</string>
         <key>platforms</key>
@@ -2318,9 +2318,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>7530fab3979312da75a903d87b73e3a9</string>
+              <string>418f9bd3f8c221c0bcdfb8574c7fa223eba1d7146729a46b883e9ece7b4a164d4502ca4c7ee619b1f93d231ca124c69d</string>
+              <key>hash_algorithm</key>
+              <string>sha3_384</string>
               <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/p64_3p-openal/rev/314223/arch/Linux/installer/openal-1.12.854-1.1.0.314223-linux64-314223.tar.bz2</string>
+              <string>https://git.alchemyviewer.org/api/v4/projects/141/packages/generic/openal-603/1.20.1/openal-1.20.1-linux64-603.tar.xz</string>
             </map>
             <key>name</key>
             <string>linux64</string>
@@ -2330,11 +2332,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>d9c86f79a6bb56a670e2801c33fd2dd1</string>
+              <string>a5ead11c24b4ac7182ddaff3287949308534e576cbcc71a18a51408d902f28d605801a596db40d2f3d056632f83f895f</string>
               <key>hash_algorithm</key>
-              <string>md5</string>
+              <string>sha3_384</string>
               <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/p64_3p-openal/rev/314223/arch/CYGWIN/installer/openal-1.12.854-1.1.0.314223-windows-314223.tar.bz2</string>
+              <string>https://git.alchemyviewer.org/api/v4/projects/141/packages/generic/openal-603/1.20.1/openal-1.20.1-windows-603.tar.xz</string>
             </map>
             <key>name</key>
             <string>windows</string>
@@ -2344,16 +2346,18 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
             <key>archive</key>
             <map>
               <key>hash</key>
-              <string>e0fdd9394a8cd8c6360b922f6f237e57</string>
+              <string>c3ff4d0470b5c784624796bd70561e4ecfc8bb2ad0d5ce9dc7042713075a028719f82bb1d6f429e6d503510b016274c7</string>
+              <key>hash_algorithm</key>
+              <string>sha3_384</string>
               <key>url</key>
-              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/p64_3p-openal/rev/314223/arch/CYGWIN/installer/openal-1.12.854-1.1.0.314223-windows64-314223.tar.bz2</string>
+              <string>https://git.alchemyviewer.org/api/v4/projects/141/packages/generic/openal-603/1.20.1/openal-1.20.1-windows64-603.tar.xz</string>
             </map>
             <key>name</key>
             <string>windows64</string>
           </map>
         </map>
         <key>version</key>
-        <string>1.12.854-1.1.0.314223</string>
+        <string>1.20.1</string>
       </map>
       <key>openjpeg</key>
       <map>
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index a488dfd179a491118e73f483fd89426ce1bbc834..37a8b10982cfacb5a3e8730d8bdb1a0622e8e8e9 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -107,6 +107,10 @@ if(WINDOWS)
       list(APPEND release_files fmod.dll)
     endif (USE_FMODSTUDIO)
 
+    if (OPENAL)
+        list(APPEND release_files OpenAL32.dll alut.dll)
+    endif (OPENAL)
+
     if (USE_KDU)
       list(APPEND debug_files kdud.dll)
       list(APPEND release_files kdu.dll)
diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake
index 1bbfff6f9853328805c77fbe5a9bbaf72d918380..0912089d13fbced4ee42d025c4622690d34199e8 100644
--- a/indra/cmake/OPENAL.cmake
+++ b/indra/cmake/OPENAL.cmake
@@ -2,31 +2,21 @@
 include(Linking)
 include(Prebuilt)
 
-if (LINUX)
-  set(OPENAL ON CACHE BOOL "Enable OpenAL")
-else (LINUX)
-  set(OPENAL OFF CACHE BOOL "Enable OpenAL")
-endif (LINUX)
-
+option(OPENAL "Enable OpenAL" ON)
 if (OPENAL)
-  set(OPENAL_LIB_INCLUDE_DIRS "${LIBS_PREBUILT_DIR}/include/AL")
   if (USESYSTEMLIBS)
-    include(FindPkgConfig)
-    include(FindOpenAL)
-    pkg_check_modules(OPENAL_LIB REQUIRED openal)
-    pkg_check_modules(FREEALUT_LIB REQUIRED freealut)
+    pkg_check_modules(FREEALUT REQUIRED freealut)
+    pkg_check_modules(OPENAL REQUIRED openal)
   else (USESYSTEMLIBS)
     use_prebuilt_binary(openal)
+    if(WINDOWS)
+      set(OPENAL_LIBRARIES OpenAL32)
+    else()
+      set(OPENAL_LIBRARIES openal)
+    endif()
+    set(OPENAL_INCLUDE_DIRS "${LIBS_PREBUILT_DIR}/include/")
+
+    set(FREEALUT_LIBRARIES alut)
+    set(OPENAL_INCLUDE_DIRS "${LIBS_PREBUILT_DIR}/include/")
   endif (USESYSTEMLIBS)
-  if(WINDOWS)
-    set(OPENAL_LIBRARIES 
-      OpenAL32
-      alut
-    )
-  else()
-    set(OPENAL_LIBRARIES 
-      openal
-      alut
-    )
-  endif()
 endif (OPENAL)
diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt
index 4b894d965b4308890ff63772d27092a31deee17e..f03d7fdaf54ae6c746f143fbf6ae36da96bccb4e 100644
--- a/indra/llaudio/CMakeLists.txt
+++ b/indra/llaudio/CMakeLists.txt
@@ -21,8 +21,8 @@ include_directories(
     ${VORBISENC_INCLUDE_DIRS}
     ${VORBISFILE_INCLUDE_DIRS}
     ${VORBIS_INCLUDE_DIRS}
-    ${OPENAL_LIB_INCLUDE_DIRS}
-    ${FREEAULT_LIB_INCLUDE_DIRS}
+    ${OPENAL_INCLUDE_DIRS}
+    ${FREEAULT_INCLUDE_DIRS}
     )
 
 set(llaudio_SOURCE_FILES
@@ -63,6 +63,7 @@ endif (USE_FMODSTUDIO)
 if (OPENAL)
   include_directories(
     ${OPENAL_LIBRARIES}
+    ${FREEALUT_LIBRARIES}
     )
 
   list(APPEND llaudio_SOURCE_FILES
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 7dd8ad017172da6f852e2a5bfe1e080759c62547..57fb36118041734cb74e8c81bf3728d8b12e14b0 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -93,7 +93,8 @@ include_directories(
     ${LLLOGIN_INCLUDE_DIRS}
     ${LIBS_PREBUILT_DIR}/include/collada
     ${LIBS_PREBUILD_DIR}/include/hunspell
-    ${OPENAL_LIB_INCLUDE_DIRS}
+    ${OPENAL_INCLUDE_DIRS}
+    ${FREEALUT_INCLUDE_DIRS}
     ${LIBS_PREBUILT_DIR}/include/collada/1.4
     ${LLAPPEARANCE_INCLUDE_DIRS}
     ${CMAKE_CURRENT_SOURCE_DIR}
@@ -1512,7 +1513,7 @@ if (LINUX)
         Xinerama
         )
     if (OPENAL)
-      LIST(APPEND viewer_LIBRARIES ${OPENAL_LIBRARIES})
+      LIST(APPEND viewer_LIBRARIES ${OPENAL_LIBRARIES} ${FREEALUT_LIBRARIES})
     endif (OPENAL)
 endif (LINUX)
 
@@ -1688,7 +1689,7 @@ if (WINDOWS)
     endif (ADDRESS_SIZE EQUAL 64)
 
     if (OPENAL)
-      LIST(APPEND viewer_LIBRARIES ${OPENAL_LIBRARIES})
+      LIST(APPEND viewer_LIBRARIES ${OPENAL_LIBRARIES} ${FREEALUT_LIBRARIES})
     endif (OPENAL)
 endif (WINDOWS)
 
@@ -1784,7 +1785,7 @@ if (WINDOWS)
 endif (WINDOWS)
 
 if (OPENAL)
-  set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_OPENAL")
+  set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_OPENAL=1")
 endif (OPENAL)
 
 if (USE_FMODSTUDIO)
@@ -1933,7 +1934,7 @@ if (WINDOWS)
         --arch=${ARCH}
         --artwork=${ARTWORK_DIR}
         "--bugsplat=${BUGSPLAT_DB}"
-        "--fmodstudio=${FMODSTUDIO}"
+        "--fmodstudio=${USE_FMODSTUDIO}"
         "--openal=${OPENAL}"
         --build=${CMAKE_CURRENT_BINARY_DIR}
         --buildtype=${CMAKE_BUILD_TYPE}
@@ -1995,7 +1996,7 @@ if (WINDOWS)
           --arch=${ARCH}
           --artwork=${ARTWORK_DIR}
           "--bugsplat=${BUGSPLAT_DB}"
-          "--fmodstudio=${FMODSTUDIO}"
+          "--fmodstudio=${USE_FMODSTUDIO}"
           "--openal=${OPENAL}"
           --build=${CMAKE_CURRENT_BINARY_DIR}
           --buildtype=${CMAKE_BUILD_TYPE}
@@ -2145,7 +2146,7 @@ if (LINUX)
         --arch=${ARCH}
         --artwork=${ARTWORK_DIR}
         "--bugsplat=${BUGSPLAT_DB}"
-        "--fmodstudio=${FMODSTUDIO}"
+        "--fmodstudio=${USE_FMODSTUDIO}"
         "--openal=${OPENAL}"
         --build=${CMAKE_CURRENT_BINARY_DIR}
         --buildtype=${CMAKE_BUILD_TYPE}
@@ -2173,7 +2174,7 @@ if (LINUX)
       --arch=${ARCH}
       --artwork=${ARTWORK_DIR}
       "--bugsplat=${BUGSPLAT_DB}"
-      "--fmodstudio=${FMODSTUDIO}"
+      "--fmodstudio=${USE_FMODSTUDIO}"
       "--openal=${OPENAL}"
       --build=${CMAKE_CURRENT_BINARY_DIR}
       --buildtype=${CMAKE_BUILD_TYPE}
@@ -2251,7 +2252,7 @@ if (DARWIN)
       --arch=${ARCH}
       --artwork=${ARTWORK_DIR}
       "--bugsplat=${BUGSPLAT_DB}"
-      "--fmodstudio=${FMODSTUDIO}"
+      "--fmodstudio=${USE_FMODSTUDIO}"
       "--openal=${OPENAL}"
       --build=${CMAKE_CURRENT_BINARY_DIR}
       --buildtype=${CMAKE_BUILD_TYPE}
@@ -2286,7 +2287,7 @@ if (DARWIN)
           --arch=${ARCH}
           --artwork=${ARTWORK_DIR}
           "--bugsplat=${BUGSPLAT_DB}"
-          "--fmodstudio=${FMODSTUDIO}"
+          "--fmodstudio=${USE_FMODSTUDIO}"
           "--openal=${OPENAL}"
           --build=${CMAKE_CURRENT_BINARY_DIR}
           --buildtype=${CMAKE_BUILD_TYPE}
diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp
index aa736e75c7e6f3f5b56f90d0338e35e9a0e04174..dc5f56f3202bfa2c68e8610b7b819d52236642d9 100644
--- a/indra/newview/llprogressview.cpp
+++ b/indra/newview/llprogressview.cpp
@@ -384,7 +384,7 @@ void LLProgressView::initLogos()
     const S32 default_height = 28;
     const S32 default_pad = 15;
 
-    S32 icon_width, icon_height;
+    S32 icon_width;
 
     // We don't know final screen rect yet, so we can't precalculate position fully
     LLTextBox *logos_label = getChild<LLTextBox>("logos_lbl");
@@ -399,6 +399,10 @@ void LLProgressView::initLogos()
 
     temp_str += gDirUtilp->getDirDelimiter();
 
+#if defined(USE_FMODSTUDIO) || defined(LL_HAVOK)
+	S32 icon_height;
+#endif
+
 #ifdef USE_FMODSTUDIO
     // original image size is 264x96, it is on longer side but
     // with no internal paddings so it gets additional padding
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 6ff0ebfe2ad5e915e88ef37144dc8489b76706a0..9cccf22b8d0cbb04b77d20678c5a41c495268d72 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -639,8 +639,9 @@ bool idle_startup()
 #ifdef LL_OPENAL
 			if (!gAudiop
 #if !LL_WINDOWS
-				&& NULL == getenv("LL_BAD_OPENAL_DRIVER"))
+				&& NULL == getenv("LL_BAD_OPENAL_DRIVER")
 #endif // !LL_WINDOWS
+				)
 			{
 				gAudiop = (LLAudioEngine *) new LLAudioEngine_OpenAL();
 			}
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 95b3f056104cb0687c0f55e49aaf91dcc7069d82..024e65f1dba4b7199ff87a595979eb83c2d42342 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -568,10 +568,11 @@ def construct(self):
                 self.path("alut.dll")
 
             # Get fmodstudio dll for audio engine, continue if missing
-            if self.args['configuration'].lower() == 'debug':
-                self.path_optional("fmodL.dll", "fmodL.dll")
-            else:
-                self.path_optional(src="fmod.dll", dst="fmod.dll")
+            if self.args['fmodstudio'] == 'ON':
+                if self.args['configuration'].lower() == 'debug':
+                    self.path("fmodL.dll", "fmodL.dll")
+                else:
+                    self.path(src="fmod.dll", dst="fmod.dll")
 
             # KDU
             if self.args['configuration'].lower() == 'debug':
@@ -1470,8 +1471,7 @@ def construct(self):
             self.path("libepoxy.so")
             self.path("libepoxy.so.0")
             self.path("libepoxy.so.0.0.0")
-            self.path("libalut.so*")
-            self.path("libopenal.so*")
+
             # KLUDGE: As of 2012-04-11, the 'fontconfig' package installs
             # libfontconfig.so.1.4.4, along with symlinks libfontconfig.so.1
             # and libfontconfig.so. Before we added support for library-file
@@ -1501,12 +1501,12 @@ def construct(self):
                 print "tcmalloc files not found, skipping"
                 pass
 
-            try:
-                self.path_optional("libfmod.so*")
-                pass
-            except:
-                print "Skipping libfmod.so - not found"
-                pass
+            if self.args['openal'] == 'ON':
+                self.path("libalut.so*")
+                self.path("libopenal.so*")
+
+            if self.args['fmodstudio'] == 'ON':
+                self.path("libfmod.so*")
 
         # Vivox runtimes
         with self.prefix(src=relpkgdir, dst="bin"):
@@ -1546,15 +1546,13 @@ def construct(self):
             self.path("libepoxy.so")
             self.path("libepoxy.so.0")
             self.path("libepoxy.so.0.0.0")
-            self.path("libalut.so*")
-            self.path("libopenal.so*")
 
-            try:
-                self.path_optional("libfmod.so*")
-                pass
-            except:
-                print "Skipping libfmod.so - not found"
-                pass
+            if self.args['openal'] == 'ON':
+                self.path("libalut.so*")
+                self.path("libopenal.so*")
+
+            if self.args['fmodstudio'] == 'ON':
+                self.path("libfmod.so*")
 
         # Vivox runtimes
         with self.prefix(src=relpkgdir, dst="bin"):