From e2117c6c678ae18f7cb5f6dd24b1b8d9b0fa84bf Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Thu, 4 Jan 2007 09:44:57 +0000 Subject: Add directsoundsink to build and dist it, so it gets built when compiling with MingW on win32 and the required header... Original commit message from CVS: Patch by: Vincent Torri * configure.ac: * sys/Makefile.am: * sys/directsound/Makefile.am: * sys/directsound/gstdirectsoundsink.c: (gst_directsoundsink_reset): Add directsoundsink to build and dist it, so it gets built when compiling with MingW on win32 and the required headers and libraries are available (fixes: #392638). Also simplify DirectDraw check a bit. * tests/check/elements/.cvsignore: Fix CVS ignore for neonhttpsrc test binary. --- configure.ac | 54 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 11 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 0a6131dc..117705e8 100644 --- a/configure.ac +++ b/configure.ac @@ -284,12 +284,10 @@ dnl DirectDraw translit(dnm, m, l) AM_CONDITIONAL(USE_DIRECTDRAW, true) GST_CHECK_FEATURE(DIRECTDRAW, [DirectDraw plug-in], directdrawsink, [ HAVE_DIRECTDRAW="no" - AC_CHECK_HEADERS(windows.h ddraw.h, have_ddraw_headers="yes", have_ddraw_headers="no") - if test "x$have_ddraw_headers" = "xyes" ; then - save_LIBS="$LIBS" - LIBS="$LIBS -lddraw -lgdi32" - AC_MSG_CHECKING(for DirectDraw LDFLAGS) - AC_LINK_IFELSE([ + save_LIBS="$LIBS" + LIBS="$LIBS -lddraw -lgdi32" + AC_MSG_CHECKING(for DirectDraw LDFLAGS) + AC_LINK_IFELSE([ #include #include @@ -301,11 +299,10 @@ int main () return 0; } ], - HAVE_DIRECTDRAW="yes", - HAVE_DIRECTDRAW="no") - AC_MSG_RESULT($HAVE_DIRECTDRAW) - LIBS=$save_LIBS - fi + [HAVE_DIRECTDRAW="yes"], + [HAVE_DIRECTDRAW="no"]) + AC_MSG_RESULT($HAVE_DIRECTDRAW) + LIBS=$save_LIBS if test "x$HAVE_DIRECTDRAW" = "xyes"; then dnl this is much more than we want @@ -316,6 +313,40 @@ int main () AC_SUBST(HAVE_DIRECTDRAW) ]) +dnl DirectSound +translit(dnm, m, l) AM_CONDITIONAL(USE_DIRECTSOUND, true) +GST_CHECK_FEATURE(DIRECTSOUND, [DirectSound plug-in], directsoundsink, [ + HAVE_DIRECTSOUND="no" + save_LIBS="$LIBS" + LIBS="$LIBS -ldsound -ldxerr9" + AC_MSG_CHECKING(for DirectSound LDFLAGS) + AC_LINK_IFELSE([ +#include +#include +#include + +int main () +{ + DXGetErrorString9 (0); + DirectSoundCreate(NULL, NULL, NULL); + + return 0; +} +], + [HAVE_DIRECTSOUND="yes"], + [HAVE_DIRECTSOUND="no"]) + AC_MSG_RESULT($HAVE_DIRECTSOUND) + LIBS=$save_LIBS + + if test "x$HAVE_DIRECTSOUND" = "xyes"; then + dnl this is much more than we want + DIRECTSOUND_LIBS="-ldsound -ldxerr9" + AC_SUBST(DIRECTSOUND_CFLAGS) + AC_SUBST(DIRECTSOUND_LIBS) + fi + AC_SUBST(HAVE_DIRECTSOUND) +]) + dnl *** ext plug-ins *** dnl keep this list sorted alphabetically ! @@ -888,6 +919,7 @@ sys/Makefile sys/glsink/Makefile sys/dvb/Makefile sys/directdraw/Makefile +sys/directsound/Makefile examples/Makefile examples/directfb/Makefile ext/amrwb/amrwb-code/Makefile -- cgit v1.2.1