From: Stewart Smith <stewart@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Stewart Smith <stewart@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH v2 5/6] configure: add hints to a remedy for feature_not_found errors
Date: Fri, 24 Jan 2014 12:39:10 +1100 [thread overview]
Message-ID: <1390527551-22069-6-git-send-email-stewart@linux.vnet.ibm.com> (raw)
In-Reply-To: <1390527551-22069-1-git-send-email-stewart@linux.vnet.ibm.com>
Modify feature_not_found to accept an optional second parameter to be
printed after the generic feature not found error.
Modify most calls to feature_not_found to provide hints as to the
packages that may be missing. The few calls remaining without a remedy
are ones I couldn't work out how to remedy myself.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
configure | 68 ++++++++++++++++++++++++++++++++-------------------------------
1 file changed, 35 insertions(+), 33 deletions(-)
diff --git a/configure b/configure
index e607ebf..4ad2de5 100755
--- a/configure
+++ b/configure
@@ -1472,9 +1472,11 @@ esac
feature_not_found() {
feature=$1
+ remedy=$2
error_exit "User requested feature $feature" \
- "configure was not able to find it"
+ "configure was not able to find it." \
+ "$remedy"
}
# ---
@@ -1522,7 +1524,7 @@ int main(void) {
}
EOF
if ! compile_object ; then
- feature_not_found "nptl"
+ feature_not_found "nptl" "Install glibc and linux kernel headers."
fi
fi
@@ -1553,7 +1555,7 @@ if test "$seccomp" != "no" ; then
seccomp="yes"
else
if test "$seccomp" = "yes"; then
- feature_not_found "libseccomp"
+ feature_not_found "libseccomp" "Install libseccomp devel >= 2.1.0"
fi
seccomp="no"
fi
@@ -1578,7 +1580,7 @@ EOF
if ! compile_prog "" "$xen_libs" ; then
# Xen not found
if test "$xen" = "yes" ; then
- feature_not_found "xen"
+ feature_not_found "xen" "Install xen devel"
fi
xen=no
@@ -1701,7 +1703,7 @@ EOF
# Xen version unsupported
else
if test "$xen" = "yes" ; then
- feature_not_found "xen (unsupported version)"
+ feature_not_found "xen (unsupported version)" "Install supported xen (e.g. 4.0, 3.4, 3.3)"
fi
xen=no
fi
@@ -1750,7 +1752,7 @@ if test "$sparse" != "no" ; then
sparse=yes
else
if test "$sparse" = "yes" ; then
- feature_not_found "sparse"
+ feature_not_found "sparse" "Install sparse binary"
fi
sparse=no
fi
@@ -1772,7 +1774,7 @@ if test "$gtk" != "no"; then
fi
if ! $pkg_config --exists "$gtkpackage >= $gtkversion"; then
if test "$gtk" = "yes" ; then
- feature_not_found "gtk"
+ feature_not_found "gtk" "Install gtk2 or gtk3 (requires --with-gtkabi=3.0 option to configure) devel"
fi
gtk="no"
elif ! $pkg_config --exists "$vtepackage >= $vteversion"; then
@@ -1807,7 +1809,7 @@ elif has ${sdl_config}; then
_sdlversion=`$sdlconfig --version | sed 's/[^0-9]//g'`
else
if test "$sdl" = "yes" ; then
- feature_not_found "sdl"
+ feature_not_found "sdl" "Install SDL devel"
fi
sdl=no
fi
@@ -1851,7 +1853,7 @@ EOF
fi # static link
else # sdl not found
if test "$sdl" = "yes" ; then
- feature_not_found "sdl"
+ feature_not_found "sdl" "Install SDL devel"
fi
sdl=no
fi # sdl compile test
@@ -1917,10 +1919,10 @@ EOF
QEMU_CFLAGS="$QEMU_CFLAGS $vnc_tls_cflags"
else
if test "$vnc_tls" = "yes" ; then
- feature_not_found "vnc-tls"
+ feature_not_found "vnc-tls" "Install gnutls devel"
fi
if test "$vnc_ws" = "yes" ; then
- feature_not_found "vnc-ws"
+ feature_not_found "vnc-ws" "Install gnutls devel"
fi
vnc_tls=no
vnc_ws=no
@@ -1944,7 +1946,7 @@ EOF
QEMU_CFLAGS="$QEMU_CFLAGS $vnc_sasl_cflags"
else
if test "$vnc_sasl" = "yes" ; then
- feature_not_found "vnc-sasl"
+ feature_not_found "vnc-sasl" "Install Cyrus SASL devel"
fi
vnc_sasl=no
fi
@@ -1966,7 +1968,7 @@ EOF
QEMU_CFLAGS="$QEMU_CFLAGS $vnc_jpeg_cflags"
else
if test "$vnc_jpeg" = "yes" ; then
- feature_not_found "vnc-jpeg"
+ feature_not_found "vnc-jpeg" "Install libjpeg-turbo devel"
fi
vnc_jpeg=no
fi
@@ -1998,7 +2000,7 @@ EOF
QEMU_CFLAGS="$QEMU_CFLAGS $vnc_png_cflags"
else
if test "$vnc_png" = "yes" ; then
- feature_not_found "vnc-png"
+ feature_not_found "vnc-png" "Install libpng devel"
fi
vnc_png=no
fi
@@ -2042,7 +2044,7 @@ EOF
libs_tools="$uuid_libs $libs_tools"
else
if test "$uuid" = "yes" ; then
- feature_not_found "uuid"
+ feature_not_found "uuid" "Install libuuid devel"
fi
uuid=no
fi
@@ -2076,7 +2078,7 @@ EOF
xfs="yes"
else
if test "$xfs" = "yes" ; then
- feature_not_found "xfs"
+ feature_not_found "xfs" "Instal xfsprogs/xfslibs devel"
fi
xfs=no
fi
@@ -2102,7 +2104,7 @@ EOF
libs_tools="$vde_libs $libs_tools"
else
if test "$vde" = "yes" ; then
- feature_not_found "vde"
+ feature_not_found "vde" "Install vde (Virtual Distributed Ethernet) devel"
fi
vde=no
fi
@@ -2145,7 +2147,7 @@ EOF
libs_tools="$cap_libs $libs_tools"
else
if test "$cap_ng" = "yes" ; then
- feature_not_found "cap_ng"
+ feature_not_found "cap_ng" "Install libcap-ng devel"
fi
cap_ng=no
fi
@@ -2250,7 +2252,7 @@ EOF
libs_softmmu="$brlapi_libs $libs_softmmu"
else
if test "$brlapi" = "yes" ; then
- feature_not_found "brlapi"
+ feature_not_found "brlapi" "Install brlapi devel"
fi
brlapi=no
fi
@@ -2287,7 +2289,7 @@ EOF
curses=yes
else
if test "$curses" = "yes" ; then
- feature_not_found "curses"
+ feature_not_found "curses" "Install ncurses devel"
fi
curses=no
fi
@@ -2313,7 +2315,7 @@ EOF
libs_softmmu="$curl_libs $libs_softmmu"
else
if test "$curl" = "yes" ; then
- feature_not_found "curl"
+ feature_not_found "curl" "Install libcurl devel"
fi
curl=no
fi
@@ -2333,7 +2335,7 @@ EOF
libs_softmmu="$bluez_libs $libs_softmmu"
else
if test "$bluez" = "yes" ; then
- feature_not_found "bluez"
+ feature_not_found "bluez" "Install bluez-libs/libbluetooth devel"
fi
bluez="no"
fi
@@ -2469,7 +2471,7 @@ EOF
libs_softmmu="$rbd_libs $libs_softmmu"
else
if test "$rbd" = "yes" ; then
- feature_not_found "rados block device"
+ feature_not_found "rados block device" "Install librbd/ceph devel"
fi
rbd=no
fi
@@ -2535,7 +2537,7 @@ EOF
libs_tools="$libs_tools -laio"
else
if test "$linux_aio" = "yes" ; then
- feature_not_found "linux AIO"
+ feature_not_found "linux AIO" "Install libaio devel"
fi
linux_aio=no
fi
@@ -2583,7 +2585,7 @@ EOF
libattr=yes
else
if test "$attr" = "yes" ; then
- feature_not_found "ATTR"
+ feature_not_found "ATTR" "Install libc6 or libattr devel"
fi
attr=no
fi
@@ -2687,7 +2689,7 @@ EOF
glx=yes
else
if test "$glx" = "yes" ; then
- feature_not_found "glx"
+ feature_not_found "glx" "Install GL devel (e.g. MESA)"
fi
glx_libs=
glx=no
@@ -2709,7 +2711,7 @@ if test "$glusterfs" != "no" ; then
fi
else
if test "$glusterfs" = "yes" ; then
- feature_not_found "GlusterFS backend support"
+ feature_not_found "GlusterFS backend support" "Install glusterfs-api devel"
fi
glusterfs="no"
fi
@@ -3029,7 +3031,7 @@ if test "$docs" != "no" ; then
docs=yes
else
if test "$docs" = "yes" ; then
- feature_not_found "docs"
+ feature_not_found "docs" "Install texinfo and Perl/perl-podlators"
fi
docs=no
fi
@@ -3078,7 +3080,7 @@ EOF
LIBS="$LIBS -liscsi"
else
if test "$libiscsi" = "yes" ; then
- feature_not_found "libiscsi"
+ feature_not_found "libiscsi" "Install libiscsi devel"
fi
libiscsi="no"
fi
@@ -3162,7 +3164,7 @@ EOF
spice_server_version=$($pkg_config --modversion spice-server)
else
if test "$spice" = "yes" ; then
- feature_not_found "spice"
+ feature_not_found "spice" "Install spice-server and spice-protocol devel"
fi
spice="no"
fi
@@ -3212,7 +3214,7 @@ if test "$libusb" != "no" ; then
libs_softmmu="$libs_softmmu $libusb_libs"
else
if test "$libusb" = "yes"; then
- feature_not_found "libusb"
+ feature_not_found "libusb" "Install libusb devel"
fi
libusb="no"
fi
@@ -3228,7 +3230,7 @@ if test "$usb_redir" != "no" ; then
libs_softmmu="$libs_softmmu $usb_redir_libs"
else
if test "$usb_redir" = "yes"; then
- feature_not_found "usb-redir"
+ feature_not_found "usb-redir" "Install usbredir devel"
fi
usb_redir="no"
fi
@@ -4292,7 +4294,7 @@ if test "$trace_backend" = "ftrace"; then
echo "CONFIG_TRACE_FTRACE=y" >> $config_host_mak
trace_default=no
else
- feature_not_found "ftrace(trace backend)"
+ feature_not_found "ftrace(trace backend)" "ftrace requires Linux"
fi
fi
echo "CONFIG_TRACE_FILE=$trace_file" >> $config_host_mak
--
1.8.4.2
next prev parent reply other threads:[~2014-01-24 1:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-23 4:54 [Qemu-devel] [PATCH] configure: helpfully output package names for some missing dependencies Stewart Smith
2014-01-23 6:21 ` Stefan Weil
2014-01-23 10:28 ` Peter Maydell
2014-01-23 11:08 ` Stewart Smith
2014-01-24 1:39 ` [Qemu-devel] [PATCH v2 0/6] configure: make output and errors more friendly Stewart Smith
2014-01-24 1:39 ` [Qemu-devel] [PATCH v2 1/6] configure: add hint of libfdt to DTC dependency not found message Stewart Smith
2014-01-24 6:13 ` Stefan Weil
2014-01-24 1:39 ` [Qemu-devel] [PATCH v2 2/6] configure: sort output of configure results alphabetically Stewart Smith
2014-01-24 1:39 ` [Qemu-devel] [PATCH v2 3/6] configure: alphabetize output of --help and separate into groups Stewart Smith
2014-01-24 6:30 ` Stefan Weil
2014-01-24 1:39 ` [Qemu-devel] [PATCH v2 4/6] configure: add help for --disable-xfsctl and --enable-xfsctl Stewart Smith
2014-01-24 1:39 ` Stewart Smith [this message]
2014-01-24 1:39 ` [Qemu-devel] [PATCH v2 6/6] configure: helpfully output package names for some missing dependencies Stewart Smith
2014-02-01 9:55 ` [Qemu-devel] [Qemu-trivial] [PATCH v2 0/6] configure: make output and errors more friendly Michael Tokarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1390527551-22069-6-git-send-email-stewart@linux.vnet.ibm.com \
--to=stewart@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).