Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect if ksuser is needed for linking with WinMM #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,33 @@ int main(int na, char ** a) {
])],[
have_wmm="yes";
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([if -lksuser is required])
old_ksuser_CFLAGS="$CFLAGS"; CFLAGS=""
AC_LINK_IFELSE([AC_LANG_SOURCE([
#include <windows.h>
#include <ksmedia.h>

int main(int na, char ** a) {
GUID foo = KSDATAFORMAT_SUBTYPE_PCM;
return 0;
}])],[
AC_DEFINE([HAVE_WMM],[1],[Support Windows MultiMedia])
AC_MSG_RESULT([no])],[
LIBS="$LIBS -lksuser"
AC_LINK_IFELSE([AC_LANG_SOURCE([
#include <windows.h>
#include <ksmedia.h>

int main(int na, char ** a) {
GUID foo = KSDATAFORMAT_SUBTYPE_PCM;
return 0;
}])],[
AC_DEFINE([HAVE_WMM],[1],[Support Windows MultiMedia])
AC_MSG_RESULT([yes])],[
AC_MSG_WARN([ksmedia compilation failed, WinMM compilation disabled])
LIBS="$waveout_old_LIBS"
have_wmm="no"])])
CFLAGS="$old_ksuser_CFLAGS"
],[
AC_MSG_RESULT([no])
LIBS="$waveout_old_LIBS"
Expand Down