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

directx: simplify configure

parent 0555a4ce
......@@ -3143,33 +3143,40 @@ then
fi
AC_ARG_ENABLE(directx,
[ --enable-directx Win32 DirectX support (default enabled on Win32)])
if test "${enable_directx}" != "no"; then
if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"; then
dnl DDraw
AC_CHECK_HEADERS(ddraw.h,
[ VLC_ADD_PLUGIN([directx aout_directx])
VLC_ADD_LIBS([directx],[-luser32 -lgdi32])
],[AC_MSG_ERROR([Cannot find DirectX headers!])]
)
[AS_HELP_STRING([--enable-directx],
[Microsoft DirectX support (default enabled on Windows)])],, [
AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [
enable_directx="yes"
], [
enable_directx="no"
])
])
have_directx="no"
AS_IF([test "${enable_directx}" != "no"], [
dnl DirectDraw
AC_CHECK_HEADERS(ddraw.h, [
have_directx="yes"
], [
AC_MSG_ERROR([Cannot find DirectX headers!])
])
dnl OpenGL
AC_CHECK_HEADERS(GL/wglew.h,
[ VLC_ADD_PLUGIN([glwin32])
AC_CHECK_HEADERS(GL/wglew.h, [
VLC_ADD_PLUGIN([glwin32])
VLC_ADD_LIBS([glwin32],[-lopengl32 -lgdi32])
],[],[
],, [
#include <windows.h>
#include <GL/gl.h>
])
dnl Direct3D
AC_CHECK_HEADERS(d3d9.h,
[ VLC_ADD_PLUGIN([direct3d])
AC_CHECK_HEADERS(d3d9.h, [
VLC_ADD_PLUGIN([direct3d])
VLC_ADD_LIBS([direct3d],[-lgdi32])
])
VLC_ADD_LIBS([direct3d directx glwin32],[-lole32 -luuid])
fi
fi
VLC_ADD_LIBS([direct3d glwin32],[-lole32 -luuid])
])
AM_CONDITIONAL([HAVE_DIRECTX], [test "$have_directx" = "yes"])
dnl
dnl Windows Direct2D plugin
......
SOURCES_aout_directx = directx.c windows_audio_common.h packet.c
SOURCES_aout_file = file.c
SOURCES_waveout = waveout.c windows_audio_common.h packet.c
SOURCES_auhal = auhal.c packet.c
......@@ -45,12 +44,12 @@ if HAVE_PULSE
libvlc_LTLIBRARIES += libpulse_plugin.la
endif
libwasapi_plugin_la_SOURCES = wasapi.c
libwasapi_plugin_la_CFLAGS = $(AM_CFLAGS)
libwasapi_plugin_la_LIBADD = $(AM_LIBADD) -lole32 -lksuser
libwasapi_plugin_la_DEPENDENCIES =
if HAVE_WASAPI
libvlc_LTLIBRARIES += libwasapi_plugin.la
libaout_directx_plugin_la_SOURCES = directx.c windows_audio_common.h packet.c
libaout_directx_plugin_la_CFLAGS = $(AM_CFLAGS)
libaout_directx_plugin_la_LIBADD = $(AM_LIBADD)
libaout_directx_plugin_la_DEPENDENCIES =
if HAVE_DIRECTX
libvlc_LTLIBRARIES += libaout_directx_plugin.la
endif
libkai_plugin_la_SOURCES = kai.c packet.c
......
......@@ -6,13 +6,19 @@ SOURCES_direct2d = \
common.c \
$(NULL)
SOURCES_directx = \
libdirectx_plugin_la_SOURCES = \
directx.c \
common.h \
events.h \
events.c \
common.c \
$(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 = \
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