GraphicsMagick: configure.ac: Test for interesting libjpeg-turbo...

GraphicsMagick Commits <[email protected]>
Newsgroups gmane.comp.video.graphicsmagick.cvs
Message-ID <mailman.11123.1675529335.1507.graphicsmagick-commit@lists.sourceforge.net>
changeset f07f6a9c3a58 in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=f07f6a9c3a58
summary: configure.ac: Test for interesting libjpeg-turbo 3.0 functions

diffstat:

 ChangeLog                 |   7 +++++--
 configure                 |  14 ++++++++++++++
 configure.ac              |   3 +++
 magick/magick_config.h.in |  15 +++++++++++++++
 www/Changelog.html        |   6 ++++--
 5 files changed, 41 insertions(+), 4 deletions(-)

diffs (96 lines):

diff -r 166bc6d3500d -r f07f6a9c3a58 ChangeLog
--- a/ChangeLog	Sat Feb 04 08:53:40 2023 -0600
+++ b/ChangeLog	Sat Feb 04 10:48:38 2023 -0600
@@ -1,8 +1,11 @@
 2023-02-04  Bob Friesenhahn  <[email protected]>
 
+	* configure.ac: Test for interesting libjpeg-turbo 3.0 functions
+	(which may also appear in other JPEG libraries).
+
 	* coders/jpeg.c: Block out existing code for C_LOSSLESS_SUPPORTED
-	and D_LOSSLESS_SUPPORTED when compiling with JPEG-Turbo since it
-	is not compatible with it.
+	and D_LOSSLESS_SUPPORTED when compiling with JPEG-Turbo 3.0 since
+	it is not compatible with it.
 
 	* coders/wpg.c (ApproveFormatForWPG): Pass in existing
 	ExceptionInfo pointer.
diff -r 166bc6d3500d -r f07f6a9c3a58 configure
--- a/configure	Sat Feb 04 08:53:40 2023 -0600
+++ b/configure	Sat Feb 04 10:48:38 2023 -0600
@@ -26116,6 +26116,20 @@
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
         have_jpeg='yes'
+        # Test for interesting libjpeg-turbo 3.0 functions (which may also appear in other JPEG libraries)
+        for ac_func in jpeg_enable_lossless jpeg12_write_scanlines jpeg16_write_scanlines \
+                        jpeg12_read_scanlines jpeg16_read_scanlines
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
     fi
     else
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
diff -r 166bc6d3500d -r f07f6a9c3a58 configure.ac
--- a/configure.ac	Sat Feb 04 08:53:40 2023 -0600
+++ b/configure.ac	Sat Feb 04 10:48:38 2023 -0600
@@ -2250,6 +2250,9 @@
         AC_DEFINE([HasJPEG],[1],[Define if you have JPEG library])
         AC_MSG_RESULT([yes])
         have_jpeg='yes'
+        # Test for interesting libjpeg-turbo 3.0 functions (which may also appear in other JPEG libraries)
+        AC_CHECK_FUNCS([jpeg_enable_lossless jpeg12_write_scanlines jpeg16_write_scanlines \
+                        jpeg12_read_scanlines jpeg16_read_scanlines])
     fi
     else
         AC_MSG_RESULT([no])
diff -r 166bc6d3500d -r f07f6a9c3a58 magick/magick_config.h.in
--- a/magick/magick_config.h.in	Sat Feb 04 08:53:40 2023 -0600
+++ b/magick/magick_config.h.in	Sat Feb 04 10:48:38 2023 -0600
@@ -149,6 +149,21 @@
 /* Define to 1 if you have the `jas_init_library' function. */
 #undef HAVE_JAS_INIT_LIBRARY
 
+/* Define to 1 if you have the `jpeg12_read_scanlines' function. */
+#undef HAVE_JPEG12_READ_SCANLINES
+
+/* Define to 1 if you have the `jpeg12_write_scanlines' function. */
+#undef HAVE_JPEG12_WRITE_SCANLINES
+
+/* Define to 1 if you have the `jpeg16_read_scanlines' function. */
+#undef HAVE_JPEG16_READ_SCANLINES
+
+/* Define to 1 if you have the `jpeg16_write_scanlines' function. */
+#undef HAVE_JPEG16_WRITE_SCANLINES
+
+/* Define to 1 if you have the `jpeg_enable_lossless' function. */
+#undef HAVE_JPEG_ENABLE_LOSSLESS
+
 /* Define if you have the <lcms2.h> header file. */
 #undef HAVE_LCMS2_H
 
diff -r 166bc6d3500d -r f07f6a9c3a58 www/Changelog.html
--- a/www/Changelog.html	Sat Feb 04 08:53:40 2023 -0600
+++ b/www/Changelog.html	Sat Feb 04 10:48:38 2023 -0600
@@ -40,9 +40,11 @@
 <p>2023-02-04  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: Test for interesting libjpeg-turbo 3.0 functions
+(which may also appear in other JPEG libraries).</p></li>
 <li><p>coders/jpeg.c: Block out existing code for C_LOSSLESS_SUPPORTED
-and D_LOSSLESS_SUPPORTED when compiling with JPEG-Turbo since it
-is not compatible with it.</p></li>
+and D_LOSSLESS_SUPPORTED when compiling with JPEG-Turbo 3.0 since
+it is not compatible with it.</p></li>
 <li><p>coders/wpg.c (ApproveFormatForWPG): Pass in existing
 ExceptionInfo pointer.</p></li>
 </ul>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.