diff options
| author | Stephen Sinclair <radarsat1@gmail.com> | 2019-01-24 12:42:57 +0100 |
|---|---|---|
| committer | Stephen Sinclair <radarsat1@gmail.com> | 2019-01-24 12:42:57 +0100 |
| commit | 995012960beba4001f5a1f85f5873811b62435bd (patch) | |
| tree | 5c6b9362c09e8a2e57cf5b06858918c0902ca800 | |
| parent | f580e841ceb80c371b37f071b2db06cd6ef53486 (diff) | |
automake: fix repeated defines and libs for WASAPI and DSound.
| -rw-r--r-- | configure.ac | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 266ff48..9957aba 100644 --- a/configure.ac +++ b/configure.ac @@ -259,7 +259,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 +275,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 |
