1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
Description: Add support for OpenJPEig 2.2.
Author: Alessandro Furieri <a.furieri@lqt.it>
Origin: https://www.gaia-gis.it/fossil/spatialite_gui/ci/161086f290f99151?sbs=1
Bug: https://www.gaia-gis.it/fossil/spatialite_gui/tktview/9f29d71aa05c689e35d7dc70a79f00bc3e054cdb
Bug-Debian: https://bugs.debian.org/876809
--- a/config.h.in
+++ b/config.h.in
@@ -100,6 +100,9 @@
/* Define to 1 if you have the <openjpeg-2.1/openjpeg.h> header file. */
#undef HAVE_OPENJPEG_2_1_OPENJPEG_H
+/* Define to 1 if you have the <openjpeg-2.2/openjpeg.h> header file. */
+#undef HAVE_OPENJPEG_2_2_OPENJPEG_H
+
/* Define to 1 if you have the <sqlite3ext.h> header file. */
#undef HAVE_SQLITE3EXT_H
@@ -181,9 +184,6 @@
/* Should be defined in order to disable WebP support. */
#undef OMIT_WEBP
-/* testing for OpenJpeg 2.1 */
-#undef OPENJPEG_2_1
-
/* Name of package */
#undef PACKAGE
--- a/configure.ac
+++ b/configure.ac
@@ -19,8 +19,6 @@ AH_TEMPLATE([ENABLE_LIBXML2],
[Should be defined in order to enable LIBXML2 support.])
AH_TEMPLATE([OMIT_WEBP],
[Should be defined in order to disable WebP support.])
-AH_TEMPLATE([OPENJPEG_2_1],
- [testing for OpenJpeg 2.1])
AH_TEMPLATE([OMIT_OPENJPEG],
[Should be defined in order to disable OpenJpeg support.])
AH_TEMPLATE([OMIT_CHARLS],
@@ -201,28 +199,18 @@ AC_ARG_ENABLE(openjpeg, [AS_HELP_STRING(
# testing OpenJpeg-2 headers
# they could be either on -/include/openjpeg-2.0
# or on -/include/openjpeg-2.1
+ # or on -/include/openjpeg-2.2
#
AC_CHECK_HEADERS(openjpeg-2.0/openjpeg.h)
AC_CHECK_HEADERS(openjpeg-2.1/openjpeg.h)
+ AC_CHECK_HEADERS(openjpeg-2.2/openjpeg.h)
if test x"$ac_cv_header_openjpeg_2_0_openjpeg_h" != x"yes" &&
- test x"$ac_cv_header_openjpeg_2_1_openjpeg_h" != x"yes";
+ test x"$ac_cv_header_openjpeg_2_1_openjpeg_h" != x"yes" &&
+ test x"$ac_cv_header_openjpeg_2_2_openjpeg_h" != x"yes";
then
AC_MSG_ERROR(['OpenJpeg-2' is required but the header (openjpeg.h) doesn't seem to be installed on this system])
fi
AC_CHECK_LIB(openjp2,opj_create_decompress,,AC_MSG_ERROR(['libopenjp2' is required but it doesn't seems to be installed on this system.]),-lm)
- # testing for OpenJpeg 2.0 or 2.1
- AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#ifdef HAVE_OPENJPEG_2_1_OPENJPEG_H
- #include <openjpeg-2.1/openjpeg.h>
- #else
- #include <openjpeg-2.0/openjpeg.h>
- #endif]],
- [[void *d; opj_stream_t *s; opj_stream_set_user_data (s, &d, NULL);]])],
- [
- AC_MSG_RESULT([yes])
- AC_DEFINE(OPENJPEG_2_1)
- ],
- [AC_MSG_RESULT([no])]
- )
else
AC_DEFINE(OMIT_OPENJPEG)
fi
|