GTK+: OpenGL: Don't link libGL directly.

This commit is contained in:
Brandon Wright 2018-12-04 16:06:04 -06:00
parent a573dee5fe
commit bbebb2255a
1 changed files with 6 additions and 11 deletions

View File

@ -167,18 +167,13 @@ PKG_CHECK_MODULES([GLIB], [glib-2.0 > 2.28 gthread-2.0 >= 2.6 gobject-2.0 >= 2.6
PKG_CHECK_MODULES([XRANDR], [xrandr]) PKG_CHECK_MODULES([XRANDR], [xrandr])
if test yes = "$with_opengl" ; then if test yes = "$with_opengl" ; then
PKG_CHECK_MODULES([EPOXY], [epoxy], [
AC_CHECK_LIB(GL,glGetString,[ CFLAGS="$CFLAGS $EPOXY_CFLAGS -DUSE_OPENGL"
OPENGL=yes LIBS="$LIBS $EPOXY_LIBS"
CFLAGS="$CFLAGS -DUSE_OPENGL" ], [
LIBS="$LIBS -lGL" echo "Couldn't find libepoxy. Disabling OpenGL."
],[ OPENGL=no
OPENGL=0
]) ])
PKG_CHECK_MODULES([EPOXY], [epoxy]);
CFLAGS="$CFLAGS $EPOXY_CFLAGS"
LIBS="$LIBS $EPOXY_LIBS"
fi fi
WAYLAND=no WAYLAND=no