[vlc-commits] configure: fix GL detection on Windows (close #11062)

Rémi Denis-Courmont git at videolan.org
Mon Mar 24 18:03:33 CET 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Mar 24 19:02:19 2014 +0200| [8c5e52f4e46a08009ec05b1761f359a44ef53523] | committer: Rémi Denis-Courmont

configure: fix GL detection on Windows (close #11062)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8c5e52f4e46a08009ec05b1761f359a44ef53523
---

 configure.ac |   18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3094c7f..334a671 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2993,27 +2993,25 @@ PKG_CHECK_MODULES([EGL], [egl], [
 ])
 AM_CONDITIONAL([HAVE_EGL], [test "${have_egl}" = "yes"])
 
+have_gl="no"
 PKG_CHECK_MODULES([GL], [gl], [
   have_gl="yes"
 ], [
-  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
-    [#include <GL/gl.h>]], [
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef _WIN32
+# include <GL/glew.h>
+#endif
+#include <GL/gl.h>
+]], [
     [int t0 = GL_TEXTURE0;]])
   ], [
     GL_CFLAGS=""
+    have_gl="yes"
     AS_IF([test "${SYS}" != "mingw32"], [
-      have_gl="yes"
       GL_LIBS="-lGL"
     ], [
-      AC_CHECK_HEADER([GL/glew.h], [
-        have_gl="yes"
-      ], [
-        have_gl="no"
-      ])
       GL_LIBS="-lopengl32"
     ])
-  ], [
-    have_gl="no"
   ])
 ])
 AM_CONDITIONAL([HAVE_GL], [test "${have_gl}" = "yes"])



More information about the vlc-commits mailing list