--- CMakeLists.txt.orig	2015-07-16 21:02:34 UTC
+++ CMakeLists.txt
@@ -74,6 +74,10 @@ option(HAS_AUDIOFILE "enable audio expor
 option(USE_SYSTEM_QTSINGLEAPPLICATION "Use system QtSingleApplication" OFF)
 option(BUILD_LAME    "enable mp3 export" ON)                   # requires libmp3lame
 
+option(BUILD_ALSA    "Build with support for ALSA." ON)
+option(BUILD_PORTAUDIO "Build with support for portaudio." ON)
+option(BUILD_PULSEAUDIO "Build with support for PulseAudio." ON)
+
 SET(JACK_LONGNAME "jack (jack audio connection kit)")
 SET(JACK_MIN_VERSION "0.98.0")
 option(BUILD_JACK    "Build with support for ${JACK_LONGNAME}. jack >= ${JACK_MIN_VERSION} will be needed." ON)
@@ -194,6 +198,7 @@ endif (APPLE)
 ## alsa >= 1.0.0
 ##
 
+if (BUILD_ALSA)
 if (APPLE OR MINGW)
       message("Disabling ALSA support due to OS X or MINGW build.")
       set (USE_ALSA 0)
@@ -208,11 +213,17 @@ else (APPLE OR MINGW)
             set (HAS_MIDI 1)
       endif (NOT ALSA_INCDIR)
 endif (APPLE OR MINGW)
+else (BUILD_ALSA)
+      MESSAGE(STATUS "alsa support disabled")
+      set (USE_ALSA 0)
+      set (HAS_MIDI 1)
+endif (BUILD_ALSA)
 
 ##
 ## pulseaudio
 ##
 
+if (BUILD_PULSEAUDIO)
 if (APPLE OR MINGW)
       set (USE_PULSEAUDIO 0)
 else (APPLE OR MINGW)
@@ -224,6 +235,10 @@ else (APPLE OR MINGW)
             message("Pulseaudio not found.")
       endif (PULSEAUDIO_FOUND)
 endif (APPLE OR MINGW)
+else (BUILD_PULSEAUDIO)
+      MESSAGE(STATUS "PulseAudio support disabled")
+      set (USE_PULSEAUDIO 0)
+endif (BUILD_PULSEAUDIO)
 
 ##
 ## lame
@@ -296,6 +311,7 @@ ENDIF(BUILD_JACK)
 ## portaudio
 ##
 
+if (BUILD_PORTAUDIO)
 if (MINGW)
     set ( USE_PORTAUDIO 1 )
     set ( USE_PORTMIDI  1 )
@@ -314,6 +330,11 @@ else (MINGW)
       set (USE_PORTMIDI   0)
     endif (APPLE)
 endif (MINGW)
+else (BUILD_PORTAUDIO)
+       MESSAGE(STATUS "portaudio support disabled")
+       set (USE_PORTAUDIO 0)
+       set (USE_PORTMIDI  0)
+endif (BUILD_PORTAUDIO)
 
 
 if (APPLE)
@@ -431,7 +452,7 @@ if (NOT MINGW AND NOT APPLE)
             )
     endif (GZIP_EXECUTABLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
     # install man pages in either compressed or uncompressed form
-    install( FILES ${MAN_TARGET} DESTINATION share/man/man1 COMPONENT doc)
+    install( FILES ${MAN_TARGET} DESTINATION man/man1 COMPONENT doc)
     # add .MSCZ and .MSCX to MIME database (informs system that filetypes .MSCZ & .MSCX are MuseScore files)
     install( FILES ${PROJECT_SOURCE_DIR}/build/musescore.xml DESTINATION share/mime/packages COMPONENT doc)
     # Note: must now run "update-mime-database" to apply changes. This is done in the Makefile.
