summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorMichael Walle2011-03-07 23:32:39 +0100
committerEdgar E. Iglesias2011-04-04 10:26:53 +0200
commit20ff075bb3340c5278a0da38ad1f4d602565aa06 (patch)
tree472e4cd8091e4e6088935be316e151bb49e9c357 /configure
parentlm32: add Milkymist System Controller support (diff)
downloadqemu-20ff075bb3340c5278a0da38ad1f4d602565aa06.tar.gz
qemu-20ff075bb3340c5278a0da38ad1f4d602565aa06.tar.xz
qemu-20ff075bb3340c5278a0da38ad1f4d602565aa06.zip
configure: add opengl detection
This patch introduce a new config option CONFIG_OPENGL. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure30
1 files changed, 30 insertions, 0 deletions
diff --git a/configure b/configure
index 2e7b4f8718..faaed60540 100755
--- a/configure
+++ b/configure
@@ -720,6 +720,10 @@ for opt do
;;
--enable-vhost-net) vhost_net="yes"
;;
+ --disable-opengl) opengl="no"
+ ;;
+ --enable-opengl) opengl="yes"
+ ;;
--*dir)
;;
--disable-rbd) rbd="no"
@@ -1944,6 +1948,27 @@ EOF
fi
fi
+##########################################
+# opengl probe, used by milkymist-tmu2
+if test "$opengl" != "no" ; then
+ opengl_libs="-lGL"
+ cat > $TMPC << EOF
+#include <X11/Xlib.h>
+#include <GL/gl.h>
+#include <GL/glx.h>
+int main(void) { GL_VERSION; return 0; }
+EOF
+ if compile_prog "" "-lGL" ; then
+ opengl=yes
+ libs_softmmu="$opengl_libs $libs_softmmu"
+ else
+ if test "$opengl" = "yes" ; then
+ feature_not_found "opengl"
+ fi
+ opengl=no
+ fi
+fi
+
#
# Check for xxxat() functions when we are building linux-user
# emulator. This is done because older glibc versions don't
@@ -2582,6 +2607,7 @@ echo "spice support $spice"
echo "rbd support $rbd"
echo "xfsctl support $xfs"
echo "nss used $smartcard_nss"
+echo "OpenGL support $opengl"
if test $sdl_too_old = "yes"; then
echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -2872,6 +2898,10 @@ if test "$smartcard_nss" = "yes" ; then
echo "CONFIG_SMARTCARD_NSS=y" >> $config_host_mak
fi
+if test "$opengl" = "yes" ; then
+ echo "CONFIG_OPENGL=y" >> $config_host_mak
+fi
+
# XXX: suppress that
if [ "$bsd" = "yes" ] ; then
echo "CONFIG_BSD=y" >> $config_host_mak