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>
This commit is contained in:
parent
9683242448
commit
20ff075bb3
30
configure
vendored
30
configure
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user