configure, meson: Use legacy gl/epoxy detection for now

This commit is contained in:
Matt Borgerson 2023-01-23 00:47:13 -07:00
parent 577c469ae1
commit e1cd23213f
2 changed files with 20 additions and 5 deletions

14
configure vendored
View File

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

View File

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