@@ -2784,17 +2784,24 @@ fi
# GNUTLS probe
if test "$gnutls" != "no"; then
+ pass="no"
if $pkg_config --exists "gnutls >= 3.1.18"; then
gnutls_cflags=$($pkg_config --cflags gnutls)
gnutls_libs=$($pkg_config --libs gnutls)
- libs_softmmu="$gnutls_libs $libs_softmmu"
- libs_tools="$gnutls_libs $libs_tools"
- QEMU_CFLAGS="$QEMU_CFLAGS $gnutls_cflags"
- gnutls="yes"
- elif test "$gnutls" = "yes"; then
+ # Packaging for the static libraries is not always correct.
+ # At least ubuntu 18.04 ships only shared libraries.
+ write_c_skeleton
+ if compile_prog "" "$gnutls_libs" ; then
+ libs_softmmu="$gnutls_libs $libs_softmmu"
+ libs_tools="$gnutls_libs $libs_tools"
+ QEMU_CFLAGS="$QEMU_CFLAGS $gnutls_cflags"
+ pass="yes"
+ fi
+ fi
+ if test "$pass" = "no" && test "$gnutls" = "yes"; then
feature_not_found "gnutls" "Install gnutls devel >= 3.1.18"
else
- gnutls="no"
+ gnutls="$pass"
fi
fi
At least ubuntu 18.04 does not package static gnutls libraries. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- configure | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) -- 2.17.1