automake: add configuration for mingw64 and msys/msys2
[rtaudio-cdist.git] / configure.ac
index 266ff488fd4fd70c479a978fe055981f6369f261..0b7477f7a9cd954559e3409f0cd1e8950cb30dc2 100644 (file)
@@ -166,7 +166,9 @@ AS_IF([test "x$systems" = "x"],
     [*-*-freebsd*],  [systems="oss"],
     [*-*-linux*],    [systems="alsa pulse jack oss"],
     [*-apple*],      [systems="core jack"],
-    [*-mingw32*],    [systems="asio ds wasapi jack"]
+    [*-mingw32*],    [systems="asio ds wasapi jack"],
+    [*-mingw64*],    [systems="asio ds wasapi jack"],
+    [*-msys*],       [systems="asio ds wasapi jack"],
   ))
 
 # If any were specifically requested disabled, do it.
@@ -259,7 +261,15 @@ AS_CASE(["$systems"], [*" asio "*], [
 ])
 
 AS_CASE(["$systems"], [*" ds "*], [
-  AC_CHECK_HEADERS(mmsystem.h mmreg.h dsound.h,
+  AC_CHECK_HEADERS(windows.h)
+  AC_CHECK_HEADERS(mmsystem.h mmreg.h dsound.h, [], [],
+[#ifdef HAVE_WINDOWS_H
+# include <windows.h>
+#endif])
+  AS_IF([test "x$ac_cv_header_windows_h" = xyes \
+      && test "x$ac_cv_header_mmsystem_h" = xyes \
+      && test "x$ac_cv_header_mmreg_h" = xyes \
+      && test "x$ac_cv_header_dsound_h" = xyes],
     [api="$api -D__WINDOWS_DS__"
      need_ole32=yes
      found="$found DirectSound"
@@ -267,7 +277,15 @@ AS_CASE(["$systems"], [*" ds "*], [
 ])
 
 AS_CASE(["$systems"], [*" wasapi "*], [
-  AC_CHECK_HEADERS(windows.h audioclient.h avrt.h mmdeviceapi.h,
+  AC_CHECK_HEADERS(windows.h)
+  AC_CHECK_HEADERS(audioclient.h avrt.h mmdeviceapi.h, [], [],
+[#ifdef HAVE_WINDOWS_H
+# include <windows.h>
+#endif])
+  AS_IF([test "x$ac_cv_header_windows_h" = xyes \
+      && test "x$ac_cv_header_audioclient_h" = xyes \
+      && test "x$ac_cv_header_avrt_h" = xyes \
+      && test "x$ac_cv_header_mmdeviceapi_h" = xyes],
     [api="$api -D__WINDOWS_WASAPI__"
      CPPFLAGS="-I$srcdir/include $CPPFLAGS"
      need_ole32=yes