From 20ff075bb3340c5278a0da38ad1f4d602565aa06 Mon Sep 17 00:00:00 2001 From: Michael Walle Date: Mon, 7 Mar 2011 23:32:39 +0100 Subject: configure: add opengl detection This patch introduce a new config option CONFIG_OPENGL. Signed-off-by: Michael Walle Signed-off-by: Edgar E. Iglesias --- configure | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'configure') 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 +#include +#include +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 -- cgit v1.2.3-55-g7522