[gimp] autotools: separate line for HEIC and AVIF support.



commit 22b8cd305c6ad7fd4b681ca3bceeb2deb9bd6791
Author: Jehan <jehan girinstud io>
Date:   Mon Oct 19 20:14:12 2020 +0200

    autotools: separate line for HEIC and AVIF support.
    
    Similar to previous commit for meson (separate commit for easy
    cherry-pick to gimp-2-10).

 configure.ac | 31 ++++++++++++++++++++++++-------
 1 file changed, 24 insertions(+), 7 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 3f97152394..b1de8a8bf5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1792,8 +1792,29 @@ WARNING: libheif version 1.5.0 and 1.5.1 are known to crash when
     ])
 fi
 
+can_import_heic=no
+can_export_heic=no
+can_import_avif=no
+can_export_avif=no
 if test "x$have_libheif" = xyes; then
-  FILE_HEIF='file-heif$(EXEEXT)'
+  can_import_heic=`$PKG_CONFIG --variable=builtin_h265_decoder libheif`
+  can_export_heic=`$PKG_CONFIG --variable=builtin_h265_encoder libheif`
+  if test "x$can_import_heic" = xyes; then
+    MIME_TYPES="$MIME_TYPES;image/heif;image/heic"
+  fi
+  can_import_avif=`$PKG_CONFIG --variable=builtin_avif_decoder libheif`
+  can_export_avif=`$PKG_CONFIG --variable=builtin_avif_encoder libheif`
+  if test "x$can_import_avif" = xyes; then
+    MIME_TYPES="$MIME_TYPES;image/avif"
+  fi
+
+  if test "x$can_import_heic" != xyes && test "x$can_import_avif" != xyes; then
+    have_libheif=no
+    have_libheif_1_4_0=no
+    warning_libheif=""
+  else
+    FILE_HEIF='file-heif$(EXEEXT)'
+  fi
 fi
 
 AC_SUBST(FILE_HEIF)
@@ -1808,11 +1829,6 @@ if test "x$have_libheif_1_4_0" = xyes; then
   fi
 fi
 
-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
-
 
 ########################
 # Check for libbacktrace
@@ -3160,7 +3176,8 @@ Optional Plug-Ins:
   MNG:                       $have_libmng
   OpenEXR:                   $have_openexr
   WebP:                      $have_webp
-  Heif:                      $have_libheif
+  HEIC:                      import: $can_import_heic - export: $can_export_heic [[profile support: 
$have_libheif_1_4_0]]
+  AVIF:                      import: $can_import_avif - export: $can_export_avif
   PDF (export):              $have_cairo_pdf
   Print:                     $enable_print
   Python 3 plug-ins:         $with_python


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]