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>
This commit is contained in:
parent
d28d6505bd
commit
da076ffed6
39
configure
vendored
39
configure
vendored
@ -309,7 +309,7 @@ rbd=""
|
|||||||
smartcard_nss=""
|
smartcard_nss=""
|
||||||
libusb=""
|
libusb=""
|
||||||
usb_redir=""
|
usb_redir=""
|
||||||
glx=""
|
opengl=""
|
||||||
zlib="yes"
|
zlib="yes"
|
||||||
lzo=""
|
lzo=""
|
||||||
snappy=""
|
snappy=""
|
||||||
@ -1027,9 +1027,9 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--enable-vhost-scsi) vhost_scsi="yes"
|
--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"
|
--disable-rbd) rbd="no"
|
||||||
;;
|
;;
|
||||||
@ -3107,23 +3107,18 @@ fi
|
|||||||
libs_softmmu="$libs_softmmu $fdt_libs"
|
libs_softmmu="$libs_softmmu $fdt_libs"
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
# GLX probe, used by milkymist-tmu2
|
# opengl probe (for sdl2, milkymist-tmu2)
|
||||||
if test "$glx" != "no" ; then
|
if test "$opengl" != "no" ; then
|
||||||
glx_libs="-lGL -lX11"
|
opengl_pkgs="gl glx"
|
||||||
cat > $TMPC << EOF
|
if $pkg_config $opengl_pkgs; then
|
||||||
#include <X11/Xlib.h>
|
opengl_libs="$($pkg_config --libs $opengl_pkgs) -lX11"
|
||||||
#include <GL/gl.h>
|
opengl=yes
|
||||||
#include <GL/glx.h>
|
|
||||||
int main(void) { glBegin(0); glXQueryVersion(0,0,0); return 0; }
|
|
||||||
EOF
|
|
||||||
if compile_prog "" "-lGL -lX11" ; then
|
|
||||||
glx=yes
|
|
||||||
else
|
else
|
||||||
if test "$glx" = "yes" ; then
|
if test "$opengl" = "yes" ; then
|
||||||
feature_not_found "glx" "Install GL devel (e.g. MESA)"
|
feature_not_found "opengl" "Install GL devel (e.g. MESA)"
|
||||||
fi
|
fi
|
||||||
glx_libs=
|
opengl_libs=""
|
||||||
glx=no
|
opengl=no
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -4390,7 +4385,7 @@ echo "xfsctl support $xfs"
|
|||||||
echo "nss used $smartcard_nss"
|
echo "nss used $smartcard_nss"
|
||||||
echo "libusb $libusb"
|
echo "libusb $libusb"
|
||||||
echo "usb net redir $usb_redir"
|
echo "usb net redir $usb_redir"
|
||||||
echo "GLX support $glx"
|
echo "OpenGL support $opengl"
|
||||||
echo "libiscsi support $libiscsi"
|
echo "libiscsi support $libiscsi"
|
||||||
echo "libnfs support $libnfs"
|
echo "libnfs support $libnfs"
|
||||||
echo "build guest agent $guest_agent"
|
echo "build guest agent $guest_agent"
|
||||||
@ -4756,9 +4751,9 @@ if test "$usb_redir" = "yes" ; then
|
|||||||
echo "CONFIG_USB_REDIR=y" >> $config_host_mak
|
echo "CONFIG_USB_REDIR=y" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$glx" = "yes" ; then
|
if test "$opengl" = "yes" ; then
|
||||||
echo "CONFIG_GLX=y" >> $config_host_mak
|
echo "CONFIG_OPENGL=y" >> $config_host_mak
|
||||||
echo "GLX_LIBS=$glx_libs" >> $config_host_mak
|
echo "OPENGL_LIBS=$opengl_libs" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$lzo" = "yes" ; then
|
if test "$lzo" = "yes" ; then
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
CONFIG_LM32=y
|
CONFIG_LM32=y
|
||||||
CONFIG_MILKYMIST=y
|
CONFIG_MILKYMIST=y
|
||||||
CONFIG_MILKYMIST_TMU2=$(CONFIG_GLX)
|
CONFIG_MILKYMIST_TMU2=$(CONFIG_OPENGL)
|
||||||
CONFIG_FRAMEBUFFER=y
|
CONFIG_FRAMEBUFFER=y
|
||||||
CONFIG_PTIMER=y
|
CONFIG_PTIMER=y
|
||||||
CONFIG_PFLASH_CFI01=y
|
CONFIG_PFLASH_CFI01=y
|
||||||
|
@ -20,7 +20,7 @@ common-obj-$(CONFIG_ZAURUS) += tc6393xb.o
|
|||||||
|
|
||||||
ifeq ($(CONFIG_MILKYMIST_TMU2),y)
|
ifeq ($(CONFIG_MILKYMIST_TMU2),y)
|
||||||
common-obj-y += milkymist-tmu2.o
|
common-obj-y += milkymist-tmu2.o
|
||||||
libs_softmmu += $(GLX_LIBS)
|
libs_softmmu += $(OPENGL_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
obj-$(CONFIG_OMAP) += omap_dss.o
|
obj-$(CONFIG_OMAP) += omap_dss.o
|
||||||
|
@ -86,7 +86,7 @@ static inline DeviceState *milkymist_pfpu_create(hwaddr base,
|
|||||||
return dev;
|
return dev;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_GLX
|
#ifdef CONFIG_OPENGL
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <GL/glx.h>
|
#include <GL/glx.h>
|
||||||
static const int glx_fbconfig_attr[] = {
|
static const int glx_fbconfig_attr[] = {
|
||||||
@ -100,7 +100,7 @@ static const int glx_fbconfig_attr[] = {
|
|||||||
static inline DeviceState *milkymist_tmu2_create(hwaddr base,
|
static inline DeviceState *milkymist_tmu2_create(hwaddr base,
|
||||||
qemu_irq irq)
|
qemu_irq irq)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_GLX
|
#ifdef CONFIG_OPENGL
|
||||||
DeviceState *dev;
|
DeviceState *dev;
|
||||||
Display *d;
|
Display *d;
|
||||||
GLXFBConfig *configs;
|
GLXFBConfig *configs;
|
||||||
|
@ -114,6 +114,7 @@ extern int graphic_width;
|
|||||||
extern int graphic_height;
|
extern int graphic_height;
|
||||||
extern int graphic_depth;
|
extern int graphic_depth;
|
||||||
extern DisplayType display_type;
|
extern DisplayType display_type;
|
||||||
|
extern int display_opengl;
|
||||||
extern const char *keyboard_layout;
|
extern const char *keyboard_layout;
|
||||||
extern int win2k_install_hack;
|
extern int win2k_install_hack;
|
||||||
extern int alt_grab;
|
extern int alt_grab;
|
||||||
|
1
vl.c
1
vl.c
@ -130,6 +130,7 @@ static int data_dir_idx;
|
|||||||
const char *bios_name = NULL;
|
const char *bios_name = NULL;
|
||||||
enum vga_retrace_method vga_retrace_method = VGA_RETRACE_DUMB;
|
enum vga_retrace_method vga_retrace_method = VGA_RETRACE_DUMB;
|
||||||
DisplayType display_type = DT_DEFAULT;
|
DisplayType display_type = DT_DEFAULT;
|
||||||
|
int display_opengl;
|
||||||
static int display_remote;
|
static int display_remote;
|
||||||
const char* keyboard_layout = NULL;
|
const char* keyboard_layout = NULL;
|
||||||
ram_addr_t ram_size;
|
ram_addr_t ram_size;
|
||||||
|
Loading…
Reference in New Issue
Block a user