From e163953b0e1c80aab8622cc0ec5ed567da8097c1 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Wed, 3 Jan 2007 19:54:33 +0000 Subject: Add directdrawsink to build and dist it, so it gets built when compiling with MingW on win32 and the required headers... Original commit message from CVS: Patch by: Vincent Torri * configure.ac: * sys/Makefile.am: * sys/directdraw/Makefile.am: Add directdrawsink to build and dist it, so it gets built when compiling with MingW on win32 and the required headers and libraries are available (fixes: #392313). * sys/directdraw/gstdirectdrawsink.c: (gst_directdrawsink_center_rect), (gst_directdrawsink_show_frame), (gst_directdrawsink_setup_ddraw), (gst_directdrawsink_surface_create): Comment out some unused things and fix some printf format issues in order to avoid warnings when buildling with MingW (#392313). --- configure.ac | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 7a1bcd8e..0a6131dc 100644 --- a/configure.ac +++ b/configure.ac @@ -280,6 +280,42 @@ GST_CHECK_FEATURE(X, [X libraries and plugins], CPPFLAGS="$ac_cppflags_save" ]) +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([ +#include +#include + +int main () +{ + GetStockObject(0); + DirectDrawCreate(NULL, NULL, NULL); + + return 0; +} +], + HAVE_DIRECTDRAW="yes", + HAVE_DIRECTDRAW="no") + AC_MSG_RESULT($HAVE_DIRECTDRAW) + LIBS=$save_LIBS + fi + + if test "x$HAVE_DIRECTDRAW" = "xyes"; then + dnl this is much more than we want + DIRECTDRAW_LIBS="-lddraw -lgdi32" + AC_SUBST(DIRECTDRAW_CFLAGS) + AC_SUBST(DIRECTDRAW_LIBS) + fi + AC_SUBST(HAVE_DIRECTDRAW) +]) + dnl *** ext plug-ins *** dnl keep this list sorted alphabetically ! @@ -851,6 +887,7 @@ gst-libs/gst/Makefile sys/Makefile sys/glsink/Makefile sys/dvb/Makefile +sys/directdraw/Makefile examples/Makefile examples/directfb/Makefile ext/amrwb/amrwb-code/Makefile -- cgit v1.2.1