[vlc-commits] directx: simplify configure
Rémi Denis-Courmont
git at videolan.org
Thu Jul 19 15:51:29 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 19 16:17:13 2012 +0300| [8f2dd4a703f160516422af18a326d336e685f48c] | committer: Rémi Denis-Courmont
directx: simplify configure
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8f2dd4a703f160516422af18a326d336e685f48c
---
configure.ac | 59 ++++++++++++++++++++---------------
modules/audio_output/Modules.am | 13 ++++----
modules/video_output/msw/Modules.am | 8 ++++-
3 files changed, 46 insertions(+), 34 deletions(-)
diff --git a/configure.ac b/configure.ac
index a10659c..1f79164 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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!])]
- )
-
- dnl OpenGL
- AC_CHECK_HEADERS(GL/wglew.h,
- [ VLC_ADD_PLUGIN([glwin32])
- VLC_ADD_LIBS([glwin32],[-lopengl32 -lgdi32])
- ],[],[
- #include <windows.h>
- #include <GL/gl.h>
- ])
+ [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 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
+ dnl OpenGL
+ 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])
+ VLC_ADD_LIBS([direct3d],[-lgdi32])
+ ])
+ VLC_ADD_LIBS([direct3d glwin32],[-lole32 -luuid])
+])
+AM_CONDITIONAL([HAVE_DIRECTX], [test "$have_directx" = "yes"])
dnl
dnl Windows Direct2D plugin
diff --git a/modules/audio_output/Modules.am b/modules/audio_output/Modules.am
index ea30d4d..de0c292 100644
--- a/modules/audio_output/Modules.am
+++ b/modules/audio_output/Modules.am
@@ -1,4 +1,3 @@
-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
diff --git a/modules/video_output/msw/Modules.am b/modules/video_output/msw/Modules.am
index fec095b..6ef2365 100644
--- a/modules/video_output/msw/Modules.am
+++ b/modules/video_output/msw/Modules.am
@@ -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 \
More information about the vlc-commits
mailing list