From nobody Fri Oct 24 09:58:53 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1519219272912275.7586970007279; Wed, 21 Feb 2018 05:21:12 -0800 (PST) Received: from localhost ([::1]:60746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUKc-000759-1y for importer@patchew.org; Wed, 21 Feb 2018 08:21:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57710) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUFS-0003G0-0m for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoUFO-0007Uf-Uo for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:49 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:44132 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eoUFO-0007Sw-LZ for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:46 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 222BD40A0971 for ; Wed, 21 Feb 2018 13:15:43 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-147.ams2.redhat.com [10.36.116.147]) by smtp.corp.redhat.com (Postfix) with ESMTP id 19A272026E03; Wed, 21 Feb 2018 13:15:38 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 5357B17514; Wed, 21 Feb 2018 14:15:37 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 21 Feb 2018 14:15:26 +0100 Message-Id: <20180221131537.31341-2-kraxel@redhat.com> In-Reply-To: <20180221131537.31341-1-kraxel@redhat.com> References: <20180221131537.31341-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 21 Feb 2018 13:15:43 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 21 Feb 2018 13:15:43 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 01/12] console: add qemu display registry, add gtk X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Markus Armbruster , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add a registry for user interfaces. Add qemu_display_init and qemu_display_early_init helper functions for display initialization. Hook up gtk ui as first user. Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 32 ++++++++++++-------------------- ui/console.c | 34 ++++++++++++++++++++++++++++++++++ ui/gtk.c | 17 +++++++++++++++-- vl.c | 18 ++++++------------ 4 files changed, 67 insertions(+), 34 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index e6b1227bef..ce3589aadd 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -429,6 +429,18 @@ void surface_gl_setup_viewport(QemuGLShader *gls, int ww, int wh); #endif =20 +typedef struct QemuDisplay QemuDisplay; + +struct QemuDisplay { + DisplayType type; + void (*early_init)(DisplayOptions *opts); + void (*init)(DisplayState *ds, DisplayOptions *opts); +}; + +void qemu_display_register(QemuDisplay *ui); +void qemu_display_early_init(DisplayOptions *opts); +void qemu_display_init(DisplayState *ds, DisplayOptions *opts); + /* sdl.c */ #ifdef CONFIG_SDL void sdl_display_early_init(DisplayOptions *opts); @@ -484,26 +496,6 @@ static inline void curses_display_init(DisplayState *d= s, DisplayOptions *opts) /* input.c */ int index_from_key(const char *key, size_t key_length); =20 -/* gtk.c */ -#ifdef CONFIG_GTK -void early_gtk_display_init(DisplayOptions *opts); -void gtk_display_init(DisplayState *ds, DisplayOptions *opts); -#else -static inline void gtk_display_init(DisplayState *ds, DisplayOptions *opts) -{ - /* This must never be called if CONFIG_GTK is disabled */ - error_report("GTK support is disabled"); - abort(); -} - -static inline void early_gtk_display_init(DisplayOptions *opts) -{ - /* This must never be called if CONFIG_GTK is disabled */ - error_report("GTK support is disabled"); - abort(); -} -#endif - /* egl-headless.c */ void egl_headless_init(DisplayOptions *opts); =20 diff --git a/ui/console.c b/ui/console.c index 36584d039e..8e55a05108 100644 --- a/ui/console.c +++ b/ui/console.c @@ -2170,6 +2170,40 @@ PixelFormat qemu_default_pixelformat(int bpp) return pf; } =20 +static QemuDisplay *dpys[DISPLAY_TYPE__MAX]; + +void qemu_display_register(QemuDisplay *ui) +{ + assert(ui->type < DISPLAY_TYPE__MAX); + dpys[ui->type] =3D ui; +} + +void qemu_display_early_init(DisplayOptions *opts) +{ + assert(opts->type < DISPLAY_TYPE__MAX); + if (opts->type =3D=3D DISPLAY_TYPE_NONE) { + return; + } + if (dpys[opts->type] =3D=3D NULL) { + error_report("Display '%s' is not available.", + DisplayType_lookup.array[opts->type]); + exit(1); + } + if (dpys[opts->type]->early_init) { + dpys[opts->type]->early_init(opts); + } +} + +void qemu_display_init(DisplayState *ds, DisplayOptions *opts) +{ + assert(opts->type < DISPLAY_TYPE__MAX); + if (opts->type =3D=3D DISPLAY_TYPE_NONE) { + return; + } + assert(dpys[opts->type] !=3D NULL); + dpys[opts->type]->init(ds, opts); +} + void qemu_chr_parse_vc(QemuOpts *opts, ChardevBackend *backend, Error **er= rp) { int val; diff --git a/ui/gtk.c b/ui/gtk.c index ab646b70e1..c63408e036 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -2297,7 +2297,7 @@ static void gd_create_menus(GtkDisplayState *s) =20 static gboolean gtkinit; =20 -void gtk_display_init(DisplayState *ds, DisplayOptions *opts) +static void gtk_display_init(DisplayState *ds, DisplayOptions *opts) { VirtualConsole *vc; =20 @@ -2407,7 +2407,7 @@ void gtk_display_init(DisplayState *ds, DisplayOption= s *opts) } } =20 -void early_gtk_display_init(DisplayOptions *opts) +static void early_gtk_display_init(DisplayOptions *opts) { /* The QEMU code relies on the assumption that it's always run in * the C locale. Therefore it is not prepared to deal with @@ -2450,3 +2450,16 @@ void early_gtk_display_init(DisplayOptions *opts) type_register(&char_gd_vc_type_info); #endif } + +static QemuDisplay qemu_display_gtk =3D { + .type =3D DISPLAY_TYPE_GTK, + .early_init =3D early_gtk_display_init, + .init =3D gtk_display_init, +}; + +static void register_gtk(void) +{ + qemu_display_register(&qemu_display_gtk); +} + +type_init(register_gtk); diff --git a/vl.c b/vl.c index 9e7235df6d..70458ba708 100644 --- a/vl.c +++ b/vl.c @@ -2173,7 +2173,6 @@ static void parse_display(const char *p) exit(1); #endif } else if (strstart(p, "gtk", &opts)) { -#ifdef CONFIG_GTK dpy.type =3D DISPLAY_TYPE_GTK; while (*opts) { const char *nextopt; @@ -2205,10 +2204,6 @@ static void parse_display(const char *p) } opts =3D nextopt; } -#else - error_report("GTK support is disabled"); - exit(1); -#endif } else if (strstart(p, "none", &opts)) { dpy.type =3D DISPLAY_TYPE_NONE; } else { @@ -4318,6 +4313,9 @@ int main(int argc, char **argv, char **envp) dpy.type =3D DISPLAY_TYPE_NONE; #endif } + if (dpy.type =3D=3D DISPLAY_TYPE_DEFAULT) { + dpy.type =3D DISPLAY_TYPE_NONE; + } =20 if ((no_frame || alt_grab || ctrl_grab) && dpy.type !=3D DISPLAY_TYPE_= SDL) { error_report("-no-frame, -alt-grab and -ctrl-grab are only valid " @@ -4329,12 +4327,10 @@ int main(int argc, char **argv, char **envp) "ignoring option"); } =20 - if (dpy.type =3D=3D DISPLAY_TYPE_GTK) { - early_gtk_display_init(&dpy); - } - if (dpy.type =3D=3D DISPLAY_TYPE_SDL) { sdl_display_early_init(&dpy); + } else { + qemu_display_early_init(&dpy); } =20 qemu_console_early_init(); @@ -4674,10 +4670,8 @@ int main(int argc, char **argv, char **envp) case DISPLAY_TYPE_COCOA: cocoa_display_init(ds, &dpy); break; - case DISPLAY_TYPE_GTK: - gtk_display_init(ds, &dpy); - break; default: + qemu_display_init(ds, &dpy); break; } =20 --=20 2.9.3 From nobody Fri Oct 24 09:58:53 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1519219096268956.9496890571495; Wed, 21 Feb 2018 05:18:16 -0800 (PST) Received: from localhost ([::1]:60730 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUHh-0004Xr-87 for importer@patchew.org; Wed, 21 Feb 2018 08:18:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUFS-0003Fv-0L for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoUFO-0007Uj-Vc for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:49 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:43912 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eoUFO-0007Ss-LX for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:46 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A9732857A1 for ; Wed, 21 Feb 2018 13:15:44 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-147.ams2.redhat.com [10.36.116.147]) by smtp.corp.redhat.com (Postfix) with ESMTP id 19A44B078D; Wed, 21 Feb 2018 13:15:38 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 5EB4D17515; Wed, 21 Feb 2018 14:15:37 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 21 Feb 2018 14:15:27 +0100 Message-Id: <20180221131537.31341-3-kraxel@redhat.com> In-Reply-To: <20180221131537.31341-1-kraxel@redhat.com> References: <20180221131537.31341-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 21 Feb 2018 13:15:44 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 21 Feb 2018 13:15:44 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 02/12] sdl: switch over to new display registry X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Markus Armbruster , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 19 ------------------- ui/sdl.c | 24 +++++++++++++----------- ui/sdl2.c | 17 +++++++++++++++-- vl.c | 15 +-------------- 4 files changed, 29 insertions(+), 46 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index ce3589aadd..82bbea0242 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -441,25 +441,6 @@ void qemu_display_register(QemuDisplay *ui); void qemu_display_early_init(DisplayOptions *opts); void qemu_display_init(DisplayState *ds, DisplayOptions *opts); =20 -/* sdl.c */ -#ifdef CONFIG_SDL -void sdl_display_early_init(DisplayOptions *opts); -void sdl_display_init(DisplayState *ds, DisplayOptions *opts); -#else -static inline void sdl_display_early_init(DisplayOptions *opts) -{ - /* This must never be called if CONFIG_SDL is disabled */ - error_report("SDL support is disabled"); - abort(); -} -static inline void sdl_display_init(DisplayState *ds, DisplayOptions *opts) -{ - /* This must never be called if CONFIG_SDL is disabled */ - error_report("SDL support is disabled"); - abort(); -} -#endif - /* cocoa.m */ #ifdef CONFIG_COCOA void cocoa_display_init(DisplayState *ds, DisplayOptions *opts); diff --git a/ui/sdl.c b/ui/sdl.c index 963cdf77a7..153cbc6d1c 100644 --- a/ui/sdl.c +++ b/ui/sdl.c @@ -897,17 +897,7 @@ static const DisplayChangeListenerOps dcl_ops =3D { .dpy_cursor_define =3D sdl_mouse_define, }; =20 -void sdl_display_early_init(DisplayOptions *opts) -{ - if (opts->has_gl && opts->gl) { - fprintf(stderr, - "SDL1 display code has no opengl support.\n" - "Please recompile qemu with SDL2, using\n" - "./configure --enable-sdl --with-sdlabi=3D2.0\n"); - } -} - -void sdl_display_init(DisplayState *ds, DisplayOptions *o) +static void sdl1_display_init(DisplayState *ds, DisplayOptions *o) { int flags; uint8_t data =3D 0; @@ -1019,3 +1009,15 @@ void sdl_display_init(DisplayState *ds, DisplayOptio= ns *o) =20 atexit(sdl_cleanup); } + +static QemuDisplay qemu_display_sdl1 =3D { + .type =3D DISPLAY_TYPE_SDL, + .init =3D sdl1_display_init, +}; + +static void register_sdl1(void) +{ + qemu_display_register(&qemu_display_sdl1); +} + +type_init(register_sdl1); diff --git a/ui/sdl2.c b/ui/sdl2.c index 6e96a4a24c..f17d039650 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -759,7 +759,7 @@ static const DisplayChangeListenerOps dcl_gl_ops =3D { }; #endif =20 -void sdl_display_early_init(DisplayOptions *o) +static void sdl2_display_early_init(DisplayOptions *o) { assert(o->type =3D=3D DISPLAY_TYPE_SDL); if (o->has_gl && o->gl) { @@ -769,7 +769,7 @@ void sdl_display_early_init(DisplayOptions *o) } } =20 -void sdl_display_init(DisplayState *ds, DisplayOptions *o) +static void sdl2_display_init(DisplayState *ds, DisplayOptions *o) { int flags; uint8_t data =3D 0; @@ -869,3 +869,16 @@ void sdl_display_init(DisplayState *ds, DisplayOptions= *o) =20 atexit(sdl_cleanup); } + +static QemuDisplay qemu_display_sdl2 =3D { + .type =3D DISPLAY_TYPE_SDL, + .early_init =3D sdl2_display_early_init, + .init =3D sdl2_display_init, +}; + +static void register_sdl1(void) +{ + qemu_display_register(&qemu_display_sdl2); +} + +type_init(register_sdl1); diff --git a/vl.c b/vl.c index 70458ba708..45900ba7e6 100644 --- a/vl.c +++ b/vl.c @@ -2085,7 +2085,6 @@ static void parse_display(const char *p) const char *opts; =20 if (strstart(p, "sdl", &opts)) { -#ifdef CONFIG_SDL dpy.type =3D DISPLAY_TYPE_SDL; while (*opts) { const char *nextopt; @@ -2146,10 +2145,6 @@ static void parse_display(const char *p) } opts =3D nextopt; } -#else - error_report("SDL support is disabled"); - exit(1); -#endif } else if (strstart(p, "vnc", &opts)) { if (*opts =3D=3D '=3D') { vnc_parse(opts + 1, &error_fatal); @@ -4327,12 +4322,7 @@ int main(int argc, char **argv, char **envp) "ignoring option"); } =20 - if (dpy.type =3D=3D DISPLAY_TYPE_SDL) { - sdl_display_early_init(&dpy); - } else { - qemu_display_early_init(&dpy); - } - + qemu_display_early_init(&dpy); qemu_console_early_init(); =20 if (dpy.has_gl && dpy.gl && display_opengl =3D=3D 0) { @@ -4664,9 +4654,6 @@ int main(int argc, char **argv, char **envp) case DISPLAY_TYPE_CURSES: curses_display_init(ds, &dpy); break; - case DISPLAY_TYPE_SDL: - sdl_display_init(ds, &dpy); - break; case DISPLAY_TYPE_COCOA: cocoa_display_init(ds, &dpy); break; --=20 2.9.3 From nobody Fri Oct 24 09:58:53 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1519219096869277.5403940022627; Wed, 21 Feb 2018 05:18:16 -0800 (PST) Received: from localhost ([::1]:60731 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUHh-0004YR-Kq for importer@patchew.org; Wed, 21 Feb 2018 08:18:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUFS-0003G3-2R for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoUFO-0007UW-U0 for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:49 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55776 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eoUFO-0007Su-LX for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:46 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 09E89407A9AB; Wed, 21 Feb 2018 13:15:44 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-147.ams2.redhat.com [10.36.116.147]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2436010A9705; Wed, 21 Feb 2018 13:15:38 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 6908D1751D; Wed, 21 Feb 2018 14:15:37 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 21 Feb 2018 14:15:28 +0100 Message-Id: <20180221131537.31341-4-kraxel@redhat.com> In-Reply-To: <20180221131537.31341-1-kraxel@redhat.com> References: <20180221131537.31341-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 21 Feb 2018 13:15:44 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 21 Feb 2018 13:15:44 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 03/12] cocoa: switch over to new display registry X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Paolo Bonzini , Markus Armbruster , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 12 ------------ vl.c | 3 --- ui/cocoa.m | 14 +++++++++++++- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 82bbea0242..b97d9ccae4 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -441,18 +441,6 @@ void qemu_display_register(QemuDisplay *ui); void qemu_display_early_init(DisplayOptions *opts); void qemu_display_init(DisplayState *ds, DisplayOptions *opts); =20 -/* cocoa.m */ -#ifdef CONFIG_COCOA -void cocoa_display_init(DisplayState *ds, DisplayOptions *opts); -#else -static inline void cocoa_display_init(DisplayState *ds, DisplayOptions *op= ts) -{ - /* This must never be called if CONFIG_COCOA is disabled */ - error_report("Cocoa support is disabled"); - abort(); -} -#endif - /* vnc.c */ void vnc_display_init(const char *id); void vnc_display_open(const char *id, Error **errp); diff --git a/vl.c b/vl.c index 45900ba7e6..2c3cb4651c 100644 --- a/vl.c +++ b/vl.c @@ -4654,9 +4654,6 @@ int main(int argc, char **argv, char **envp) case DISPLAY_TYPE_CURSES: curses_display_init(ds, &dpy); break; - case DISPLAY_TYPE_COCOA: - cocoa_display_init(ds, &dpy); - break; default: qemu_display_init(ds, &dpy); break; diff --git a/ui/cocoa.m b/ui/cocoa.m index 90d9aa57ea..8b0dce90cb 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -1683,7 +1683,7 @@ static void addRemovableDevicesMenuItems(void) qapi_free_BlockInfoList(pointerToFree); } =20 -void cocoa_display_init(DisplayState *ds, DisplayOptions *opts) +static void cocoa_display_init(DisplayState *ds, DisplayOptions *opts) { COCOA_DEBUG("qemu_cocoa: cocoa_display_init\n"); =20 @@ -1713,3 +1713,15 @@ void cocoa_display_init(DisplayState *ds, DisplayOpt= ions *opts) */ addRemovableDevicesMenuItems(); } + +static QemuDisplay qemu_display_cocoa =3D { + .type =3D DISPLAY_TYPE_COCOA, + .init =3D cocoa_display_init, +}; + +static void register_cocoa(void) +{ + qemu_display_register(&qemu_display_cocoa); +} + +type_init(register_cocoa); --=20 2.9.3 From nobody Fri Oct 24 09:58:53 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1519219414094790.1197178631986; Wed, 21 Feb 2018 05:23:34 -0800 (PST) Received: from localhost ([::1]:60763 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUMq-0000dF-5G for importer@patchew.org; Wed, 21 Feb 2018 08:23:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUFS-0003G1-1D for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoUFO-0007UU-UW for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:49 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:44130 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eoUFO-0007T0-LQ for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:46 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 654B440FB639 for ; Wed, 21 Feb 2018 13:15:44 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-147.ams2.redhat.com [10.36.116.147]) by smtp.corp.redhat.com (Postfix) with ESMTP id 19A0BAF036; Wed, 21 Feb 2018 13:15:38 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 777901751E; Wed, 21 Feb 2018 14:15:37 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 21 Feb 2018 14:15:29 +0100 Message-Id: <20180221131537.31341-5-kraxel@redhat.com> In-Reply-To: <20180221131537.31341-1-kraxel@redhat.com> References: <20180221131537.31341-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 21 Feb 2018 13:15:44 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 21 Feb 2018 13:15:44 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 04/12] curses: switch over to new display registry X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Markus Armbruster , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 12 ------------ ui/curses.c | 14 +++++++++++++- vl.c | 17 ++--------------- 3 files changed, 15 insertions(+), 28 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index b97d9ccae4..4794c98c9a 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -450,18 +450,6 @@ int vnc_display_pw_expire(const char *id, time_t expir= es); QemuOpts *vnc_parse(const char *str, Error **errp); int vnc_init_func(void *opaque, QemuOpts *opts, Error **errp); =20 -/* curses.c */ -#ifdef CONFIG_CURSES -void curses_display_init(DisplayState *ds, DisplayOptions *opts); -#else -static inline void curses_display_init(DisplayState *ds, DisplayOptions *o= pts) -{ - /* This must never be called if CONFIG_CURSES is disabled */ - error_report("curses support is disabled"); - abort(); -} -#endif - /* input.c */ int index_from_key(const char *key, size_t key_length); =20 diff --git a/ui/curses.c b/ui/curses.c index 479b77bd03..d55e6d74a1 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -434,7 +434,7 @@ static const DisplayChangeListenerOps dcl_ops =3D { .dpy_text_cursor =3D curses_cursor_position, }; =20 -void curses_display_init(DisplayState *ds, DisplayOptions *opts) +static void curses_display_init(DisplayState *ds, DisplayOptions *opts) { #ifndef _WIN32 if (!isatty(1)) { @@ -455,3 +455,15 @@ void curses_display_init(DisplayState *ds, DisplayOpti= ons *opts) =20 invalidate =3D 1; } + +static QemuDisplay qemu_display_curses =3D { + .type =3D DISPLAY_TYPE_CURSES, + .init =3D curses_display_init, +}; + +static void register_curses(void) +{ + qemu_display_register(&qemu_display_curses); +} + +type_init(register_curses); diff --git a/vl.c b/vl.c index 2c3cb4651c..2b4af34fbb 100644 --- a/vl.c +++ b/vl.c @@ -2161,12 +2161,7 @@ static void parse_display(const char *p) exit(1); #endif } else if (strstart(p, "curses", &opts)) { -#ifdef CONFIG_CURSES dpy.type =3D DISPLAY_TYPE_CURSES; -#else - error_report("curses support is disabled"); - exit(1); -#endif } else if (strstart(p, "gtk", &opts)) { dpy.type =3D DISPLAY_TYPE_GTK; while (*opts) { @@ -4647,17 +4642,9 @@ int main(int argc, char **argv, char **envp) qemu_register_reset(restore_boot_order, g_strdup(boot_order)); } =20 - ds =3D init_displaystate(); - /* init local displays */ - switch (dpy.type) { - case DISPLAY_TYPE_CURSES: - curses_display_init(ds, &dpy); - break; - default: - qemu_display_init(ds, &dpy); - break; - } + ds =3D init_displaystate(); + qemu_display_init(ds, &dpy); =20 /* must be after terminal init, SDL library changes signal handlers */ os_setup_signal_handling(); --=20 2.9.3 From nobody Fri Oct 24 09:58:53 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1519219595180880.1596704234465; Wed, 21 Feb 2018 05:26:35 -0800 (PST) Received: from localhost ([::1]:60782 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUPq-000303-EP for importer@patchew.org; Wed, 21 Feb 2018 08:26:34 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUFS-0003G2-24 for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoUFO-0007UF-Si for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:49 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:52716 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eoUFO-0007Sx-L4 for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:46 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BFFA7402242D for ; Wed, 21 Feb 2018 13:15:43 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-147.ams2.redhat.com [10.36.116.147]) by smtp.corp.redhat.com (Postfix) with ESMTP id 80BC3213AEE4; Wed, 21 Feb 2018 13:15:43 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 8612217528; Wed, 21 Feb 2018 14:15:37 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 21 Feb 2018 14:15:30 +0100 Message-Id: <20180221131537.31341-6-kraxel@redhat.com> In-Reply-To: <20180221131537.31341-1-kraxel@redhat.com> References: <20180221131537.31341-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 21 Feb 2018 13:15:43 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 21 Feb 2018 13:15:43 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 05/12] egl-headless: switch over to new display registry X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Markus Armbruster , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 3 --- ui/egl-headless.c | 20 +++++++++++++++++++- vl.c | 12 ------------ 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 4794c98c9a..1832c7eccf 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -453,7 +453,4 @@ int vnc_init_func(void *opaque, QemuOpts *opts, Error *= *errp); /* input.c */ int index_from_key(const char *key, size_t key_length); =20 -/* egl-headless.c */ -void egl_headless_init(DisplayOptions *opts); - #endif diff --git a/ui/egl-headless.c b/ui/egl-headless.c index 38b3766548..655ef4eecb 100644 --- a/ui/egl-headless.c +++ b/ui/egl-headless.c @@ -154,7 +154,12 @@ static const DisplayChangeListenerOps egl_ops =3D { .dpy_gl_update =3D egl_scanout_flush, }; =20 -void egl_headless_init(DisplayOptions *opts) +static void early_egl_headless_init(DisplayOptions *opts) +{ + display_opengl =3D 1; +} + +static void egl_headless_init(DisplayState *ds, DisplayOptions *opts) { QemuConsole *con; egl_dpy *edpy; @@ -178,3 +183,16 @@ void egl_headless_init(DisplayOptions *opts) register_displaychangelistener(&edpy->dcl); } } + +static QemuDisplay qemu_display_egl =3D { + .type =3D DISPLAY_TYPE_EGL_HEADLESS, + .early_init =3D early_egl_headless_init, + .init =3D egl_headless_init, +}; + +static void register_egl(void) +{ + qemu_display_register(&qemu_display_egl); +} + +type_init(register_egl); diff --git a/vl.c b/vl.c index 2b4af34fbb..47c953f8dc 100644 --- a/vl.c +++ b/vl.c @@ -2153,13 +2153,7 @@ static void parse_display(const char *p) exit(1); } } else if (strstart(p, "egl-headless", &opts)) { -#ifdef CONFIG_OPENGL_DMABUF - display_opengl =3D 1; dpy.type =3D DISPLAY_TYPE_EGL_HEADLESS; -#else - error_report("egl support is disabled"); - exit(1); -#endif } else if (strstart(p, "curses", &opts)) { dpy.type =3D DISPLAY_TYPE_CURSES; } else if (strstart(p, "gtk", &opts)) { @@ -4659,12 +4653,6 @@ int main(int argc, char **argv, char **envp) qemu_spice_display_init(); } =20 -#ifdef CONFIG_OPENGL_DMABUF - if (dpy.type =3D=3D DISPLAY_TYPE_EGL_HEADLESS) { - egl_headless_init(&dpy); - } -#endif - if (foreach_device_config(DEV_GDB, gdbserver_start) < 0) { exit(1); } --=20 2.9.3 From nobody Fri Oct 24 09:58:53 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1519219096275625.4452791618695; Wed, 21 Feb 2018 05:18:16 -0800 (PST) Received: from localhost ([::1]:60729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUHf-0004Vg-3P for importer@patchew.org; Wed, 21 Feb 2018 08:18:07 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUFS-0003Fy-0c for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoUFO-0007U5-RL for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:49 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:44128 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eoUFO-0007Sy-LB for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:46 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 92E3C40FB633 for ; Wed, 21 Feb 2018 13:15:43 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-147.ams2.redhat.com [10.36.116.147]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4F206213AEE2; Wed, 21 Feb 2018 13:15:43 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9060817533; Wed, 21 Feb 2018 14:15:37 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 21 Feb 2018 14:15:31 +0100 Message-Id: <20180221131537.31341-7-kraxel@redhat.com> In-Reply-To: <20180221131537.31341-1-kraxel@redhat.com> References: <20180221131537.31341-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 21 Feb 2018 13:15:43 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 21 Feb 2018 13:15:43 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 06/12] console: add and use qemu_display_find_default X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Markus Armbruster , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Using the new display registry instead of #ifdefs in vl.c. Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 1 + ui/console.c | 19 +++++++++++++++++++ vl.c | 15 +++++---------- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 1832c7eccf..a0d3330056 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -438,6 +438,7 @@ struct QemuDisplay { }; =20 void qemu_display_register(QemuDisplay *ui); +bool qemu_display_find_default(DisplayOptions *opts); void qemu_display_early_init(DisplayOptions *opts); void qemu_display_init(DisplayState *ds, DisplayOptions *opts); =20 diff --git a/ui/console.c b/ui/console.c index 8e55a05108..5a63e9dfa2 100644 --- a/ui/console.c +++ b/ui/console.c @@ -2178,6 +2178,25 @@ void qemu_display_register(QemuDisplay *ui) dpys[ui->type] =3D ui; } =20 +bool qemu_display_find_default(DisplayOptions *opts) +{ + static DisplayType prio[] =3D { + DISPLAY_TYPE_GTK, + DISPLAY_TYPE_SDL, + DISPLAY_TYPE_COCOA + }; + int i; + + for (i =3D 0; i < ARRAY_SIZE(prio); i++) { + if (dpys[prio[i]] =3D=3D NULL) { + continue; + } + opts->type =3D prio[i]; + return true; + } + return false; +} + void qemu_display_early_init(DisplayOptions *opts) { assert(opts->type < DISPLAY_TYPE__MAX); diff --git a/vl.c b/vl.c index 47c953f8dc..59e56593f8 100644 --- a/vl.c +++ b/vl.c @@ -4285,17 +4285,12 @@ int main(int argc, char **argv, char **envp) } #endif if (dpy.type =3D=3D DISPLAY_TYPE_DEFAULT && !display_remote) { -#if defined(CONFIG_GTK) - dpy.type =3D DISPLAY_TYPE_GTK; -#elif defined(CONFIG_SDL) - dpy.type =3D DISPLAY_TYPE_SDL; -#elif defined(CONFIG_COCOA) - dpy.type =3D DISPLAY_TYPE_COCOA; -#elif defined(CONFIG_VNC) - vnc_parse("localhost:0,to=3D99,id=3Ddefault", &error_abort); -#else - dpy.type =3D DISPLAY_TYPE_NONE; + if (!qemu_display_find_default(&dpy)) { + dpy.type =3D DISPLAY_TYPE_NONE; +#if defined(CONFIG_VNC) + vnc_parse("localhost:0,to=3D99,id=3Ddefault", &error_abort); #endif + } } if (dpy.type =3D=3D DISPLAY_TYPE_DEFAULT) { dpy.type =3D DISPLAY_TYPE_NONE; --=20 2.9.3 From nobody Fri Oct 24 09:58:53 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1519219516874382.81564483640636; Wed, 21 Feb 2018 05:25:16 -0800 (PST) Received: from localhost ([::1]:60771 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUOY-0001x7-Gy for importer@patchew.org; Wed, 21 Feb 2018 08:25:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUFS-0003Fx-0S for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoUFO-0007Tr-Ps for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:49 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:56420 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eoUFO-0007St-Kc for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:46 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4603F8182D06 for ; Wed, 21 Feb 2018 13:15:44 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-147.ams2.redhat.com [10.36.116.147]) by smtp.corp.redhat.com (Postfix) with ESMTP id 10146213AEE2; Wed, 21 Feb 2018 13:15:44 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9976C17534; Wed, 21 Feb 2018 14:15:37 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 21 Feb 2018 14:15:32 +0100 Message-Id: <20180221131537.31341-8-kraxel@redhat.com> In-Reply-To: <20180221131537.31341-1-kraxel@redhat.com> References: <20180221131537.31341-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 21 Feb 2018 13:15:44 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 21 Feb 2018 13:15:44 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 07/12] console: add ui module loading support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Markus Armbruster , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" If a requested user interface is not available, try loading it as module, simliar to block layer modules. Needed to keep things working when followup patches start to build user interfaces as modules. Signed-off-by: Gerd Hoffmann --- include/qemu/module.h | 1 + ui/console.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/include/qemu/module.h b/include/qemu/module.h index 56dd218205..9fea75aaeb 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -53,6 +53,7 @@ typedef enum { #define trace_init(function) module_init(function, MODULE_INIT_TRACE) =20 #define block_module_load_one(lib) module_load_one("block-", lib) +#define ui_module_load_one(lib) module_load_one("ui-", lib) =20 void register_module_init(void (*fn)(void), module_init_type type); void register_dso_module_init(void (*fn)(void), module_init_type type); diff --git a/ui/console.c b/ui/console.c index 5a63e9dfa2..dd663b9127 100644 --- a/ui/console.c +++ b/ui/console.c @@ -2189,6 +2189,9 @@ bool qemu_display_find_default(DisplayOptions *opts) =20 for (i =3D 0; i < ARRAY_SIZE(prio); i++) { if (dpys[prio[i]] =3D=3D NULL) { + ui_module_load_one(DisplayType_lookup.array[prio[i]]); + } + if (dpys[prio[i]] =3D=3D NULL) { continue; } opts->type =3D prio[i]; @@ -2204,6 +2207,9 @@ void qemu_display_early_init(DisplayOptions *opts) return; } if (dpys[opts->type] =3D=3D NULL) { + ui_module_load_one(DisplayType_lookup.array[opts->type]); + } + if (dpys[opts->type] =3D=3D NULL) { error_report("Display '%s' is not available.", DisplayType_lookup.array[opts->type]); exit(1); --=20 2.9.3 From nobody Fri Oct 24 09:58:53 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1519219269754723.6444414206782; Wed, 21 Feb 2018 05:21:09 -0800 (PST) Received: from localhost ([::1]:60745 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUKa-00074M-SD for importer@patchew.org; Wed, 21 Feb 2018 08:21:08 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUFS-0003Fw-0N for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoUFO-0007Ts-Ps for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:49 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55780 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eoUFO-0007Sz-Jh for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:46 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C49B6407A9AC for ; Wed, 21 Feb 2018 13:15:44 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-147.ams2.redhat.com [10.36.116.147]) by smtp.corp.redhat.com (Postfix) with ESMTP id 878342024CA8; Wed, 21 Feb 2018 13:15:44 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A2FAD17535; Wed, 21 Feb 2018 14:15:37 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 21 Feb 2018 14:15:33 +0100 Message-Id: <20180221131537.31341-9-kraxel@redhat.com> In-Reply-To: <20180221131537.31341-1-kraxel@redhat.com> References: <20180221131537.31341-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 21 Feb 2018 13:15:44 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 21 Feb 2018 13:15:44 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 08/12] configure: add X11 vars to config-host.mak X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Markus Armbruster , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Simplifies handling the X11 dependency, also makes ui/Makefile.objs more readable. Signed-off-by: Gerd Hoffmann --- configure | 10 ++++++++-- ui/Makefile.objs | 5 ++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/configure b/configure index ed45a3c4dd..2934a4bcff 100755 --- a/configure +++ b/configure @@ -2508,9 +2508,8 @@ fi =20 ########################################## # X11 probe -x11_cflags=3D -x11_libs=3D-lX11 if $pkg_config --exists "x11"; then + have_x11=3Dyes x11_cflags=3D$($pkg_config --cflags x11) x11_libs=3D$($pkg_config --libs x11) fi @@ -2543,6 +2542,7 @@ if test "$gtk" !=3D "no"; then gtk_libs=3D$($pkg_config --libs $gtkpackage) gtk_version=3D$($pkg_config --modversion $gtkpackage) if $pkg_config --exists "$gtkx11package >=3D $gtkversion"; then + need_x11=3Dyes gtk_cflags=3D"$gtk_cflags $x11_cflags" gtk_libs=3D"$gtk_libs $x11_libs" fi @@ -2911,6 +2911,7 @@ if test "$sdl" =3D "yes" ; then int main(void) { return 0; } EOF if compile_prog "$sdl_cflags $x11_cflags" "$sdl_libs $x11_libs" ; then + need_x11=3Dyes sdl_cflags=3D"$sdl_cflags $x11_cflags" sdl_libs=3D"$sdl_libs $x11_libs" fi @@ -6023,6 +6024,11 @@ if test "$modules" =3D "yes"; then echo "CONFIG_STAMP=3D_$( (echo $qemu_version; echo $pkgversion; cat $0) = | $shacmd - | cut -f1 -d\ )" >> $config_host_mak echo "CONFIG_MODULES=3Dy" >> $config_host_mak fi +if test "$have_x11" =3D "yes" -a "$need_x11" =3D "yes"; then + echo "CONFIG_X11=3Dy" >> $config_host_mak + echo "X11_CFLAGS=3D$x11_cflags" >> $config_host_mak + echo "X11_LIBS=3D$x11_libs" >> $config_host_mak +fi if test "$sdl" =3D "yes" ; then echo "CONFIG_SDL=3Dy" >> $config_host_mak echo "CONFIG_SDLABI=3D$sdlabi" >> $config_host_mak diff --git a/ui/Makefile.objs b/ui/Makefile.objs index ced7d91a63..9b725b07aa 100644 --- a/ui/Makefile.objs +++ b/ui/Makefile.objs @@ -17,7 +17,10 @@ common-obj-$(CONFIG_CURSES) +=3D curses.o common-obj-$(CONFIG_VNC) +=3D $(vnc-obj-y) common-obj-$(call lnot,$(CONFIG_VNC)) +=3D vnc-stubs.o common-obj-$(CONFIG_GTK) +=3D gtk.o -common-obj-$(if $(CONFIG_WIN32),n,$(if $(CONFIG_SDL),y,$(CONFIG_GTK))) += =3D x_keymap.o + +common-obj-$(CONFIG_X11) +=3D x_keymap.o +x_keymap.o-cflags :=3D $(X11_CFLAGS) +x_keymap.o-libs :=3D $(X11_LIBS) =20 ifeq ($(CONFIG_SDLABI),1.2) sdl.mo-objs :=3D sdl.o sdl_zoom.o --=20 2.9.3 From nobody Fri Oct 24 09:58:53 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1519219272862419.5389037179966; Wed, 21 Feb 2018 05:21:12 -0800 (PST) Received: from localhost ([::1]:60747 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUKd-000766-2E for importer@patchew.org; Wed, 21 Feb 2018 08:21:11 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUFS-0003G5-30 for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoUFO-0007UN-TL for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:49 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55782 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eoUFO-0007Sr-LC for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:46 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0C493407A9AD for ; Wed, 21 Feb 2018 13:15:45 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-147.ams2.redhat.com [10.36.116.147]) by smtp.corp.redhat.com (Postfix) with ESMTP id CA1E510A9705; Wed, 21 Feb 2018 13:15:44 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id AB12517536; Wed, 21 Feb 2018 14:15:37 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 21 Feb 2018 14:15:34 +0100 Message-Id: <20180221131537.31341-10-kraxel@redhat.com> In-Reply-To: <20180221131537.31341-1-kraxel@redhat.com> References: <20180221131537.31341-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 21 Feb 2018 13:15:45 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 21 Feb 2018 13:15:45 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 09/12] configure: opengl doesn't depend on x11 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Markus Armbruster , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" So remove x11 from pkg-config check and don't add x11 cflags/libs to opengl cflags/libs. Signed-off-by: Gerd Hoffmann --- configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 2934a4bcff..66c210026a 100755 --- a/configure +++ b/configure @@ -3767,9 +3767,9 @@ libs_softmmu=3D"$libs_softmmu $fdt_libs" =20 if test "$opengl" !=3D "no" ; then opengl_pkgs=3D"epoxy libdrm gbm" - if $pkg_config $opengl_pkgs x11; then - opengl_cflags=3D"$($pkg_config --cflags $opengl_pkgs) $x11_cflags" - opengl_libs=3D"$($pkg_config --libs $opengl_pkgs) $x11_libs" + if $pkg_config $opengl_pkgs; then + opengl_cflags=3D"$($pkg_config --cflags $opengl_pkgs)" + opengl_libs=3D"$($pkg_config --libs $opengl_pkgs)" opengl=3Dyes if test "$gtk" =3D "yes" && $pkg_config --exists "$gtkpackage >=3D 3.1= 6"; then gtk_gl=3D"yes" --=20 2.9.3 From nobody Fri Oct 24 09:58:53 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1519219273977233.11647297734908; Wed, 21 Feb 2018 05:21:13 -0800 (PST) Received: from localhost ([::1]:60748 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUKf-00077q-41 for importer@patchew.org; Wed, 21 Feb 2018 08:21:13 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUFc-0003Rz-I6 for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:16:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoUFX-0007aZ-JE for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:16:00 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55788 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eoUFX-0007aF-E3 for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:55 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 18B69407A9AF for ; Wed, 21 Feb 2018 13:15:45 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-147.ams2.redhat.com [10.36.116.147]) by smtp.corp.redhat.com (Postfix) with ESMTP id CEF3B10A9707; Wed, 21 Feb 2018 13:15:44 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B53CB17537; Wed, 21 Feb 2018 14:15:37 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 21 Feb 2018 14:15:35 +0100 Message-Id: <20180221131537.31341-11-kraxel@redhat.com> In-Reply-To: <20180221131537.31341-1-kraxel@redhat.com> References: <20180221131537.31341-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 21 Feb 2018 13:15:45 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 21 Feb 2018 13:15:45 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 10/12] sdl: build as ui module X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Markus Armbruster , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Shared library dependencies dropped from qemu-system-*: libSDL2-2.0.so.0 =3D> /lib64/libSDL2-2.0.so.0 Signed-off-by: Gerd Hoffmann --- configure | 2 +- Makefile.objs | 1 + ui/Makefile.objs | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 66c210026a..fe80940bdc 100755 --- a/configure +++ b/configure @@ -6030,7 +6030,7 @@ if test "$have_x11" =3D "yes" -a "$need_x11" =3D "yes= "; then echo "X11_LIBS=3D$x11_libs" >> $config_host_mak fi if test "$sdl" =3D "yes" ; then - echo "CONFIG_SDL=3Dy" >> $config_host_mak + echo "CONFIG_SDL=3Dm" >> $config_host_mak echo "CONFIG_SDLABI=3D$sdlabi" >> $config_host_mak echo "SDL_CFLAGS=3D$sdl_cflags" >> $config_host_mak echo "SDL_LIBS=3D$sdl_libs" >> $config_host_mak diff --git a/Makefile.objs b/Makefile.objs index 5dc134818c..57ca6d908b 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -56,6 +56,7 @@ common-obj-y +=3D hw/ common-obj-y +=3D replay/ =20 common-obj-y +=3D ui/ +common-obj-m +=3D ui/ common-obj-y +=3D bt-host.o bt-vhci.o bt-host.o-cflags :=3D $(BLUEZ_CFLAGS) =20 diff --git a/ui/Makefile.objs b/ui/Makefile.objs index 9b725b07aa..ef4bd83fde 100644 --- a/ui/Makefile.objs +++ b/ui/Makefile.objs @@ -11,7 +11,6 @@ common-obj-y +=3D keymaps.o console.o cursor.o qemu-pixma= n.o common-obj-y +=3D input.o input-keymap.o input-legacy.o common-obj-$(CONFIG_LINUX) +=3D input-linux.o common-obj-$(CONFIG_SPICE) +=3D spice-core.o spice-input.o spice-display.o -common-obj-$(CONFIG_SDL) +=3D sdl.mo common-obj-$(CONFIG_COCOA) +=3D cocoa.o common-obj-$(CONFIG_CURSES) +=3D curses.o common-obj-$(CONFIG_VNC) +=3D $(vnc-obj-y) @@ -22,6 +21,8 @@ common-obj-$(CONFIG_X11) +=3D x_keymap.o x_keymap.o-cflags :=3D $(X11_CFLAGS) x_keymap.o-libs :=3D $(X11_LIBS) =20 +# ui-sdl module +common-obj-$(CONFIG_SDL) +=3D sdl.mo ifeq ($(CONFIG_SDLABI),1.2) sdl.mo-objs :=3D sdl.o sdl_zoom.o endif --=20 2.9.3 From nobody Fri Oct 24 09:58:53 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1519219520285583.2814827972661; Wed, 21 Feb 2018 05:25:20 -0800 (PST) Received: from localhost ([::1]:60770 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUOY-0001wu-98 for importer@patchew.org; Wed, 21 Feb 2018 08:25:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUFT-0003GP-Ow for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoUFP-0007V8-BF for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:51 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55784 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eoUFP-0007Tu-42 for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:47 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 662E5407A9B1 for ; Wed, 21 Feb 2018 13:15:45 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-147.ams2.redhat.com [10.36.116.147]) by smtp.corp.redhat.com (Postfix) with ESMTP id D07F32026E03; Wed, 21 Feb 2018 13:15:44 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id BEBA517538; Wed, 21 Feb 2018 14:15:37 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 21 Feb 2018 14:15:36 +0100 Message-Id: <20180221131537.31341-12-kraxel@redhat.com> In-Reply-To: <20180221131537.31341-1-kraxel@redhat.com> References: <20180221131537.31341-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 21 Feb 2018 13:15:45 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 21 Feb 2018 13:15:45 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 11/12] gtk: build as ui module X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Markus Armbruster , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Also drop gtk and vte libs from libs_softmmu, so the libs are not pulled in unless the gtk module actually gets loaded. Shared library dependencies dropped from qemu-system-*: libEGL.so.1 =3D> /lib64/libEGL.so.1 libGL.so.1 =3D> /lib64/libGL.so.1 libXcomposite.so.1 =3D> /lib64/libXcomposite.so.1 libXcursor.so.1 =3D> /lib64/libXcursor.so.1 libXdamage.so.1 =3D> /lib64/libXdamage.so.1 libXfixes.so.3 =3D> /lib64/libXfixes.so.3 libXinerama.so.1 =3D> /lib64/libXinerama.so.1 libXrandr.so.2 =3D> /lib64/libXrandr.so.2 libXrender.so.1 =3D> /lib64/libXrender.so.1 libXxf86vm.so.1 =3D> /lib64/libXxf86vm.so.1 libatk-1.0.so.0 =3D> /lib64/libatk-1.0.so.0 libatk-bridge-2.0.so.0 =3D> /lib64/libatk-bridge-2.0.so.0 libatspi.so.0 =3D> /lib64/libatspi.so.0 libcairo-gobject.so.2 =3D> /lib64/libcairo-gobject.so.2 libcairo.so.2 =3D> /lib64/libcairo.so.2 libfontconfig.so.1 =3D> /lib64/libfontconfig.so.1 libfreetype.so.6 =3D> /lib64/libfreetype.so.6 libgdk-3.so.0 =3D> /lib64/libgdk-3.so.0 libgdk_pixbuf-2.0.so.0 =3D> /lib64/libgdk_pixbuf-2.0.so.0 libglapi.so.0 =3D> /lib64/libglapi.so.0 libgraphite2.so.3 =3D> /lib64/libgraphite2.so.3 libgtk-3.so.0 =3D> /lib64/libgtk-3.so.0 libharfbuzz.so.0 =3D> /lib64/libharfbuzz.so.0 libpango-1.0.so.0 =3D> /lib64/libpango-1.0.so.0 libpangocairo-1.0.so.0 =3D> /lib64/libpangocairo-1.0.so.0 libpangoft2-1.0.so.0 =3D> /lib64/libpangoft2-1.0.so.0 libpcre2-8.so.0 =3D> /lib64/libpcre2-8.so.0 libthai.so.0 =3D> /lib64/libthai.so.0 libvte-2.91.so.0 =3D> /lib64/libvte-2.91.so.0 libwayland-cursor.so.0 =3D> /lib64/libwayland-cursor.so.0 libwayland-egl.so.1 =3D> /lib64/libwayland-egl.so.1 libxcb-dri2.so.0 =3D> /lib64/libxcb-dri2.so.0 libxcb-dri3.so.0 =3D> /lib64/libxcb-dri3.so.0 libxcb-glx.so.0 =3D> /lib64/libxcb-glx.so.0 libxcb-present.so.0 =3D> /lib64/libxcb-present.so.0 libxcb-render.so.0 =3D> /lib64/libxcb-render.so.0 libxcb-shm.so.0 =3D> /lib64/libxcb-shm.so.0 libxcb-sync.so.1 =3D> /lib64/libxcb-sync.so.1 libxcb-xfixes.so.0 =3D> /lib64/libxcb-xfixes.so.0 libxkbcommon.so.0 =3D> /lib64/libxkbcommon.so.0 libxshmfence.so.1 =3D> /lib64/libxshmfence.so.1 Signed-off-by: Gerd Hoffmann --- configure | 5 ++--- ui/Makefile.objs | 17 +++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/configure b/configure index fe80940bdc..cfab17275f 100755 --- a/configure +++ b/configure @@ -2546,7 +2546,6 @@ if test "$gtk" !=3D "no"; then gtk_cflags=3D"$gtk_cflags $x11_cflags" gtk_libs=3D"$gtk_libs $x11_libs" fi - libs_softmmu=3D"$gtk_libs $libs_softmmu" gtk=3D"yes" elif test "$gtk" =3D "yes"; then feature_not_found "gtk" "Install gtk3-devel" @@ -2796,7 +2795,6 @@ if test "$vte" !=3D "no"; then vte_cflags=3D$($pkg_config --cflags $vtepackage) vte_libs=3D$($pkg_config --libs $vtepackage) vteversion=3D$($pkg_config --modversion $vtepackage) - libs_softmmu=3D"$vte_libs $libs_softmmu" vte=3D"yes" elif test "$vte" =3D "yes"; then if test "$gtkabi" =3D "3.0"; then @@ -6136,7 +6134,7 @@ if test "$glib_subprocess" =3D "yes" ; then echo "CONFIG_HAS_GLIB_SUBPROCESS_TESTS=3Dy" >> $config_host_mak fi if test "$gtk" =3D "yes" ; then - echo "CONFIG_GTK=3Dy" >> $config_host_mak + echo "CONFIG_GTK=3Dm" >> $config_host_mak echo "CONFIG_GTKABI=3D$gtkabi" >> $config_host_mak echo "GTK_CFLAGS=3D$gtk_cflags" >> $config_host_mak echo "GTK_LIBS=3D$gtk_libs" >> $config_host_mak @@ -6187,6 +6185,7 @@ fi if test "$vte" =3D "yes" ; then echo "CONFIG_VTE=3Dy" >> $config_host_mak echo "VTE_CFLAGS=3D$vte_cflags" >> $config_host_mak + echo "VTE_LIBS=3D$vte_libs" >> $config_host_mak fi if test "$virglrenderer" =3D "yes" ; then echo "CONFIG_VIRGL=3Dy" >> $config_host_mak diff --git a/ui/Makefile.objs b/ui/Makefile.objs index ef4bd83fde..9a0e8a94f1 100644 --- a/ui/Makefile.objs +++ b/ui/Makefile.objs @@ -15,7 +15,6 @@ common-obj-$(CONFIG_COCOA) +=3D cocoa.o common-obj-$(CONFIG_CURSES) +=3D curses.o common-obj-$(CONFIG_VNC) +=3D $(vnc-obj-y) common-obj-$(call lnot,$(CONFIG_VNC)) +=3D vnc-stubs.o -common-obj-$(CONFIG_GTK) +=3D gtk.o =20 common-obj-$(CONFIG_X11) +=3D x_keymap.o x_keymap.o-cflags :=3D $(X11_CFLAGS) @@ -35,6 +34,12 @@ endif sdl.mo-cflags :=3D $(SDL_CFLAGS) sdl.mo-libs :=3D $(SDL_LIBS) =20 +# ui-gtk module +common-obj-$(CONFIG_GTK) +=3D gtk.mo +gtk.mo-objs :=3D gtk.o +gtk.mo-cflags :=3D $(GTK_CFLAGS) $(VTE_CFLAGS) +gtk.mo-libs :=3D $(GTK_LIBS) $(VTE_LIBS) + ifeq ($(CONFIG_OPENGL),y) common-obj-y +=3D shader.o common-obj-y +=3D console-gl.o @@ -42,17 +47,13 @@ common-obj-y +=3D egl-helpers.o common-obj-y +=3D egl-context.o common-obj-$(CONFIG_OPENGL_DMABUF) +=3D egl-headless.o ifeq ($(CONFIG_GTK_GL),y) -common-obj-$(CONFIG_GTK) +=3D gtk-gl-area.o +gtk.mo-objs +=3D gtk-gl-area.o else -common-obj-$(CONFIG_GTK) +=3D gtk-egl.o +gtk.mo-objs +=3D gtk-egl.o +gtk.mo-libs +=3D $(OPENGL_LIBS) endif endif =20 -gtk.o-cflags :=3D $(GTK_CFLAGS) $(VTE_CFLAGS) -gtk-egl.o-cflags :=3D $(GTK_CFLAGS) $(VTE_CFLAGS) -gtk-gl-area.o-cflags :=3D $(GTK_CFLAGS) $(VTE_CFLAGS) - -gtk-egl.o-libs +=3D $(OPENGL_LIBS) shader.o-libs +=3D $(OPENGL_LIBS) console-gl.o-libs +=3D $(OPENGL_LIBS) egl-helpers.o-libs +=3D $(OPENGL_LIBS) --=20 2.9.3 From nobody Fri Oct 24 09:58:53 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1519219414094722.4093145548549; Wed, 21 Feb 2018 05:23:34 -0800 (PST) Received: from localhost ([::1]:60762 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUMp-0000d2-RG for importer@patchew.org; Wed, 21 Feb 2018 08:23:27 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoUFT-0003GF-E3 for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoUFP-0007V9-BF for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:51 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55786 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eoUFP-0007Tq-53 for qemu-devel@nongnu.org; Wed, 21 Feb 2018 08:15:47 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4C1B8407A9B0 for ; Wed, 21 Feb 2018 13:15:45 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-147.ams2.redhat.com [10.36.116.147]) by smtp.corp.redhat.com (Postfix) with ESMTP id D2487B078D; Wed, 21 Feb 2018 13:15:44 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C7EC017539; Wed, 21 Feb 2018 14:15:37 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 21 Feb 2018 14:15:37 +0100 Message-Id: <20180221131537.31341-13-kraxel@redhat.com> In-Reply-To: <20180221131537.31341-1-kraxel@redhat.com> References: <20180221131537.31341-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 21 Feb 2018 13:15:45 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 21 Feb 2018 13:15:45 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 12/12] curses: build as ui module X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Markus Armbruster , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Also drop curses libs from libs_softmmu. Add CURSES_{CFLAGS,LIBS} variables so we can use them for linking the curses module. Shared library dependencies dropped from qemu-system-*: libncursesw.so.5 =3D> /lib64/libncursesw.so.5 libtinfo.so.5 =3D> /lib64/libtinfo.so.5 Signed-off-by: Gerd Hoffmann --- configure | 6 +++--- ui/Makefile.objs | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/configure b/configure index cfab17275f..4d0100ec7e 100755 --- a/configure +++ b/configure @@ -3268,8 +3268,6 @@ EOF unset IFS if compile_prog "$curses_inc" "$curses_lib" ; then curses_found=3Dyes - QEMU_CFLAGS=3D"$curses_inc $QEMU_CFLAGS" - libs_softmmu=3D"$curses_lib $libs_softmmu" break fi done @@ -6037,7 +6035,9 @@ if test "$cocoa" =3D "yes" ; then echo "CONFIG_COCOA=3Dy" >> $config_host_mak fi if test "$curses" =3D "yes" ; then - echo "CONFIG_CURSES=3Dy" >> $config_host_mak + echo "CONFIG_CURSES=3Dm" >> $config_host_mak + echo "CURSES_CFLAGS=3D$curses_inc" >> $config_host_mak + echo "CURSES_LIBS=3D$curses_lib" >> $config_host_mak fi if test "$pipe2" =3D "yes" ; then echo "CONFIG_PIPE2=3Dy" >> $config_host_mak diff --git a/ui/Makefile.objs b/ui/Makefile.objs index 9a0e8a94f1..dcd54a5287 100644 --- a/ui/Makefile.objs +++ b/ui/Makefile.objs @@ -12,7 +12,6 @@ common-obj-y +=3D input.o input-keymap.o input-legacy.o common-obj-$(CONFIG_LINUX) +=3D input-linux.o common-obj-$(CONFIG_SPICE) +=3D spice-core.o spice-input.o spice-display.o common-obj-$(CONFIG_COCOA) +=3D cocoa.o -common-obj-$(CONFIG_CURSES) +=3D curses.o common-obj-$(CONFIG_VNC) +=3D $(vnc-obj-y) common-obj-$(call lnot,$(CONFIG_VNC)) +=3D vnc-stubs.o =20 @@ -40,6 +39,11 @@ gtk.mo-objs :=3D gtk.o gtk.mo-cflags :=3D $(GTK_CFLAGS) $(VTE_CFLAGS) gtk.mo-libs :=3D $(GTK_LIBS) $(VTE_LIBS) =20 +common-obj-$(CONFIG_CURSES) +=3D curses.mo +curses.mo-objs :=3D curses.o +curses.mo-cflags :=3D $(CURSES_CFLAGS) +curses.mo-libs :=3D $(CURSES_LIBS) + ifeq ($(CONFIG_OPENGL),y) common-obj-y +=3D shader.o common-obj-y +=3D console-gl.o --=20 2.9.3