From e1cd23213f8b1cc0099d8440306543990fa95b37 Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Mon, 23 Jan 2023 00:47:13 -0700 Subject: [PATCH] configure, meson: Use legacy gl/epoxy detection for now --- configure | 14 ++++++++++++++ meson.build | 11 ++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/configure b/configure index a88f43e208..fc71701bbb 100755 --- a/configure +++ b/configure @@ -1550,6 +1550,16 @@ case "$fdt" in ;; esac +########################################## +# epoxy probe +if $pkg_config --libs --silence-errors epoxy > /dev/null 2>&1 ; then + epoxy_libs=$($pkg_config --libs --silence-errors epoxy) + epoxy_cflags=$($pkg_config --cflags --silence-errors epoxy) +else + error_exit "epoxy not present." \ + "Please install the epoxy devel package." +fi + ########################################## # check and set a backend for coroutine @@ -2424,6 +2434,10 @@ echo "GLIB_VERSION=$(pkg-config --modversion glib-2.0)" >> $config_host_mak echo "QEMU_LDFLAGS=$QEMU_LDFLAGS" >> $config_host_mak echo "EXESUF=$EXESUF" >> $config_host_mak +# FIXME: Use meson +echo "EPOXY_CFLAGS=$epoxy_cflags" >> $config_host_mak +echo "EPOXY_LIBS=$epoxy_libs" >> $config_host_mak + # use included Linux headers if test "$linux" = "yes" ; then mkdir -p linux-headers diff --git a/meson.build b/meson.build index 7a6a85d5cf..691c3b9047 100644 --- a/meson.build +++ b/meson.build @@ -1160,16 +1160,17 @@ opengl = not_found if not get_option('opengl').auto() or have_system or have_vhost_user_gpu # FIXME: Use meson's 'gl' dep if targetos == 'darwin' - opengl_libs=['-framework OpenGL'] + opengl_libs=['-framework', 'OpenGL'] elif targetos == 'windows' opengl_libs=['-lopengl32', '-lgdi32'] elif targetos == 'linux' opengl_libs=['-lGLU', '-lGL'] + else + error('Unknown GL platform') endif - epoxy = dependency('epoxy', method: 'pkg-config', - required: true, kwargs: static_kwargs) - opengl = declare_dependency(link_args: opengl_libs, - dependencies: epoxy) + + opengl = declare_dependency(compile_args: config_host['EPOXY_CFLAGS'].split(), + link_args: config_host['EPOXY_LIBS'].split() + opengl_libs) endif gbm = not_found