Skip to contentSkip to conversation

configure: Provide more helpful message if libvte not present

PATCH Applied Peter Maydell 2 participants 2 messages Jul 18, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Provide more helpful message if libvte not present

If the system has GTK but not libvte, it's more helpful to tell the user that libvte is missing than to simply say that GTK is not present.

---
Since this confused me today and also iggy on IRC, it seems worth making the message a little more specific about what's needed.

 configure |   18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
configure +11 -7
index cb0f870..9e1cd19 100755
@@ -1697,19 +1697,23 @@ if test "$gtk" != "no"; then
       vtepackage="vte"
       vteversion="0.24.0"
     fi
-    if $pkg_config --exists "$gtkpackage >= $gtkversion" && \
-       $pkg_config --exists "$vtepackage >= $vteversion"; then
+    if ! $pkg_config --exists "$gtkpackage >= $gtkversion"; then
+        if test "$gtk" = "yes" ; then
+            feature_not_found "gtk"
+        fi
+        gtk="no"
+    elif ! $pkg_config --exists "$vtepackage >= $vteversion"; then
+        if test "$gtk" = "yes" ; then
+            error_exit "libvte not found (required for gtk support)"
+        fi
+        gtk="no"
+    else
 	gtk_cflags=`$pkg_config --cflags $gtkpackage 2>/dev/null`
 	gtk_libs=`$pkg_config --libs $gtkpackage 2>/dev/null`
 	vte_cflags=`$pkg_config --cflags $vtepackage 2>/dev/null`
 	vte_libs=`$pkg_config --libs $vtepackage 2>/dev/null`
 	libs_softmmu="$gtk_libs $vte_libs $libs_softmmu"
 	gtk="yes"
-    else
-	if test "$gtk" = "yes" ; then
-	    feature_not_found "gtk"
-	fi
-	gtk="no"
     fi
 fi
 
Signature · 1 line
1.7.9.5