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

This commit is contained in:
ManoloFLTK 2022-11-23 17:24:20 +01:00
parent b684f70ad7
commit 27a6fd9609
2 changed files with 9 additions and 3 deletions

View File

@ -1044,9 +1044,11 @@ AS_CASE([$host_os_gui], [cygwin* | mingw*], [
AS_IF([test x$enable_gl != xno], [
AS_IF([$PKGCONFIG --exists gl], [
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"

View File

@ -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