diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 84d6f06b93..93a165fb1a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -28,6 +28,7 @@ if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
 endif()
 
 option( DYN_FLUIDSYNTH "Dynamically load fluidsynth" ON )
+option( DYN_OPENAL "Dynamically load OpenAL" ON )
 
 if( APPLE )
     option( OSX_COCOA_BACKEND "Use native Cocoa backend instead of SDL" ON )
@@ -226,13 +227,23 @@ endif()
 
 
 if( NOT NO_OPENAL )
-    find_package( OpenAL )
+	find_package( OpenAL )
 	mark_as_advanced(CLEAR OPENAL_INCLUDE_DIR)
-    if( OPENAL_INCLUDE_DIR )
-        include_directories( ${OPENAL_INCLUDE_DIR} )
-    else()
+	if( OPENAL_INCLUDE_DIR )
+		include_directories( ${OPENAL_INCLUDE_DIR} )
+		if( DYN_OPENAL )
+			add_definitions( -DDYN_OPENAL )
+		else()
+			mark_as_advanced(CLEAR OPENAL_LIBRARY)
+			if( OPENAL_LIBRARY )
+				set( ZDOOM_LIBS ${OPENAL_LIBRARY} ${ZDOOM_LIBS} )
+			else()
+				set( NO_OPENAL ON )
+			endif()
+		endif()
+	else()
 		set( NO_OPENAL ON )
-    endif()
+	endif()
 endif()
 
 if( NOT NO_FMOD )
diff --git a/src/sound/oalload.h b/src/sound/oalload.h
index 3cee30d58c..ca02d25d98 100644
--- a/src/sound/oalload.h
+++ b/src/sound/oalload.h
@@ -1,7 +1,7 @@
 #ifndef OALDEF_H
 #define OALDEF_H
 
-#ifndef NO_OPENAL
+#if !defined NO_OPENAL && defined DYN_OPENAL
 
 #ifndef _WIN32
 typedef void* FARPROC;
diff --git a/src/sound/oalsound.cpp b/src/sound/oalsound.cpp
index 8ac41a04b0..6dd204c866 100644
--- a/src/sound/oalsound.cpp
+++ b/src/sound/oalsound.cpp
@@ -83,6 +83,8 @@ bool IsOpenALPresent()
 {
 #ifdef NO_OPENAL
 	return false;
+#elif !defined DYN_OPENAL
+	return true;
 #else
 	static bool cached_result = false;
 	static bool done = false;
@@ -425,10 +427,10 @@ public:
     virtual bool IsEnded()
     {
         return !Playing.load();
-    }
+            }
 
     virtual FString GetStats()
-    {
+        {
         FString stats;
         size_t pos, len;
         ALfloat volume;
@@ -1538,24 +1540,24 @@ FISoundChannel *OpenALSoundRenderer::StartSound3D(SoundHandle sfx, SoundListener
         else
         {
             alSourcei(source, AL_SOURCE_RELATIVE, AL_FALSE);
-            alSource3f(source, AL_POSITION, dir[0], dir[1], -dir[2]);
-        }
+        alSource3f(source, AL_POSITION, dir[0], dir[1], -dir[2]);
+    }
     }
     else
     {
         FVector3 dir = pos;
         if(AL.EXT_SOURCE_RADIUS)
             alSourcef(source, AL_SOURCE_RADIUS, (chanflags&SNDF_AREA) ? AREA_SOUND_RADIUS : 0.f);
-        else if((chanflags&SNDF_AREA) && dist_sqr < AREA_SOUND_RADIUS*AREA_SOUND_RADIUS)
-        {
+    else if((chanflags&SNDF_AREA) && dist_sqr < AREA_SOUND_RADIUS*AREA_SOUND_RADIUS)
+    {
             dir -= listener->position;
 
-            float mindist = rolloff->MinDistance/distscale;
-            FVector3 amb(0.f, !(dir.Y>=0.f) ? -mindist : mindist, 0.f);
-            float a = sqrtf(dist_sqr) / AREA_SOUND_RADIUS;
-            dir = amb + (dir-amb)*a;
+        float mindist = rolloff->MinDistance/distscale;
+        FVector3 amb(0.f, !(dir.Y>=0.f) ? -mindist : mindist, 0.f);
+        float a = sqrtf(dist_sqr) / AREA_SOUND_RADIUS;
+        dir = amb + (dir-amb)*a;
 
-            dir += listener->position;
+        dir += listener->position;
         }
         if(dist_sqr < (0.0004f*0.0004f))
         {
@@ -1566,8 +1568,8 @@ FISoundChannel *OpenALSoundRenderer::StartSound3D(SoundHandle sfx, SoundListener
         else
         {
             alSourcei(source, AL_SOURCE_RELATIVE, AL_FALSE);
-            alSource3f(source, AL_POSITION, dir[0], dir[1], -dir[2]);
-        }
+        alSource3f(source, AL_POSITION, dir[0], dir[1], -dir[2]);
+    }
     }
     alSource3f(source, AL_VELOCITY, vel[0], vel[1], -vel[2]);
     alSource3f(source, AL_DIRECTION, 0.f, 0.f, 0.f);
@@ -1799,7 +1801,7 @@ void OpenALSoundRenderer::UpdateSoundParams3D(SoundListener *listener, FISoundCh
         {
             float gain = GetRolloff(&chan->Rolloff, sqrtf(chan->DistanceSqr)*chan->DistanceScale);
             dir.MakeResize((gain > 0.00001f) ? 1.f/gain : 100000.f);
-        }
+    }
     }
     else if(!AL.EXT_SOURCE_RADIUS && areasound &&
             chan->DistanceSqr < AREA_SOUND_RADIUS*AREA_SOUND_RADIUS)
@@ -1822,7 +1824,7 @@ void OpenALSoundRenderer::UpdateSoundParams3D(SoundListener *listener, FISoundCh
     else
     {
         alSourcei(source, AL_SOURCE_RELATIVE, AL_FALSE);
-        alSource3f(source, AL_POSITION, dir[0], dir[1], -dir[2]);
+    alSource3f(source, AL_POSITION, dir[0], dir[1], -dir[2]);
     }
     alSource3f(source, AL_VELOCITY, vel[0], vel[1], -vel[2]);
     getALError();
diff --git a/src/sound/oalsound.h b/src/sound/oalsound.h
index 09fe64d92b..d69e2e3674 100644
--- a/src/sound/oalsound.h
+++ b/src/sound/oalsound.h
@@ -12,7 +12,9 @@
 
 #ifndef NO_OPENAL
 
+#ifdef DYN_OPENAL
 #define AL_NO_PROTOTYPES
+#endif // DYN_OPENAL
 
 #include "al.h"
 #include "alc.h"