GraphicsMagick: configure.ac: Eliminate redundant check for HEIF...

GraphicsMagick Commits <[email protected]> Fri, 24 Nov 2023 16:08:06 -0600
Newsgroups gmane.comp.video.graphicsmagick.cvs
Message-ID <mailman.6073.1700863694.1716.graphicsmagick-commit@lists.sourceforge.net>
changeset 862adbf165e0 in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=862adbf165e0
summary: configure.ac: Eliminate redundant check for HEIF library

diffstat:

 ChangeLog          |   2 +
 configure          |  85 +-----------------------------------------------------
 configure.ac       |   7 +---
 www/Changelog.html |   1 +
 4 files changed, 5 insertions(+), 90 deletions(-)

diffs (141 lines):

diff -r 4c88eec00a57 -r 862adbf165e0 ChangeLog
--- a/ChangeLog	Fri Nov 24 14:42:41 2023 -0600
+++ b/ChangeLog	Fri Nov 24 16:08:03 2023 -0600
@@ -1,5 +1,7 @@
 2023-11-24  Bob Friesenhahn  <[email protected]>
 
+	* configure.ac: Eliminate redundant check for HEIF library.
+
 	* www/INSTALL-unix.rst: Document how to get a maximally-static
 	build using `PKG_CONFIG='pkg-config --static' ./configure`.
 
diff -r 4c88eec00a57 -r 862adbf165e0 configure
--- a/configure	Fri Nov 24 14:42:41 2023 -0600
+++ b/configure	Fri Nov 24 16:08:03 2023 -0600
@@ -29076,66 +29076,7 @@
     if test $failed -eq 0 ; then
        pkg_config_to_flags 'libheif' "${HEIF_LIBS}" "${HEIF_CFLAGS}"
     fi
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libheif" >&5
-$as_echo_n "checking for libheif... " >&6; }
-
-if test -n "$HEIF_CFLAGS"; then
-    pkg_cv_HEIF_CFLAGS="$HEIF_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libheif\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libheif") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_HEIF_CFLAGS=`$PKG_CONFIG --cflags "libheif" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$HEIF_LIBS"; then
-    pkg_cv_HEIF_LIBS="$HEIF_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libheif\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libheif") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_HEIF_LIBS=`$PKG_CONFIG --libs "libheif" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        HEIF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libheif" 2>&1`
-        else
-	        HEIF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libheif" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$HEIF_PKG_ERRORS" >&5
-
-	ac_fn_c_check_header_mongrel "$LINENO" "libheif/heif.h" "ac_cv_header_libheif_heif_h" "$ac_includes_default"
+    ac_fn_c_check_header_mongrel "$LINENO" "libheif/heif.h" "ac_cv_header_libheif_heif_h" "$ac_includes_default"
 if test "x$ac_cv_header_libheif_heif_h" = xyes; then :
   passed=`expr $passed + 1`
 else
@@ -29143,30 +29084,6 @@
 fi
 
 
-        # Assume sensible default for codec; This will fail with a static
-        # libheif that contains a avif codec.
-        heif_libs="-lheif -lde265"
-elif test $pkg_failed = untried; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	ac_fn_c_check_header_mongrel "$LINENO" "libheif/heif.h" "ac_cv_header_libheif_heif_h" "$ac_includes_default"
-if test "x$ac_cv_header_libheif_heif_h" = xyes; then :
-  passed=`expr $passed + 1`
-else
-  failed=`expr $failed + 1`
-fi
-
-
-        # Assume sensible default for codec; This will fail with a static
-        # libheif that contains a avif codec.
-        heif_libs="-lheif -lde265"
-else
-	HEIF_CFLAGS=$pkg_cv_HEIF_CFLAGS
-	HEIF_LIBS=$pkg_cv_HEIF_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	heif_libs=$HEIF_LIBS; heif_cflags=$HEIF_CFLAGS; passed=1;
-fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for heif_context_alloc in -lheif" >&5
 $as_echo_n "checking for heif_context_alloc in -lheif... " >&6; }
 if ${ac_cv_lib_heif_heif_context_alloc+:} false; then :
diff -r 4c88eec00a57 -r 862adbf165e0 configure.ac
--- a/configure.ac	Fri Nov 24 14:42:41 2023 -0600
+++ b/configure.ac	Fri Nov 24 16:08:03 2023 -0600
@@ -2969,12 +2969,7 @@
     if test $failed -eq 0 ; then
        pkg_config_to_flags 'libheif' "${HEIF_LIBS}" "${HEIF_CFLAGS}"
     fi
-    PKG_CHECK_MODULES([HEIF], [libheif],
-        [heif_libs=$HEIF_LIBS; heif_cflags=$HEIF_CFLAGS; passed=1;],
-        [AC_CHECK_HEADER([libheif/heif.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
-        # Assume sensible default for codec; This will fail with a static
-        # libheif that contains a avif codec.
-        heif_libs="-lheif -lde265"])
+    AC_CHECK_HEADER([libheif/heif.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
     AC_CHECK_LIB([heif],[heif_context_alloc],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],[$heif_libs])
     AC_CHECK_FUNCS([heif_init heif_deinit])
     AC_MSG_CHECKING([if HEIF package is complete])
diff -r 4c88eec00a57 -r 862adbf165e0 www/Changelog.html
--- a/www/Changelog.html	Fri Nov 24 14:42:41 2023 -0600
+++ b/www/Changelog.html	Fri Nov 24 16:08:03 2023 -0600
@@ -40,6 +40,7 @@
 <p>2023-11-24  Bob Friesenhahn  &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
 <blockquote>
 <ul class="simple">
+<li><p>configure.ac: Eliminate redundant check for HEIF library.</p></li>
 <li><p>www/INSTALL-unix.rst: Document how to get a maximally-static
 build using <cite>PKG_CONFIG='pkg-config --static' ./configure</cite>.</p></li>
 <li><p>fuzzing/oss-fuzz-build.sh: Continued work to try to accomplish a