[PATCH v2 1/4] configure: Introduce new jxrlib dependency.

Rémi Bernon rbernon at codeweavers.com
Thu Jan 28 06:11:44 CST 2021


This library is the JPEG-XR / Windows Media Photo / HD Photo reference
implementation from Microsoft, released under BSD 2-Clause license:

    https://archive.codeplex.com/?p=jxrlib

It is available for most Linux distributions already, and is also an
optional dependency for imagemagick, freeimage or calibre:

* https://packages.debian.org/source/sid/jxrlib

* https://rpmfind.net/linux/rpm2html/search.php?query=jxrlib

* https://packages.ubuntu.com/source/xenial/jxrlib

* https://www.archlinux.org/packages/community/x86_64/jxrlib/

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---

v2: * Check for short reads in PATCH 3, and WARN in such case. Some
      jxrlib calls don't care about the returned value so ERR would be
      verbose.

    * Add an ERR message when jxrlib support isn't compiled in.

Supersedes: 198075-198079 and 198035-198039

 configure.ac | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/configure.ac b/configure.ac
index 0f8b9f6c080..4f95a1325d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,6 +58,7 @@ AC_ARG_WITH(gstreamer, AS_HELP_STRING([--without-gstreamer],[do not use GStreame
 AC_ARG_WITH(hal,       AS_HELP_STRING([--without-hal],[do not use HAL (dynamic device support)]))
 AC_ARG_WITH(inotify,   AS_HELP_STRING([--without-inotify],[do not use inotify (filesystem change notifications)]))
 AC_ARG_WITH(jpeg,      AS_HELP_STRING([--without-jpeg],[do not use JPEG]))
+AC_ARG_WITH(jxrlib,    AS_HELP_STRING([--without-jxrlib],[do not use JPEG-XR]))
 AC_ARG_WITH(krb5,      AS_HELP_STRING([--without-krb5],[do not use krb5 (Kerberos)]))
 AC_ARG_WITH(ldap,      AS_HELP_STRING([--without-ldap],[do not use LDAP]),
             [if test "x$withval" = "xno"; then ac_cv_header_ldap_h=no; ac_cv_header_lber_h=no; fi])
@@ -1829,6 +1830,21 @@ fi
 WINE_WARNING_WITH(jpeg,[test "x$ac_cv_lib_soname_jpeg" = "x"],
                  [libjpeg ${notice_platform}development files not found, JPEG won't be supported.])
 
+dnl **** Check for libjxrglue ****
+if test "x$with_jxrlib" != "xno"
+then
+    WINE_PACKAGE_FLAGS(JXRLIB,[jxrlib],,[${JXRLIB_CFLAGS:--I/usr/include/jxrlib}],,
+        [AC_CHECK_HEADERS([JXRGlue.h],,,[#define FAR])
+        if test "$ac_cv_header_JXRGlue_h" = "yes"
+        then
+            WINE_CHECK_SONAME(jxrglue,PKImageDecode_Create_WMP,,[JXRLIB_CFLAGS=""],[$JXRLIB_LIBS])
+        else
+            JXRLIB_CFLAGS=""
+        fi])
+fi
+WINE_WARNING_WITH(jxrlib,[test "x$ac_cv_lib_soname_jxrglue" = "x"],
+                 [jxrlib ${notice_platform}development files not found, JPEG-XR won't be supported.])
+
 dnl **** Check for libpng ****
 if test "x$with_png" != "xno"
 then
-- 
2.30.0




More information about the wine-devel mailing list