From 8781595bf2931bf00cfd431bac9a100b312e87a9 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 1 Mar 2018 11:05:42 +0100 Subject: configure: add X11 vars to config-host.mak Simplifies handling the X11 dependency, also makes ui/Makefile.objs more readable. Signed-off-by: Gerd Hoffmann Message-id: 20180301100547.18962-9-kraxel@redhat.com --- configure | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 00c4b63cfa..3d2aef95f8 100755 --- a/configure +++ b/configure @@ -2520,9 +2520,8 @@ fi ########################################## # X11 probe -x11_cflags= -x11_libs=-lX11 if $pkg_config --exists "x11"; then + have_x11=yes x11_cflags=$($pkg_config --cflags x11) x11_libs=$($pkg_config --libs x11) fi @@ -2555,6 +2554,7 @@ if test "$gtk" != "no"; then gtk_libs=$($pkg_config --libs $gtkpackage) gtk_version=$($pkg_config --modversion $gtkpackage) if $pkg_config --exists "$gtkx11package >= $gtkversion"; then + need_x11=yes gtk_cflags="$gtk_cflags $x11_cflags" gtk_libs="$gtk_libs $x11_libs" fi @@ -2923,6 +2923,7 @@ if test "$sdl" = "yes" ; then int main(void) { return 0; } EOF if compile_prog "$sdl_cflags $x11_cflags" "$sdl_libs $x11_libs" ; then + need_x11=yes sdl_cflags="$sdl_cflags $x11_cflags" sdl_libs="$sdl_libs $x11_libs" fi @@ -6036,6 +6037,11 @@ if test "$modules" = "yes"; then echo "CONFIG_STAMP=_$( (echo $qemu_version; echo $pkgversion; cat $0) | $shacmd - | cut -f1 -d\ )" >> $config_host_mak echo "CONFIG_MODULES=y" >> $config_host_mak fi +if test "$have_x11" = "yes" -a "$need_x11" = "yes"; then + echo "CONFIG_X11=y" >> $config_host_mak + echo "X11_CFLAGS=$x11_cflags" >> $config_host_mak + echo "X11_LIBS=$x11_libs" >> $config_host_mak +fi if test "$sdl" = "yes" ; then echo "CONFIG_SDL=y" >> $config_host_mak echo "CONFIG_SDLABI=$sdlabi" >> $config_host_mak -- cgit v1.2.1 From 5f9b1e35060b8d7e6638938bc2de7f276a9780a5 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 1 Mar 2018 11:05:43 +0100 Subject: configure: opengl doesn't depend on x11 So remove x11 from pkg-config check and don't add x11 cflags/libs to opengl cflags/libs. Signed-off-by: Gerd Hoffmann Message-id: 20180301100547.18962-10-kraxel@redhat.com --- configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 3d2aef95f8..fbfbb64029 100755 --- a/configure +++ b/configure @@ -3779,9 +3779,9 @@ libs_softmmu="$libs_softmmu $fdt_libs" if test "$opengl" != "no" ; then opengl_pkgs="epoxy libdrm gbm" - if $pkg_config $opengl_pkgs x11; then - opengl_cflags="$($pkg_config --cflags $opengl_pkgs) $x11_cflags" - opengl_libs="$($pkg_config --libs $opengl_pkgs) $x11_libs" + if $pkg_config $opengl_pkgs; then + opengl_cflags="$($pkg_config --cflags $opengl_pkgs)" + opengl_libs="$($pkg_config --libs $opengl_pkgs)" opengl=yes if test "$gtk" = "yes" && $pkg_config --exists "$gtkpackage >= 3.16"; then gtk_gl="yes" -- cgit v1.2.1 From e0fb129c2f2baac0ef44408751bada8739f99522 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 1 Mar 2018 11:05:44 +0100 Subject: ui/gtk: build as module Also drop gtk and vte libs from libs_softmmu, so the libs are not pulled in unless the gtk module actually gets loaded. Signed-off-by: Gerd Hoffmann Message-id: 20180301100547.18962-11-kraxel@redhat.com --- configure | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'configure') diff --git a/configure b/configure index fbfbb64029..ad36320a4c 100755 --- a/configure +++ b/configure @@ -2558,7 +2558,6 @@ if test "$gtk" != "no"; then gtk_cflags="$gtk_cflags $x11_cflags" gtk_libs="$gtk_libs $x11_libs" fi - libs_softmmu="$gtk_libs $libs_softmmu" gtk="yes" elif test "$gtk" = "yes"; then feature_not_found "gtk" "Install gtk3-devel" @@ -2808,7 +2807,6 @@ if test "$vte" != "no"; then vte_cflags=$($pkg_config --cflags $vtepackage) vte_libs=$($pkg_config --libs $vtepackage) vteversion=$($pkg_config --modversion $vtepackage) - libs_softmmu="$vte_libs $libs_softmmu" vte="yes" elif test "$vte" = "yes"; then if test "$gtkabi" = "3.0"; then @@ -6149,7 +6147,7 @@ if test "$glib_subprocess" = "yes" ; then echo "CONFIG_HAS_GLIB_SUBPROCESS_TESTS=y" >> $config_host_mak fi if test "$gtk" = "yes" ; then - echo "CONFIG_GTK=y" >> $config_host_mak + echo "CONFIG_GTK=m" >> $config_host_mak echo "CONFIG_GTKABI=$gtkabi" >> $config_host_mak echo "GTK_CFLAGS=$gtk_cflags" >> $config_host_mak echo "GTK_LIBS=$gtk_libs" >> $config_host_mak @@ -6200,6 +6198,7 @@ fi if test "$vte" = "yes" ; then echo "CONFIG_VTE=y" >> $config_host_mak echo "VTE_CFLAGS=$vte_cflags" >> $config_host_mak + echo "VTE_LIBS=$vte_libs" >> $config_host_mak fi if test "$virglrenderer" = "yes" ; then echo "CONFIG_VIRGL=y" >> $config_host_mak -- cgit v1.2.1 From 2373f7d581e82c11645a799a032b9e64fd61c1b8 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 1 Mar 2018 11:05:45 +0100 Subject: ui/curses: build as module Also drop curses libs from libs_softmmu. Add CURSES_{CFLAGS,LIBS} variables so we can use them for linking the curses module. Also make target/unicore32/helper.o depend on curses which uses curses directly for some reason ... Signed-off-by: Gerd Hoffmann Message-id: 20180301100547.18962-12-kraxel@redhat.com --- configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'configure') diff --git a/configure b/configure index ad36320a4c..e651533466 100755 --- a/configure +++ b/configure @@ -3280,8 +3280,6 @@ EOF unset IFS if compile_prog "$curses_inc" "$curses_lib" ; then curses_found=yes - QEMU_CFLAGS="$curses_inc $QEMU_CFLAGS" - libs_softmmu="$curses_lib $libs_softmmu" break fi done @@ -6050,7 +6048,9 @@ if test "$cocoa" = "yes" ; then echo "CONFIG_COCOA=y" >> $config_host_mak fi if test "$curses" = "yes" ; then - echo "CONFIG_CURSES=y" >> $config_host_mak + echo "CONFIG_CURSES=m" >> $config_host_mak + echo "CURSES_CFLAGS=$curses_inc" >> $config_host_mak + echo "CURSES_LIBS=$curses_lib" >> $config_host_mak fi if test "$pipe2" = "yes" ; then echo "CONFIG_PIPE2=y" >> $config_host_mak -- cgit v1.2.1 From 1ef1ec2a44a9c851c4875c404a105cbb2dba9e56 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 1 Mar 2018 11:05:46 +0100 Subject: audio: rename CONFIG_* to CONFIG_AUDIO_* This avoids a name clash for CONFIG_SDL, which is used by both sdl video support and sdl audio support. It also more clear that this is a audio driver configuration. Signed-off-by: Gerd Hoffmann Message-id: 20180301100547.18962-13-kraxel@redhat.com --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index e651533466..269add1187 100755 --- a/configure +++ b/configure @@ -5981,7 +5981,7 @@ if test "$cap_ng" = "yes" ; then fi echo "CONFIG_AUDIO_DRIVERS=$audio_drv_list" >> $config_host_mak for drv in $audio_drv_list; do - def=CONFIG_$(echo $drv | LC_ALL=C tr '[a-z]' '[A-Z]') + def=CONFIG_AUDIO_$(echo $drv | LC_ALL=C tr '[a-z]' '[A-Z]') echo "$def=y" >> $config_host_mak done echo "ALSA_LIBS=$alsa_libs" >> $config_host_mak -- cgit v1.2.1 From 96400a148b3e1337e2c451e95bc3c3c69a05b67c Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 1 Mar 2018 11:05:47 +0100 Subject: ui/sdl: build as module Signed-off-by: Gerd Hoffmann Message-id: 20180301100547.18962-14-kraxel@redhat.com --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 269add1187..cb4fdb3573 100755 --- a/configure +++ b/configure @@ -6039,7 +6039,7 @@ if test "$have_x11" = "yes" -a "$need_x11" = "yes"; then echo "X11_LIBS=$x11_libs" >> $config_host_mak fi if test "$sdl" = "yes" ; then - echo "CONFIG_SDL=y" >> $config_host_mak + echo "CONFIG_SDL=m" >> $config_host_mak echo "CONFIG_SDLABI=$sdlabi" >> $config_host_mak echo "SDL_CFLAGS=$sdl_cflags" >> $config_host_mak echo "SDL_LIBS=$sdl_libs" >> $config_host_mak -- cgit v1.2.1