summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2014-11-20 09:49:44 +0100
committerGerd Hoffmann <kraxel@redhat.com>2015-03-12 15:49:57 +0100
commitda076ffed6b9a9cb6b1afce78a4de743212db36e (patch)
tree52e2baee8dff269166497351543d2ec2766025b8 /configure
parentd28d6505bd72f0d6e3e7a968c60c27f893da976e (diff)
downloadhqemu-da076ffed6b9a9cb6b1afce78a4de743212db36e.zip
hqemu-da076ffed6b9a9cb6b1afce78a4de743212db36e.tar.gz
configure: opengl overhaul
Rename config option from "glx" to "opengl", glx will not be the only option for opengl in near future. Also switch over to pkg-config for opengl support detection. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure39
1 files changed, 17 insertions, 22 deletions
diff --git a/configure b/configure
index 7ba4bcb..333d842 100755
--- a/configure
+++ b/configure
@@ -309,7 +309,7 @@ rbd=""
smartcard_nss=""
libusb=""
usb_redir=""
-glx=""
+opengl=""
zlib="yes"
lzo=""
snappy=""
@@ -1027,9 +1027,9 @@ for opt do
;;
--enable-vhost-scsi) vhost_scsi="yes"
;;
- --disable-glx) glx="no"
+ --disable-opengl) opengl="no"
;;
- --enable-glx) glx="yes"
+ --enable-opengl) opengl="yes"
;;
--disable-rbd) rbd="no"
;;
@@ -3107,23 +3107,18 @@ fi
libs_softmmu="$libs_softmmu $fdt_libs"
##########################################
-# GLX probe, used by milkymist-tmu2
-if test "$glx" != "no" ; then
- glx_libs="-lGL -lX11"
- cat > $TMPC << EOF
-#include <X11/Xlib.h>
-#include <GL/gl.h>
-#include <GL/glx.h>
-int main(void) { glBegin(0); glXQueryVersion(0,0,0); return 0; }
-EOF
- if compile_prog "" "-lGL -lX11" ; then
- glx=yes
+# opengl probe (for sdl2, milkymist-tmu2)
+if test "$opengl" != "no" ; then
+ opengl_pkgs="gl glx"
+ if $pkg_config $opengl_pkgs; then
+ opengl_libs="$($pkg_config --libs $opengl_pkgs) -lX11"
+ opengl=yes
else
- if test "$glx" = "yes" ; then
- feature_not_found "glx" "Install GL devel (e.g. MESA)"
+ if test "$opengl" = "yes" ; then
+ feature_not_found "opengl" "Install GL devel (e.g. MESA)"
fi
- glx_libs=
- glx=no
+ opengl_libs=""
+ opengl=no
fi
fi
@@ -4390,7 +4385,7 @@ echo "xfsctl support $xfs"
echo "nss used $smartcard_nss"
echo "libusb $libusb"
echo "usb net redir $usb_redir"
-echo "GLX support $glx"
+echo "OpenGL support $opengl"
echo "libiscsi support $libiscsi"
echo "libnfs support $libnfs"
echo "build guest agent $guest_agent"
@@ -4756,9 +4751,9 @@ if test "$usb_redir" = "yes" ; then
echo "CONFIG_USB_REDIR=y" >> $config_host_mak
fi
-if test "$glx" = "yes" ; then
- echo "CONFIG_GLX=y" >> $config_host_mak
- echo "GLX_LIBS=$glx_libs" >> $config_host_mak
+if test "$opengl" = "yes" ; then
+ echo "CONFIG_OPENGL=y" >> $config_host_mak
+ echo "OPENGL_LIBS=$opengl_libs" >> $config_host_mak
fi
if test "$lzo" = "yes" ; then
OpenPOWER on IntegriCloud