if test "$HAVE_OPENJPEG" = "yes" ; then
AC_MSG_NOTICE([using OpenJPEG library from $with_openjpeg.])
--- gdal-1.9.2/frmts/openjpeg/openjpegdataset.cpp.orig 2012-10-09 02:58:27.000000000 +0200
-+++ gdal-1.9.2/frmts/openjpeg/openjpegdataset.cpp 2013-01-06 15:06:51.307945668 +0100
++++ gdal-1.9.2/frmts/openjpeg/openjpegdataset.cpp 2013-01-07 20:31:31.410092737 +0100
@@ -37,7 +37,7 @@
/* and when calling openjpeg API from the driver, we have to replace bool by int also */
#define bool int
#undef bool /* undef now, so that later includes are happy */
#include "gdal_pam.h"
---- gdal-1.9.2/frmts/openjpeg/openjpegdataset.cpp.orig 2013-01-06 16:55:59.004475860 +0100
-+++ gdal-1.9.2/frmts/openjpeg/openjpegdataset.cpp 2013-01-06 18:46:00.987671587 +0100
+@@ -77,7 +77,7 @@
+ /* JP2OpenJPEGDataset_Read() */
+ /************************************************************************/
+
+-static OPJ_UINT32 JP2OpenJPEGDataset_Read(void* pBuffer, OPJ_UINT32 nBytes,
++static OPJ_SIZE_T JP2OpenJPEGDataset_Read(void* pBuffer, OPJ_SIZE_T nBytes,
+ void *pUserData)
+ {
+ int nRet = VSIFReadL(pBuffer, 1, nBytes, (VSILFILE*)pUserData);
+@@ -93,7 +93,7 @@
+ /* JP2OpenJPEGDataset_Write() */
+ /************************************************************************/
+
+-static OPJ_UINT32 JP2OpenJPEGDataset_Write(void* pBuffer, OPJ_UINT32 nBytes,
++static OPJ_SIZE_T JP2OpenJPEGDataset_Write(void* pBuffer, OPJ_SIZE_T nBytes,
+ void *pUserData)
+ {
+ int nRet = VSIFWriteL(pBuffer, 1, nBytes, (VSILFILE*)pUserData);
@@ -107,7 +107,7 @@
/* JP2OpenJPEGDataset_Seek() */
/************************************************************************/