浏览代码

only enable dsound in case the header file is present

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann 10 年之前
父节点
当前提交
307119e7d9
共有 1 个文件被更改,包括 13 次插入1 次删除
  1. 13 1
      configure

+ 13 - 1
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"