diff --git a/configure.ac b/configure.ac index a2b8ade789..7a35abd06f 100644 --- a/configure.ac +++ b/configure.ac @@ -3436,12 +3436,15 @@ AS_IF([test "${enable_directx}" != "no"], [ ]) dnl OpenGL - AC_CHECK_HEADERS([GL/wglew.h], [ - VLC_ADD_PLUGIN([glwin32 wgl]) - ],, [ - #include - #include - ]) + AC_CHECK_HEADERS([GL/glew.h], [ + AC_CHECK_HEADERS([GL/wglew.h], [ + VLC_ADD_PLUGIN([glwin32 wgl]) + ],, [ + #include + #include + ])],, [ + #include + ]) dnl Direct3D11 AC_CHECK_HEADERS([d3d11.h], [ diff --git a/modules/video_output/opengl/converter.h b/modules/video_output/opengl/converter.h index e75a733c67..a1dd68c767 100644 --- a/modules/video_output/opengl/converter.h +++ b/modules/video_output/opengl/converter.h @@ -45,7 +45,7 @@ # include # include # else -# ifdef _WIN32 +# ifdef HAVE_GL_WGLEW_H # include # endif # include diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c index 6e3bcb799e..da99916668 100644 --- a/modules/video_output/win32/direct3d9.c +++ b/modules/video_output/win32/direct3d9.c @@ -1747,8 +1747,9 @@ static void Close(vout_display_t *vd) free(vd->sys); } -#ifdef HAVE_GL +#if defined(HAVE_GL) && defined(HAVE_GL_WGLEW_H) #include "../opengl/converter.h" +#include #include struct wgl_vt { diff --git a/modules/video_output/win32/wgl.c b/modules/video_output/win32/wgl.c index 51ec9b8176..a4325ea32d 100644 --- a/modules/video_output/win32/wgl.c +++ b/modules/video_output/win32/wgl.c @@ -29,6 +29,7 @@ #include #include "../opengl/vout_helper.h" +#include #include #include "common.h"