OSDN Git Service

only enable dsound in case the header file is present
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 10 Jun 2015 07:07:35 +0000 (09:07 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 15 Jun 2015 10:42:47 +0000 (12:42 +0200)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
configure

index ccf8dc7..222694f 100755 (executable)
--- a/configure
+++ b/configure
@@ -435,6 +435,14 @@ EOF
   compile_object
 }
 
+check_include() {
+cat > $TMPC <<EOF
+#include <$1>
+int main(void) { return 0; }
+EOF
+  compile_object
+}
+
 write_c_skeleton() {
     cat > $TMPC <<EOF
 int main(void) { return 0; }
@@ -568,7 +576,11 @@ CYGWIN*)
 MINGW32*)
   mingw32="yes"
   audio_possible_drivers="dsound sdl"
-  audio_drv_list="dsound"
+  if check_include dsound.h; then
+    audio_drv_list="dsound"
+  else
+    audio_drv_list=""
+  fi
 ;;
 GNU/kFreeBSD)
   bsd="yes"