Index: configure.in =================================================================== --- configure.in (Revision 27567) +++ configure.in (Arbeitskopie) @@ -2930,6 +2930,52 @@ AC_SUBST([SPATIALITE_412_OR_LATER], $SPATIALITE_412_OR_LATER) dnl --------------------------------------------------------------------------- +dnl Check for RasterLite2. +dnl --------------------------------------------------------------------------- + +AC_ARG_WITH(rasterlite2, + [ --with-rasterlite2=ARG Include RasterLite2 support (ARG=no(default), yes or path)], + ,,) + +HAVE_RASTERLITE2=no + +if test -z "$with_rasterlite2" -o "$with_rasterlite2" = "no"; then + AC_MSG_RESULT(disabled) + elif test "$SPATIALITE_412_OR_LATER" != "yes"; then + AC_MSG_RESULT(spatialite 4.12 (preferably > 4.2.0) is needed : rasterlite2 support disabled) + elif test "$with_rasterlite2" = "yes"; then + AC_MSG_CHECKING([for rasterlite2/rasterlite.h in /usr/include or /usr/local/include]) + if test -f "/usr/include/rasterlite2/rasterlite2.h" -o -f "/usr/local/include/rasterlite2/rasterlite2.h"; then + AC_MSG_RESULT(found) + AC_CHECK_LIB(rasterlite2,rl2_init,RASTERLITE2_INIT_FOUND=yes,RASTERLITE2_INIT_FOUND=no,) + if test "$RASTERLITE2_INIT_FOUND" = "yes"; then + HAVE_RASTERLITE2=yes + RASTERLITE2_LIBS="-lrasterlite2" + LIBS="$LIBS $RASTERLITE2_LIBS" + fi + else + AC_MSG_RESULT(not found : rasterlite2 support disabled) + fi + else + if test -f "$with_rasterlite2/headers/rasterlite2/rasterlite2.h"; then + AC_MSG_RESULT(found) + AC_CHECK_LIB(rasterlite2,rl2_init,RASTERLITE2_INIT_FOUND=yes,RASTERLITE2_INIT_FOUND=no,-L$with_rasterlite2/lib -lrasterlite2) + if test "$RASTERLITE2_INIT_FOUND" = "yes"; then + RASTERLITE2_INC="-I$with_rasterlite2/include/rasterlite2" + HAVE_RASTERLITE2=yes + RASTERLITE2_LIBS="-lrasterlite2" + LIBS="$LIBS $RASTERLITE2_LIBS" + fi + else + AC_MSG_RESULT(not found : rasterlite2 support disabled) + fi + fi +fi + +AC_SUBST([HAVE_RASTERLITE2], $HAVE_RASTERLITE2) +AC_SUBST([RASTERLITE2_INC], $RASTERLITE2_INC) + +dnl --------------------------------------------------------------------------- dnl Check for SQLite (only if SpatiaLite is not detected) dnl --------------------------------------------------------------------------- @@ -4357,6 +4403,7 @@ LOC_MSG([ SQLite support: ${HAVE_SQLITE}]) LOC_MSG([ PCRE support: ${HAVE_PCRE}]) LOC_MSG([ SpatiaLite support: ${HAVE_SPATIALITE}]) +LOC_MSG([ RasterLite2 support: ${HAVE_RASTERLITE2}]) LOC_MSG([ DWGdirect support ${HAVE_DWGDIRECT}]) LOC_MSG([ INFORMIX DataBlade support:${HAVE_IDB}]) LOC_MSG([ GEOS support: ${HAVE_GEOS_RESULT}]) Index: GDALmake.opt.in =================================================================== --- GDALmake.opt.in (Revision 27567) +++ GDALmake.opt.in (Arbeitskopie) @@ -170,6 +170,12 @@ HAVE_PCRE = @HAVE_PCRE@ # +# Rasterlite2 +# +HAVE_RASTERLITE2 = @HAVE_RASTERLITE2@ +RASTERLITE2_INC = @RASTERLITE2_INC@ + +# # JPEG2000 via Kakadu Support. # KAKDIR = @KAKDIR@ @@ -490,6 +496,9 @@ ifeq ($(OGR_ENABLED),yes) ifeq ($(HAVE_SQLITE),yes) +ifeq ($(HAVE_RASTERLITE2),yes) +GDAL_FORMATS := $(GDAL_FORMATS) rasterlite2 +endif GDAL_FORMATS := $(GDAL_FORMATS) rasterlite mbtiles endif endif Index: frmts/gdalallregister.cpp =================================================================== --- frmts/gdalallregister.cpp (Revision 27567) +++ frmts/gdalallregister.cpp (Arbeitskopie) @@ -447,6 +447,9 @@ #ifdef FRMT_rasterlite GDALRegister_Rasterlite(); #endif +#ifdef FRMT_rasterlite2 + GDALRegister_Rasterlite2(); +#endif #ifdef FRMT_epsilon GDALRegister_EPSILON(); Index: gcore/gdal_frmts.h =================================================================== --- gcore/gdal_frmts.h (Revision 27567) +++ gcore/gdal_frmts.h (Arbeitskopie) @@ -149,6 +149,7 @@ void CPL_DLL GDALRegister_TIL(void); void CPL_DLL GDALRegister_R(void); void CPL_DLL GDALRegister_Rasterlite(void); +void CPL_DLL GDALRegister_Rasterlite2(void); void CPL_DLL GDALRegister_EPSILON(void); void CPL_DLL GDALRegister_PostGISRaster(void); void CPL_DLL GDALRegister_NWT_GRD(void); Index: frmts/formats_list.html =================================================================== --- frmts/formats_list.html (Revision 27567) +++ frmts/formats_list.html (Arbeitskopie) @@ -891,6 +891,14 @@