From 3e43f25a81aabddc3978ee47b2ffc869f6881c7c Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Thu, 12 Mar 2020 03:30:29 -0700 Subject: [PATCH] configure: Try to make OpenGL enabling a little more consistent --- build.sh | 1 + configure | 62 +++++++++++++++++++++++++++++-------------------------- 2 files changed, 34 insertions(+), 29 deletions(-) diff --git a/build.sh b/build.sh index 04ce173e75..c6513b8f55 100755 --- a/build.sh +++ b/build.sh @@ -83,6 +83,7 @@ set -x # Print commands from now on --target-list=i386-softmmu \ --enable-trace-backends="nop" \ --enable-sdl \ + --enable-opengl \ --disable-curl \ --disable-vnc \ --disable-vnc-sasl \ diff --git a/configure b/configure index 5082cd03de..f4d962493a 100755 --- a/configure +++ b/configure @@ -3282,35 +3282,6 @@ EOF fi fi - -# Xbox hack to include ogl framework -if test "$darwin" = "yes" ; then - sdl_libs="$sdl_libs -framework OpenGL" -# cat > $TMPC << EOF -# #include -# #include -# #include -# int main(void) { return GL_VERSION != 0; } -# EOF -fi - -if test "$linux" = "yes" ; then - sdl_libs="$sdl_libs -lGLU -lGL" -fi - -########################################## -# epoxy probe - -if $pkg_config --exists epoxy ; then - epoxy_libs=$($pkg_config --libs epoxy) - epoxy_flags=$($pkg_config --cflags epoxy) -else - error_exit "epoxy not present." \ - "Please install the epoxy devel package." -fi -LIBS="$LIBS $epoxy_libs" -QEMU_CFLAGS="$QEMU_CFLAGS $epoxy_flags" - ########################################## # RDMA needs OpenFabrics libraries if test "$rdma" != "no" ; then @@ -4344,6 +4315,9 @@ if $pkg_config gbm; then gbm="yes" fi +# XBOX: Just skip this, don't need it rn +if false ; then + if test "$opengl" != "no" ; then opengl_pkgs="epoxy gbm" if $pkg_config $opengl_pkgs; then @@ -4387,6 +4361,36 @@ if test "$opengl" = "yes" && test "$have_x11" = "yes"; then done fi +fi # XBOX + +# XBOX +if test "$opengl" != "no" ; then + if test "$darwin" = "yes" ; then + opengl_libs="$opengl_libs -framework OpenGL" + elif test "$mingw32" = "yes" ; then + opengl_libs="$opengl_libs -lopengl32 -lgdi32" + elif test "$linux" = "yes" ; then + opengl_libs="$opengl_libs -lGLU -lGL" + fi + opengl_libs="$opengl_libs $($pkg_config --libs epoxy)" + opengl_cflags="$opengl_cflags $($pkg_config --cflags epoxy)" + QEMU_CFLAGS="$QEMU_CFLAGS $opengl_cflags" +fi # test "$opengl" != "no" + +########################################## +# epoxy probe + +# if $pkg_config --exists epoxy ; then +# epoxy_libs=$($pkg_config --libs epoxy) +# epoxy_flags=$($pkg_config --cflags epoxy) +# else +# error_exit "epoxy not present." \ +# "Please install the epoxy devel package." +# fi +# LIBS="$LIBS $epoxy_libs" +# QEMU_CFLAGS="$QEMU_CFLAGS $epoxy_flags" + + ########################################## # libxml2 probe if test "$libxml2" != "no" ; then