<pre style='margin:0'>
Marcus Calhoun-Lopez (MarcusCalhoun-Lopez) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/a69a32a07e5e6a6217334f3aef84714a7c1f0867">https://github.com/macports/macports-ports/commit/a69a32a07e5e6a6217334f3aef84714a7c1f0867</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit a69a32a07e5e6a6217334f3aef84714a7c1f0867
</span>Author: Marcus Calhoun-Lopez <marcuscalhounlopez@gmail.com>
AuthorDate: Sat Sep 16 15:44:02 2017 -0700
<span style='display:block; white-space:pre;color:#404040;'> gdal: find version 2.2 of OpenJPEG correctly
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> No revbump because port either builds correctly or not at all.
</span><span style='display:block; white-space:pre;color:#404040;'> Fixes https://trac.macports.org/ticket/54840
</span>---
gis/gdal/Portfile | 3 +
gis/gdal/files/patch-openjpeg.diff | 207 +++++++++++++++++++++++++++++++++++++
2 files changed, 210 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/gis/gdal/Portfile b/gis/gdal/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index ff28dcf..3e3d192 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/gis/gdal/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/gis/gdal/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -113,6 +113,9 @@ patchfiles patch-gdalwarpkernel_opencl_h.diff \
</span> # see https://github.com/mdadams/jasper/commit/d42b2388f7f8e0332c846675133acea151fc557a#diff-c9eea58015962f20fc7ba09e1388c3da
patchfiles-append patch-uchar.diff
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# see https://trac.macports.org/ticket/54840
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-openjpeg.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # for all platforms without C++11 support
# this is just a suboptimal approximation (doesn't hold for gcc)
if {${configure.cxx_stdlib} != "libc++"} {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/gis/gdal/files/patch-openjpeg.diff b/gis/gdal/files/patch-openjpeg.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..9adb8ad
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/gis/gdal/files/patch-openjpeg.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,207 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 0d623ab8bf95eff5a9d9010ebe6aeed908b7062c Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Even Rouault <even.rouault@mines-paris.org>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Tue, 15 Aug 2017 18:54:51 +0000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] Add support for building against OpenJPEG 2.2 (fixes #7002)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+git-svn-id: https://svn.osgeo.org/gdal/trunk@39821 f0d54148-0727-0410-94bb-9a71ac55c965
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gdal/configure | 76 ++++++++++++++++++++++++++++++---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gdal/configure.ac | 18 ++++++--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gdal/frmts/openjpeg/openjpegdataset.cpp | 4 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ gdal/nmake.opt | 4 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 4 files changed, 91 insertions(+), 11 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/gdal/configure b/gdal/configure
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 8455e21f92a..a34fc73bc91 100755
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- configure
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ configure
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -25115,19 +25115,19 @@ $as_echo "$as_me: OpenJPEG (JPEG2000) support disabled." >&6;}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ elif test "$with_openjpeg" = "yes" -o "$with_openjpeg" = "" ; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for ac_header in openjpeg-2.0/openjpeg.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for ac_header in openjpeg-2.2/openjpeg.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ do :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ac_fn_c_check_header_mongrel "$LINENO" "openjpeg-2.0/openjpeg.h" "ac_cv_header_openjpeg_2_0_openjpeg_h" "$ac_includes_default"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-if test "x$ac_cv_header_openjpeg_2_0_openjpeg_h" = xyes; then :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ac_fn_c_check_header_mongrel "$LINENO" "openjpeg-2.2/openjpeg.h" "ac_cv_header_openjpeg_2_2_openjpeg_h" "$ac_includes_default"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++if test "x$ac_cv_header_openjpeg_2_2_openjpeg_h" = xyes; then :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cat >>confdefs.h <<_ACEOF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#define HAVE_OPENJPEG_2_0_OPENJPEG_H 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define HAVE_OPENJPEG_2_2_OPENJPEG_H 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _ACEOF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ done
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if test "$ac_cv_header_openjpeg_2_0_openjpeg_h" = "yes"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if test "$ac_cv_header_openjpeg_2_2_openjpeg_h" = "yes"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opj_stream_set_user_data_length in -lopenjp2" >&5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $as_echo_n "checking for opj_stream_set_user_data_length in -lopenjp2... " >&6; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ${ac_cv_lib_openjp2_opj_stream_set_user_data_length+:} false; then :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -25171,6 +25171,7 @@ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if test "$HAVE_OPENJPEG" = "yes"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ OPENJPEG_VERSION=20200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LIBS="-lopenjp2 $LIBS"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -25233,6 +25234,66 @@ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ OPENJPEG_VERSION=20100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LIBS="-lopenjp2 $LIBS"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for ac_header in openjpeg-2.0/openjpeg.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++do :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ac_fn_c_check_header_mongrel "$LINENO" "openjpeg-2.0/openjpeg.h" "ac_cv_header_openjpeg_2_0_openjpeg_h" "$ac_includes_default"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++if test "x$ac_cv_header_openjpeg_2_0_openjpeg_h" = xyes; then :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ cat >>confdefs.h <<_ACEOF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define HAVE_OPENJPEG_2_0_OPENJPEG_H 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++_ACEOF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++done
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if test "$ac_cv_header_openjpeg_2_0_openjpeg_h" = "yes"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opj_stream_set_user_data_length in -lopenjp2" >&5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++$as_echo_n "checking for opj_stream_set_user_data_length in -lopenjp2... " >&6; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++if ${ac_cv_lib_openjp2_opj_stream_set_user_data_length+:} false; then :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $as_echo_n "(cached) " >&6
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ac_check_lib_save_LIBS=$LIBS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++LIBS="-lopenjp2 $LIBS"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* end confdefs.h. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* Override any GCC internal prototype to avoid an error.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Use char because int might match the return type of a GCC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ builtin and then its argument prototype would still apply. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef __cplusplus
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern "C"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++char opj_stream_set_user_data_length ();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++main ()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++return opj_stream_set_user_data_length ();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++_ACEOF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++if ac_fn_c_try_link "$LINENO"; then :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ac_cv_lib_openjp2_opj_stream_set_user_data_length=yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ac_cv_lib_openjp2_opj_stream_set_user_data_length=no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++rm -f core conftest.err conftest.$ac_objext \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ conftest$ac_exeext conftest.$ac_ext
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++LIBS=$ac_check_lib_save_LIBS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_openjp2_opj_stream_set_user_data_length" >&5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++$as_echo "$ac_cv_lib_openjp2_opj_stream_set_user_data_length" >&6; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++if test "x$ac_cv_lib_openjp2_opj_stream_set_user_data_length" = xyes; then :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ HAVE_OPENJPEG=yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ HAVE_OPENJPEG=no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if test "$HAVE_OPENJPEG" = "yes"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ LIBS="-lopenjp2 $LIBS"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -25243,8 +25304,11 @@ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ elif test -r $with_openjpeg/include/openjpeg-2.1/openjpeg.h ; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ OPENJPEG_VERSION=20100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ EXTRA_INCLUDES="-I$with_openjpeg/include $EXTRA_INCLUDES"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ elif test -r $with_openjpeg/include/openjpeg-2.2/openjpeg.h ; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ OPENJPEG_VERSION=20200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ EXTRA_INCLUDES="-I$with_openjpeg/include $EXTRA_INCLUDES"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- as_fn_error $? "openjpeg.h not found in $with_openjpeg/include/openjpeg-2.0 or $with_openjpeg/include/openjpeg-2.1" "$LINENO" 5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ as_fn_error $? "openjpeg.h not found in $with_openjpeg/include/openjpeg-2.0 or $with_openjpeg/include/openjpeg-2.1 or $with_openjpeg/include/openjpeg-2.2" "$LINENO" 5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opj_stream_set_user_data_length in -lopenjp2" >&5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/gdal/configure.ac b/gdal/configure.ac
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index caf72c02b33..d771808d1a8 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- configure.ac
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ configure.ac
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2539,10 +2539,11 @@ if test "$with_openjpeg" = "no" ; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ elif test "$with_openjpeg" = "yes" -o "$with_openjpeg" = "" ; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- AC_CHECK_HEADERS([openjpeg-2.0/openjpeg.h])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if test "$ac_cv_header_openjpeg_2_0_openjpeg_h" = "yes"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ AC_CHECK_HEADERS([openjpeg-2.2/openjpeg.h])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if test "$ac_cv_header_openjpeg_2_2_openjpeg_h" = "yes"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ AC_CHECK_LIB(openjp2,opj_stream_set_user_data_length,HAVE_OPENJPEG=yes,HAVE_OPENJPEG=no,)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if test "$HAVE_OPENJPEG" = "yes"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ OPENJPEG_VERSION=20200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LIBS="-lopenjp2 $LIBS"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2553,6 +2554,14 @@ elif test "$with_openjpeg" = "yes" -o "$with_openjpeg" = "" ; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ OPENJPEG_VERSION=20100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LIBS="-lopenjp2 $LIBS"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ AC_CHECK_HEADERS([openjpeg-2.0/openjpeg.h])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if test "$ac_cv_header_openjpeg_2_0_openjpeg_h" = "yes"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ AC_CHECK_LIB(openjp2,opj_stream_set_user_data_length,HAVE_OPENJPEG=yes,HAVE_OPENJPEG=no,)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if test "$HAVE_OPENJPEG" = "yes"; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ LIBS="-lopenjp2 $LIBS"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2563,8 +2572,11 @@ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ elif test -r $with_openjpeg/include/openjpeg-2.1/openjpeg.h ; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ OPENJPEG_VERSION=20100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ EXTRA_INCLUDES="-I$with_openjpeg/include $EXTRA_INCLUDES"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ elif test -r $with_openjpeg/include/openjpeg-2.2/openjpeg.h ; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ OPENJPEG_VERSION=20200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ EXTRA_INCLUDES="-I$with_openjpeg/include $EXTRA_INCLUDES"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- AC_MSG_ERROR([openjpeg.h not found in $with_openjpeg/include/openjpeg-2.0 or $with_openjpeg/include/openjpeg-2.1])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ AC_MSG_ERROR([openjpeg.h not found in $with_openjpeg/include/openjpeg-2.0 or $with_openjpeg/include/openjpeg-2.1 or $with_openjpeg/include/openjpeg-2.2])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ AC_CHECK_LIB(openjp2,opj_stream_set_user_data_length,HAVE_OPENJPEG=yes,HAVE_OPENJPEG=no,-L$with_openjpeg/lib)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/gdal/frmts/openjpeg/openjpegdataset.cpp b/gdal/frmts/openjpeg/openjpegdataset.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 2e07f7899c8..81b8e4fc2db 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- frmts/openjpeg/openjpegdataset.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ frmts/openjpeg/openjpegdataset.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -34,7 +34,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #pragma clang diagnostic ignored "-Wdocumentation"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if defined(OPENJPEG_VERSION) && OPENJPEG_VERSION >= 20100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(OPENJPEG_VERSION) && OPENJPEG_VERSION >= 20200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <openjpeg-2.2/openjpeg.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif defined(OPENJPEG_VERSION) && OPENJPEG_VERSION >= 20100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <openjpeg-2.1/openjpeg.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <stdio.h> /* openjpeg.h needs FILE* */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/gdal/nmake.opt b/gdal/nmake.opt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index d5ec99f13f3..8bfd930530b 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- nmake.opt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ nmake.opt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -607,8 +607,10 @@ OCI_INCLUDE = -I$(ORACLE_HOME)\oci\include
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #OPENJPEG_ENABLED = YES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #OPENJPEG_CFLAGS = -IC:\openjpeg\include
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #OPENJPEG_LIB = C:\openjpeg\lib\openjp2.lib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# For OpenJpeg >= 2.1, uncomment
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# For OpenJpeg 2.1.x, uncomment
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #OPENJPEG_VERSION = 20100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# For OpenJpeg 2.2.x, uncomment
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#OPENJPEG_VERSION = 20200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if using an external zlib uncomment the following lines
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ZLIB_EXTERNAL_LIB = 1
</span></pre><pre style='margin:0'>
</pre>