qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 6/9] fbdev: make configurable at compile time.


From: Gerd Hoffmann
Subject: [Qemu-devel] [PATCH 6/9] fbdev: make configurable at compile time.
Date: Tue, 18 Sep 2012 09:17:11 +0200

Add CONFIG_FBDEV, add --enable-fbdev and --disable-fbdev
configure switches so fbdev can be enabled/disabled at
compile time.

Signed-off-by: Gerd Hoffmann <address@hidden>
---
 configure        |   12 ++++++++++++
 qmp.c            |    2 +-
 ui/Makefile.objs |    2 +-
 vl.c             |    4 ++--
 4 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/configure b/configure
index 8564142..c4ba338 100755
--- a/configure
+++ b/configure
@@ -148,6 +148,7 @@ docs=""
 fdt=""
 nptl=""
 sdl=""
+fbdev="no"
 virtfs=""
 vnc="yes"
 sparse="no"
@@ -527,6 +528,7 @@ Haiku)
   usb="linux"
   kvm="yes"
   vhost_net="yes"
+  fbdev="yes"
   if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
     audio_possible_drivers="$audio_possible_drivers fmod"
   fi
@@ -658,6 +660,10 @@ for opt do
   ;;
   --enable-sdl) sdl="yes"
   ;;
+  --disable-fbdev) fbdev="no"
+  ;;
+  --enable-fbdev) fbdev="yes"
+  ;;
   --disable-virtfs) virtfs="no"
   ;;
   --enable-virtfs) virtfs="yes"
@@ -1070,6 +1076,8 @@ echo "  --disable-strip          disable stripping 
binaries"
 echo "  --disable-werror         disable compilation abort on warning"
 echo "  --disable-sdl            disable SDL"
 echo "  --enable-sdl             enable SDL"
+echo "  --disable-fbdev          disable linux framebuffer"
+echo "  --enable-fbdev           enable linux framebuffer"
 echo "  --disable-virtfs         disable VirtFS"
 echo "  --enable-virtfs          enable VirtFS"
 echo "  --disable-vnc            disable VNC"
@@ -3159,6 +3167,7 @@ if test "$darwin" = "yes" ; then
     echo "Cocoa support     $cocoa"
 fi
 echo "SDL support       $sdl"
+echo "fbdev support     $fbdev"
 echo "curses support    $curses"
 echo "curl support      $curl"
 echo "mingw32 support   $mingw32"
@@ -3367,6 +3376,9 @@ if test "$sdl" = "yes" ; then
   echo "CONFIG_SDL=y" >> $config_host_mak
   echo "SDL_CFLAGS=$sdl_cflags" >> $config_host_mak
 fi
+if test "$fbdev" = "yes" ; then
+  echo "CONFIG_FBDEV=y" >> $config_host_mak
+fi
 if test "$cocoa" = "yes" ; then
   echo "CONFIG_COCOA=y" >> $config_host_mak
 fi
diff --git a/qmp.c b/qmp.c
index 7f6cc0b..060d804 100644
--- a/qmp.c
+++ b/qmp.c
@@ -393,7 +393,7 @@ void qmp_change(const char *device, const char *target,
 
 void qmp_fbdev(bool enable, Error **errp)
 {
-#if defined(CONFIG_LINUX)
+#if defined(CONFIG_FBDEV)
     DisplayState *ds = get_displaystate();
 
     if (enable) {
diff --git a/ui/Makefile.objs b/ui/Makefile.objs
index 55ddcf2..479cd01 100644
--- a/ui/Makefile.objs
+++ b/ui/Makefile.objs
@@ -12,4 +12,4 @@ common-obj-$(CONFIG_SDL) += sdl.o sdl_zoom.o x_keymap.o
 common-obj-$(CONFIG_COCOA) += cocoa.o
 common-obj-$(CONFIG_CURSES) += curses.o
 common-obj-$(CONFIG_VNC) += $(vnc-obj-y)
-common-obj-$(CONFIG_LINUX) += fbdev.o
+common-obj-$(CONFIG_FBDEV) += fbdev.o
diff --git a/vl.c b/vl.c
index 18982b2..d39352c 100644
--- a/vl.c
+++ b/vl.c
@@ -3041,7 +3041,7 @@ int main(int argc, char **argv, char **envp)
                 fprintf(stderr, "SDL support is disabled\n");
                 exit(1);
 #endif
-#ifdef CONFIG_LINUX
+#ifdef CONFIG_FBDEV
             case QEMU_OPTION_fbdev:
                 display_type = DT_FBDEV;
                 break;
@@ -3686,7 +3686,7 @@ int main(int argc, char **argv, char **envp)
         curses_display_init(ds, full_screen);
         break;
 #endif
-#if defined(CONFIG_LINUX)
+#if defined(CONFIG_FBDEV)
     case DT_FBDEV:
         if (fbdev_display_init(ds, NULL) != 0) {
             exit(1);
-- 
1.7.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]