winscreencap: Fix configure check and compilation

This commit is contained in:
Sebastian Dröge 2012-12-11 14:19:41 +00:00
parent 0b3cce4890
commit eeab001bc2
2 changed files with 17 additions and 10 deletions

View file

@ -576,23 +576,30 @@ AG_GST_CHECK_FEATURE(DIRECTDRAW, [DirectDraw plug-in], directdrawsink, [
dnl Direct3D9
AM_CONDITIONAL(USE_DIRECT3D9, true)
AG_GST_CHECK_FEATURE(DIRECT3D9, [Direct3D9], winscreencap, [
HAVE_DIRECT3D="no"
HAVE_DIRECT3D9="no"
save_CFLAGS="$CFLAGS"
save_LDFLAGS="$LDFLAGS"
save_LIBS="$LIBS"
CFLAGS="$CFLAGS $DIRECTX_CFLAGS"
LDFLAGS="$LDFLAGS $DIRECTX_LDFLAGS"
LIBS="$LIBS -ld3d9 -lgdi32"
AC_MSG_CHECKING(for Direct3D9 LDFLAGS)
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
AC_LINK_IFELSE([
#include <windows.h>
#include <d3d9.h>
]], [[
int main ()
{
Direct3DCreate9(D3D_SDK_VERSION);
]])],
return 0;
}
],
[HAVE_DIRECT3D9="yes"],
[HAVE_DIRECT3D9="no"])
AC_MSG_RESULT($HAVE_DIRECT3D9)
CFLAGS=$save_CFLAGS
LDFLAGS=$save_LDFLAGS
LIBS=$save_LIBS
if test "x$HAVE_DIRECT3D9" = "xyes"; then

View file

@ -2,9 +2,9 @@ plugin_LTLIBRARIES = libgstwinscreencap.la
libgstwinscreencap_la_SOURCES = gstdx9screencapsrc.c gstgdiscreencapsrc.c gstwinscreencap.c
libgstwinscreencap_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS)
$(GST_PLUGINS_BASE_CFLAGS) $(DIRECT3D9_CFLAGS) $(DIRECTX_CFLAGS)
libgstwinscreencap_la_LIBADD = $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) \
$(DIRECT3D9_LIBS)
$(DIRECT3D9_LIBS) $(DIRECTX_LDFLAGS)
libgstwinscreencap_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstwinscreencap_la_LIBTOOLFLAGS = --tag=disable-static