configure: shared-mime-info is necessary to detect SVG icons.

It is apparently not used for file type detection on Windows since
SVG detection worked correctly without installing this package. But
vector icons end up broken under MacOS when this is not installed
(thanks to Kris for testing this!). I assume this is necessary on
GNU/Linux too.
This commit is contained in:
Jehan 2017-05-02 23:13:22 +02:00
parent 6265282115
commit 6126437a44
1 changed files with 27 additions and 17 deletions

View File

@ -2105,6 +2105,13 @@ if test "x$enable_vector_icons" != "xno"; then
if test "x$have_recommended_gtk" != "x"; then
enable_vector_icons="no (gtk+-2-0 < gtk_win32_recommended_version)"
else
have_shared_mime_info=""
# shared-mime-info is needed to correctly detect SVG files (except on
# Windows, apparently).
PKG_CHECK_MODULES(MIME_INFO, [shared-mime-info],
have_shared_mime_info="yes", have_shared_mime_info="no")
if test "x$have_shared_mime_info" = "xyes" ||
test "x$platform_win32" = "xyes"; then
# Check if librsvg was built with --disable-pixbuf-loader.
gdk_pixbuf_moduledir=`$PKG_CONFIG --variable=gdk_pixbuf_moduledir gdk-pixbuf-2.0`
# AC_CHECK_FILE macro does not work when cross-compiling and exits with:
@ -2126,6 +2133,9 @@ if test "x$enable_vector_icons" != "xno"; then
else
enable_vector_icons="no (librsvg GdkPixbuf loader missing)"
fi
else
enable_vector_icons="no (missing shared-mime-info)"
fi
fi
fi