1
mirror of https://code.videolan.org/videolan/vlc synced 2024-09-04 09:11:33 +02:00

configure: fix Windows build when --disable-directx is used

Previously the wglew.h check would only be done when directx is enabled,
but when disabled, other OpenGL modules are still enabled and these
would break without the GL/wglew.h include, which would never be done
because HAVE_GL_WGLEW_H would not be defined.
This commit is contained in:
Marvin Scholz 2022-11-22 18:33:35 +01:00 committed by Steve Lhomme
parent a5ea1181bc
commit 2d151758ed

View File

@ -3245,6 +3245,14 @@ PKG_CHECK_MODULES([GL], [gl], [
have_gl="yes"
GL_LIBS="-lopengl32"
])
AC_CHECK_HEADERS([GL/glew.h], [
AC_CHECK_HEADERS([GL/wglew.h], [
VLC_ADD_PLUGIN([glwin32 wgl])
], [], [
#include <windows.h>
#include <GL/glew.h>
])
], [], [#include <windows.h>])
])
AC_MSG_CHECKING([for OpenGL])
AC_MSG_RESULT([${have_gl}])
@ -3597,17 +3605,6 @@ AC_ARG_ENABLE([directx],
])
])
AS_IF([test "${enable_directx}" != "no"], [
dnl OpenGL
AC_CHECK_HEADERS([GL/glew.h], [
AC_CHECK_HEADERS([GL/wglew.h], [
VLC_ADD_PLUGIN([glwin32 wgl])
],, [
#include <windows.h>
#include <GL/glew.h>
])],, [
#include <windows.h>
])
dnl Direct3D11
AC_CHECK_HEADERS([d3d11.h], [
VLC_ADD_PLUGIN([direct3d11 direct3d11_filters])