aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki@gmail.com>2021-02-23 15:03:07 +0900
committerGerd Hoffmann <kraxel@redhat.com>2021-03-04 09:35:30 +0100
commitbc6a3565c89243f0aaa24bac6dc37fb52b16d5c5 (patch)
treec67c6b57bd5832fbf17c70bc2fae1d9c91d54b91 /configure
parentd9c32b8f7f5f05511d77a1ec1d1d35bf7bff2961 (diff)
configure: Improve OpenGL dependency detections
This has the following visible changes: - GBM is required only for OpenGL dma-buf. - X11 is explicitly required by gtk-egl. - EGL is now mandatory for the OpenGL displays. The last one needs some detailed description. Before this change, EGL was tested only for OpenGL dma-buf with the check of EGL_MESA_image_dma_buf_export. However, all of the OpenGL displays depend on EGL and EGL_MESA_image_dma_buf_export is always defined by epoxy's EGL interface. Therefore, it makes more sense to always check the presence of EGL and say the OpenGL displays are available along with OpenGL dma-buf if it is present. Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> Message-Id: <20210223060307.87736-1-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure37
1 files changed, 15 insertions, 22 deletions
diff --git a/configure b/configure
index a79b3746d4..b922d1ea26 100755
--- a/configure
+++ b/configure
@@ -394,7 +394,6 @@ u2f="auto"
libusb="$default_feature"
usb_redir="$default_feature"
opengl="$default_feature"
-opengl_dmabuf="no"
cpuid_h="no"
avx2_opt="$default_feature"
capstone="auto"
@@ -3607,14 +3606,24 @@ if $pkg_config gbm; then
fi
if test "$opengl" != "no" ; then
- opengl_pkgs="epoxy gbm"
- if $pkg_config $opengl_pkgs; then
- opengl_cflags="$($pkg_config --cflags $opengl_pkgs)"
- opengl_libs="$($pkg_config --libs $opengl_pkgs)"
+ epoxy=no
+ if $pkg_config epoxy; then
+ cat > $TMPC << EOF
+#include <epoxy/egl.h>
+int main(void) { return 0; }
+EOF
+ if compile_prog "" "" ; then
+ epoxy=yes
+ fi
+ fi
+
+ if test "$epoxy" = "yes" ; then
+ opengl_cflags="$($pkg_config --cflags epoxy)"
+ opengl_libs="$($pkg_config --libs epoxy)"
opengl=yes
else
if test "$opengl" = "yes" ; then
- feature_not_found "opengl" "Please install opengl (mesa) devel pkgs: $opengl_pkgs"
+ feature_not_found "opengl" "Please install epoxy with EGL"
fi
opengl_cflags=""
opengl_libs=""
@@ -3622,19 +3631,6 @@ if test "$opengl" != "no" ; then
fi
fi
-if test "$opengl" = "yes"; then
- cat > $TMPC << EOF
-#include <epoxy/egl.h>
-#ifndef EGL_MESA_image_dma_buf_export
-# error mesa/epoxy lacks support for dmabufs (mesa 10.6+)
-#endif
-int main(void) { return 0; }
-EOF
- if compile_prog "" "" ; then
- opengl_dmabuf=yes
- fi
-fi
-
##########################################
# libxml2 probe
if test "$libxml2" != "no" ; then
@@ -5837,9 +5833,6 @@ if test "$opengl" = "yes" ; then
echo "CONFIG_OPENGL=y" >> $config_host_mak
echo "OPENGL_CFLAGS=$opengl_cflags" >> $config_host_mak
echo "OPENGL_LIBS=$opengl_libs" >> $config_host_mak
- if test "$opengl_dmabuf" = "yes" ; then
- echo "CONFIG_OPENGL_DMABUF=y" >> $config_host_mak
- fi
fi
if test "$gbm" = "yes" ; then