aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2021-01-07 14:02:29 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2021-01-12 12:38:03 +0100
commit1b6954713fee49452077ebc09a8cf76b18cfe04e (patch)
treeb001dc166678c8434933ef6e51b7c3296db33b20 /configure
parent9d71037f4beb203e3fddfe78ac9d79ef34999796 (diff)
configure: move GTK+ detection to Meson
This also allows removing CONFIG_NEED_X11, all the ingredients can be computed easily in meson.build. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure55
1 files changed, 6 insertions, 49 deletions
diff --git a/configure b/configure
index ec0639387d..d70448f495 100755
--- a/configure
+++ b/configure
@@ -414,7 +414,7 @@ cfi="false"
cfi_debug="false"
seccomp="auto"
glusterfs="auto"
-gtk="$default_feature"
+gtk="auto"
tls_priority="NORMAL"
gnutls="$default_feature"
nettle="$default_feature"
@@ -1377,9 +1377,9 @@ for opt do
--enable-uuid|--disable-uuid)
echo "$0: $opt is obsolete, UUID support is always built" >&2
;;
- --disable-gtk) gtk="no"
+ --disable-gtk) gtk="disabled"
;;
- --enable-gtk) gtk="yes"
+ --enable-gtk) gtk="enabled"
;;
--tls-priority=*) tls_priority="$optarg"
;;
@@ -2329,10 +2329,10 @@ if test "$cocoa" = "enabled"; then
if test "$sdl" = "enabled"; then
error_exit "Cocoa and SDL UIs cannot both be enabled at once"
fi
- if test "$gtk" = "yes"; then
+ if test "$gtk" = "enabled"; then
error_exit "Cocoa and GTK UIs cannot both be enabled at once"
fi
- gtk=no
+ gtk=disabled
sdl=disabled
fi
@@ -2760,31 +2760,6 @@ EOF
fi
##########################################
-# GTK probe
-
-if test "$gtk" != "no"; then
- gtkpackage="gtk+-3.0"
- gtkx11package="gtk+-x11-3.0"
- gtkversion="3.22.0"
- if $pkg_config --exists "$gtkpackage >= $gtkversion"; then
- gtk_cflags=$($pkg_config --cflags $gtkpackage)
- 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
- gtk="yes"
- elif test "$gtk" = "yes"; then
- feature_not_found "gtk" "Install gtk3-devel"
- else
- gtk="no"
- fi
-fi
-
-
-##########################################
# GNUTLS probe
if test "$gnutls" != "no"; then
@@ -3640,16 +3615,6 @@ EOF
fi
fi
-if test "$opengl" = "yes" && test "$have_x11" = "yes"; then
- for target in $target_list; do
- case $target in
- lm32-softmmu) # milkymist-tmu2 requires X11 and OpenGL
- need_x11=yes
- ;;
- esac
- done
-fi
-
##########################################
# libxml2 probe
if test "$libxml2" != "no" ; then
@@ -5673,9 +5638,6 @@ fi
if test "$module_upgrades" = "yes"; then
echo "CONFIG_MODULE_UPGRADES=y" >> $config_host_mak
fi
-if test "$need_x11" = "yes"; then
- echo "CONFIG_NEED_X11=y" >> $config_host_mak
-fi
if test "$pipe2" = "yes" ; then
echo "CONFIG_PIPE2=y" >> $config_host_mak
fi
@@ -5763,11 +5725,6 @@ fi
if test "$bswap_h" = "yes" ; then
echo "CONFIG_MACHINE_BSWAP_H=y" >> $config_host_mak
fi
-if test "$gtk" = "yes" ; then
- echo "CONFIG_GTK=y" >> $config_host_mak
- echo "GTK_CFLAGS=$gtk_cflags" >> $config_host_mak
- echo "GTK_LIBS=$gtk_libs" >> $config_host_mak
-fi
if test "$gio" = "yes" ; then
echo "CONFIG_GIO=y" >> $config_host_mak
echo "GIO_CFLAGS=$gio_cflags" >> $config_host_mak
@@ -6501,7 +6458,7 @@ NINJA=$ninja $meson setup \
-Dmalloc=$malloc -Dmalloc_trim=$malloc_trim -Dsparse=$sparse \
-Dkvm=$kvm -Dhax=$hax -Dwhpx=$whpx -Dhvf=$hvf \
-Dxen=$xen -Dxen_pci_passthrough=$xen_pci_passthrough -Dtcg=$tcg \
- -Dcocoa=$cocoa -Dmpath=$mpath -Dsdl=$sdl -Dsdl_image=$sdl_image \
+ -Dcocoa=$cocoa -Dgtk=$gtk -Dmpath=$mpath -Dsdl=$sdl -Dsdl_image=$sdl_image \
-Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \
-Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f -Dvirtiofsd=$virtiofsd \
-Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \