FLTK logo

[master] 27a6fd9 - Configure-based build: control presence of GL-related packages

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 27a6fd9 - Configure-based build: control presence of GL-related packages "ManoloFLTK" Nov 23, 2022  
 
commit 27a6fd9609c08b60057b0482a835dc27a64a0786
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Wed Nov 23 17:24:20 2022 +0100
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Wed Nov 23 17:24:59 2022 +0100

    Configure-based build: control presence of GL-related packages

 configure.ac                                        | 8 +++++---
 src/drivers/Wayland/fl_wayland_gl_platform_init.cxx | 4 ++++
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git configure.ac configure.ac
index d56b2b6..5e962cc 100644
--- configure.ac
+++ configure.ac
@@ -1044,9 +1044,11 @@ AS_CASE([$host_os_gui], [cygwin* | mingw*], [
 
       AS_IF([test x$enable_gl != xno], [
           AS_IF([$PKGCONFIG --exists gl], [
-             AC_DEFINE([HAVE_GL])
-             GLLIBS="$($PKGCONFIG --libs wayland-egl) $($PKGCONFIG --libs egl) $($PKGCONFIG --libs gl) $GLLIBS"
-          ])
+            AS_IF([$PKGCONFIG --exists egl], [
+              AS_IF([$PKGCONFIG --exists wayland-egl], [
+                AC_DEFINE([HAVE_GL])
+                GLLIBS="$($PKGCONFIG --libs wayland-egl) $($PKGCONFIG --libs egl) $($PKGCONFIG --libs gl) $GLLIBS"
+          ])])])
           AS_IF([$PKGCONFIG --exists glu], [
              AC_DEFINE([HAVE_GL_GLU_H])
              GLLIBS="$($PKGCONFIG --libs glu) $GLLIBS"
diff --git src/drivers/Wayland/fl_wayland_gl_platform_init.cxx src/drivers/Wayland/fl_wayland_gl_platform_init.cxx
index 293641d..1c734be 100644
--- src/drivers/Wayland/fl_wayland_gl_platform_init.cxx
+++ src/drivers/Wayland/fl_wayland_gl_platform_init.cxx
@@ -14,6 +14,8 @@
 //     https://www.fltk.org/bugs.php
 //
 
+#include <config.h>
+#if HAVE_GL
 
 #include "Fl_Wayland_Gl_Window_Driver.H"
 #include "Fl_Wayland_Screen_Driver.H"
@@ -30,3 +32,5 @@ Fl_Gl_Window_Driver *Fl_Gl_Window_Driver::newGlWindowDriver(Fl_Gl_Window *w)
   return new Fl_Wayland_Gl_Window_Driver(w);
 #endif
 }
+
+#endif // HAVE_GL
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.