configure: improve libheif detection and output.
Replace the "Heif >= 1.4.0" line in the summary output by a comment in the "Heif" line explaining this is about profile support. Also add a >= 1.6.0 test and output a warning for Windows and macOS (cf. bug #4185).
This commit is contained in:
39
configure.ac
39
configure.ac
@ -1789,27 +1789,45 @@ AM_CONDITIONAL(HAVE_WEBP, test "x$have_webp" = xyes)
|
||||
AC_ARG_WITH(libheif, [ --without-libheif build without libheif support])
|
||||
|
||||
have_libheif=no
|
||||
have_libheif_1_4_0=no
|
||||
have_libheif_1_6_0=no
|
||||
if test "x$with_libheif" != xno; then
|
||||
have_libheif_1_4_0=yes
|
||||
have_libheif_1_6_0=yes
|
||||
have_libheif=yes
|
||||
PKG_CHECK_MODULES(LIBHEIF, libheif >= 1.4.0,,
|
||||
[have_libheif_1_4_0="no (libheif >= 1.4.0 not found)"])
|
||||
PKG_CHECK_MODULES(LIBHEIF, libheif >= libheif_required_version,
|
||||
FILE_HEIF='file-heif$(EXEEXT)',
|
||||
[have_libheif="no (libheif not found)"])
|
||||
fi
|
||||
|
||||
if test "x$have_libheif" = xyes; then
|
||||
MIME_TYPES="$MIME_TYPES;image/heif;image/heic"
|
||||
PKG_CHECK_MODULES(LIBHEIF, libheif >= 1.6.0,,
|
||||
[
|
||||
have_libheif_1_6_0="no (libheif >= 1.6.0 not found)"
|
||||
PKG_CHECK_MODULES(LIBHEIF, libheif >= 1.4.0,,
|
||||
[
|
||||
have_libheif_1_4_0="no (libheif >= 1.4.0 not found)"
|
||||
PKG_CHECK_MODULES(LIBHEIF, libheif >= libheif_required_version,
|
||||
FILE_HEIF='file-heif$(EXEEXT)',
|
||||
[have_libheif="no (libheif not found)"])
|
||||
])
|
||||
])
|
||||
fi
|
||||
|
||||
AC_SUBST(FILE_HEIF)
|
||||
AM_CONDITIONAL(HAVE_LIBHEIF, test "x$have_libheif" = xyes)
|
||||
|
||||
if test "x$have_libheif" = xyes; then
|
||||
MIME_TYPES="$MIME_TYPES;image/heif;image/heic"
|
||||
have_libheif="yes [[profile support: $have_libheif_1_4_0]]"
|
||||
fi
|
||||
|
||||
if test "x$have_libheif_1_4_0" = xyes; then
|
||||
AC_DEFINE(HAVE_LIBHEIF_1_4_0, 1,
|
||||
[Define to 1 if libheif >= 1.4.0 is available])
|
||||
fi
|
||||
if test "x$have_libheif_1_6_0" = xyes; then
|
||||
AC_DEFINE(HAVE_LIBHEIF_1_6_0, 1,
|
||||
[Define to 1 if libheif >= 1.6.0 is available])
|
||||
elif test "x$platform_win32" = xyes || test "x$platform_osx" = xyes; then
|
||||
warning_libheif="
|
||||
WARNING: libheif lower than version 1.6.0 are known to crash when
|
||||
exporting on Windows and macOS (bug #4185). Please update."
|
||||
fi
|
||||
|
||||
|
||||
########################
|
||||
@ -3134,7 +3152,6 @@ Optional Plug-Ins:
|
||||
OpenEXR: $have_openexr
|
||||
WebP: $have_webp
|
||||
Heif: $have_libheif
|
||||
Heif >= 1.4.0: $have_libheif_1_4_0
|
||||
PDF (export): $have_cairo_pdf
|
||||
Print: $enable_print
|
||||
Python 3 plug-ins: $with_python
|
||||
@ -3158,7 +3175,7 @@ Tests:
|
||||
Test desktop file $have_desktop_file_validate
|
||||
|
||||
Bug report URL: $with_bug_report_url
|
||||
$override_bug_report_url$warning_vector_icons_windows$warning_glib_networking$warning_gcc$warning_python$warning_javascript$warning_lua"
|
||||
$override_bug_report_url$warning_vector_icons_windows$warning_glib_networking$warning_gcc$warning_python$warning_javascript$warning_lua$warning_libheif"
|
||||
|
||||
if test "x$required_deps" = "x"; then
|
||||
AC_OUTPUT
|
||||
|
||||
Reference in New Issue
Block a user