Commit 8f2dd4a7 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

directx: simplify configure

parent 0555a4ce
...@@ -3143,33 +3143,40 @@ then ...@@ -3143,33 +3143,40 @@ then
fi fi
AC_ARG_ENABLE(directx, AC_ARG_ENABLE(directx,
[ --enable-directx Win32 DirectX support (default enabled on Win32)]) [AS_HELP_STRING([--enable-directx],
if test "${enable_directx}" != "no"; then [Microsoft DirectX support (default enabled on Windows)])],, [
if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"; then AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [
dnl DDraw enable_directx="yes"
AC_CHECK_HEADERS(ddraw.h, ], [
[ VLC_ADD_PLUGIN([directx aout_directx]) enable_directx="no"
VLC_ADD_LIBS([directx],[-luser32 -lgdi32]) ])
],[AC_MSG_ERROR([Cannot find DirectX headers!])] ])
) have_directx="no"
AS_IF([test "${enable_directx}" != "no"], [
dnl OpenGL dnl DirectDraw
AC_CHECK_HEADERS(GL/wglew.h, AC_CHECK_HEADERS(ddraw.h, [
[ VLC_ADD_PLUGIN([glwin32]) have_directx="yes"
VLC_ADD_LIBS([glwin32],[-lopengl32 -lgdi32]) ], [
],[],[ AC_MSG_ERROR([Cannot find DirectX headers!])
#include <windows.h> ])
#include <GL/gl.h>
])
dnl Direct3D dnl OpenGL
AC_CHECK_HEADERS(d3d9.h, AC_CHECK_HEADERS(GL/wglew.h, [
[ VLC_ADD_PLUGIN([direct3d]) VLC_ADD_PLUGIN([glwin32])
VLC_ADD_LIBS([direct3d],[-lgdi32]) VLC_ADD_LIBS([glwin32],[-lopengl32 -lgdi32])
]) ],, [
VLC_ADD_LIBS([direct3d directx glwin32],[-lole32 -luuid]) #include <windows.h>
fi #include <GL/gl.h>
fi ])
dnl Direct3D
AC_CHECK_HEADERS(d3d9.h, [
VLC_ADD_PLUGIN([direct3d])
VLC_ADD_LIBS([direct3d],[-lgdi32])
])
VLC_ADD_LIBS([direct3d glwin32],[-lole32 -luuid])
])
AM_CONDITIONAL([HAVE_DIRECTX], [test "$have_directx" = "yes"])
dnl dnl
dnl Windows Direct2D plugin dnl Windows Direct2D plugin
......
SOURCES_aout_directx = directx.c windows_audio_common.h packet.c
SOURCES_aout_file = file.c SOURCES_aout_file = file.c
SOURCES_waveout = waveout.c windows_audio_common.h packet.c SOURCES_waveout = waveout.c windows_audio_common.h packet.c
SOURCES_auhal = auhal.c packet.c SOURCES_auhal = auhal.c packet.c
...@@ -45,12 +44,12 @@ if HAVE_PULSE ...@@ -45,12 +44,12 @@ if HAVE_PULSE
libvlc_LTLIBRARIES += libpulse_plugin.la libvlc_LTLIBRARIES += libpulse_plugin.la
endif endif
libwasapi_plugin_la_SOURCES = wasapi.c libaout_directx_plugin_la_SOURCES = directx.c windows_audio_common.h packet.c
libwasapi_plugin_la_CFLAGS = $(AM_CFLAGS) libaout_directx_plugin_la_CFLAGS = $(AM_CFLAGS)
libwasapi_plugin_la_LIBADD = $(AM_LIBADD) -lole32 -lksuser libaout_directx_plugin_la_LIBADD = $(AM_LIBADD)
libwasapi_plugin_la_DEPENDENCIES = libaout_directx_plugin_la_DEPENDENCIES =
if HAVE_WASAPI if HAVE_DIRECTX
libvlc_LTLIBRARIES += libwasapi_plugin.la libvlc_LTLIBRARIES += libaout_directx_plugin.la
endif endif
libkai_plugin_la_SOURCES = kai.c packet.c libkai_plugin_la_SOURCES = kai.c packet.c
......
...@@ -6,13 +6,19 @@ SOURCES_direct2d = \ ...@@ -6,13 +6,19 @@ SOURCES_direct2d = \
common.c \ common.c \
$(NULL) $(NULL)
SOURCES_directx = \ libdirectx_plugin_la_SOURCES = \
directx.c \ directx.c \
common.h \ common.h \
events.h \ events.h \
events.c \ events.c \
common.c \ common.c \
$(NULL) $(NULL)
libdirectx_plugin_la_CFLAGS = $(AM_CFLAGS)
libdirectx_plugin_la_LIBADD = $(AM_LIBADD) -luser32 -lgdi32 -lole32 -luuid
libdirectx_plugin_la_DEPENDENCIES =
if HAVE_DIRECTX
libvlc_LTLIBRARIES += libdirectx_plugin.la
endif
SOURCES_direct3d = \ SOURCES_direct3d = \
direct3d.c \ direct3d.c \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment