From 9bc747f97dfb9745f11c8000ffb27290294c8c77 Mon Sep 17 00:00:00 2001 From: ericLemanissier Date: Fri, 10 May 2024 08:43:11 +0200 Subject: [PATCH] fix line endings --- .../patches/3.4.x/fix-autotools-3.4.1.patch | 666 +++++++++--------- .../3.4.x/fix-include-jsonc-3.4.1.patch | 208 +++--- 2 files changed, 437 insertions(+), 437 deletions(-) diff --git a/recipes/gdal/pre_3.5.0/patches/3.4.x/fix-autotools-3.4.1.patch b/recipes/gdal/pre_3.5.0/patches/3.4.x/fix-autotools-3.4.1.patch index 883f138bbc2207..a8835817a62cf2 100644 --- a/recipes/gdal/pre_3.5.0/patches/3.4.x/fix-autotools-3.4.1.patch +++ b/recipes/gdal/pre_3.5.0/patches/3.4.x/fix-autotools-3.4.1.patch @@ -1,333 +1,333 @@ ---- a/GDALmake.opt.in -+++ b/GDALmake.opt.in -@@ -619,7 +619,7 @@ endif - - ifeq ($(HAVE_LIBTOOL), yes) - --CONFIG_LIBS = $(GDAL_ROOT)/$(LIBGDAL) -+CONFIG_LIBS = $(GDAL_ROOT)/$(LIBGDAL) $(LIBS) - ifeq ($(MACOSX_FRAMEWORK),yes) - CONFIG_LIBS_INS = -L$(INST_LIB)/unix/lib -lgdal - else ---- a/configure.ac -+++ b/configure.ac -@@ -1168,6 +1168,10 @@ AC_ARG_WITH(libdeflate, - [enable libdeflate usage (optional for faster Deflate support (still requires zlib) (ARG=yes/no/prefix), enabled by default)]),,) - - if test "$with_libdeflate" != "no" ; then -+# AC_CHECK_LIB tests not robust enough (don't handle static libdeflate on windows) -+if test "$with_libdeflate" = "yes" ; then -+ LIBDEFLATE_SETTING=yes -+else - - if test "$with_libdeflate" != "" -a "$with_libdeflate" != "yes"; then - AC_CHECK_LIB(deflate, libdeflate_zlib_decompress, [libdeflate_lib=yes], [libdeflate_lib=no],-L$with_libdeflate/lib) -@@ -1197,13 +1201,13 @@ if test "$with_libdeflate" != "no" ; then - fi - - fi -+fi - - if test "$LIBDEFLATE_SETTING" = "yes" ; then - if test "$with_libdeflate" != "" -a "$with_libdeflate" != "yes"; then - EXTRA_INCLUDES="-I$with_libdeflate/include $EXTRA_INCLUDES" - LIBS="-L$with_libdeflate/lib -ldeflate $LIBS" -- else -- LIBS="-ldeflate $LIBS" -+ # Too fragile: libdeflate static lib name on windows is libdeflatestatic - fi - fi - -@@ -1371,7 +1375,7 @@ else - AC_MSG_RESULT([using libtiff from ${with_libtiff}.]) - - dnl Check for the BigTIFF enabled library (libtiff >= 4.0) -- AC_CHECK_LIB(tiff,TIFFScanlineSize64,HAVE_BIGTIFF=yes,HAVE_BIGTIFF=no,) -+ AC_CHECK_LIB(tiff,TIFFScanlineSize64,HAVE_BIGTIFF=yes,HAVE_BIGTIFF=no,$LIBS) - - fi - -@@ -1395,23 +1399,11 @@ AC_ARG_WITH(curl, - dnl Clear some cache variables - unset ac_cv_path_LIBCURL - --if test "`basename xx/$with_curl`" = "curl-config" ; then -- LIBCURL_CONFIG="$with_curl" --elif test "$with_curl" = "no" ; then -- LIBCURL_CONFIG=no -+PKG_PROG_PKG_CONFIG([0.21]) -+if test "$with_curl" = "yes" ; then -+ PKG_CHECK_MODULES([CURL], [libcurl], [CURL_SETTING=yes], [AC_MSG_ERROR([libcurl not found...])]) - else -- AC_PATH_PROG(LIBCURL_CONFIG, curl-config, no) --fi -- --if test "$LIBCURL_CONFIG" != "no" ; then -- -- CURL_VERNUM=`$LIBCURL_CONFIG --vernum` -- CURL_VER=`$LIBCURL_CONFIG --version | awk '{print $2}'` -- -- AC_MSG_RESULT([ found libcurl version $CURL_VER]) -- -- AC_CHECK_LIB(curl,curl_global_init,CURL_SETTING=yes,CURL_SETTING=no,`$LIBCURL_CONFIG --libs`) -- -+ CURL_SETTING=no - fi - - AC_SUBST(CURL_SETTING,$CURL_SETTING) -@@ -1423,8 +1415,11 @@ dnl Check for SQLite - dnl Proj depends on it so it must appear before. - dnl --------------------------------------------------------------------------- - --SQLITE3_REQ_VERSION="3.0.0" --AX_LIB_SQLITE3($SQLITE3_REQ_VERSION) -+HAVE_SQLITE3=no -+AC_ARG_WITH(sqlite3, AS_HELP_STRING([--with-sqlite3[=ARG]], [use SQLite 3 library (ARG=yes or no)]),,) -+if test x"$with_sqlite3" = x"yes" ; then -+ PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= 3.0.0], [HAVE_SQLITE3=yes], [AC_MSG_ERROR([sqlite3 not found...])]) -+fi - - if test "$HAVE_SQLITE3" = "yes"; then - LIBS="$SQLITE3_LDFLAGS $LIBS" -@@ -1455,11 +1450,7 @@ if test "x$with_proj" = "xno" ; then - else - - if test "x$with_proj" = "xyes" -o "x$with_proj" = "x"; then -- ORIG_LIBS="$LIBS" -- LIBS="-lproj $with_proj_extra_lib_for_test $ORIG_LIBS" -- AC_LANG_PUSH([C++]) -- AC_CHECK_LIB(proj,proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,) -- AC_LANG_POP([C++]) -+ PROJ_FOUND=yes - if test "$PROJ_FOUND" = "no"; then - AC_LANG_PUSH([C++]) - AC_CHECK_LIB(proj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,) -@@ -1690,6 +1681,8 @@ dnl --------------------------------------------------------------------------- - AC_ARG_WITH(blosc,[ --with-blosc[=ARG] Include blosc support (ARG=yes/no/installation_prefix)],,) - - if test "$with_blosc" = "" -o "$with_blosc" = "yes" ; then -+ HAVE_BLOSC=yes -+ if false; then - AC_CHECK_LIB(blosc,blosc_cbuffer_validate,HAVE_BLOSC=yes,HAVE_BLOSC=no,) - - if test "$HAVE_BLOSC" = "yes" ; then -@@ -1701,6 +1694,7 @@ if test "$with_blosc" = "" -o "$with_blosc" = "yes" ; then - echo "libblosc not found - BLOSC support disabled" - fi - fi -+ fi - elif test "$with_blosc" != "" -a "$with_blosc" != "no"; then - - AC_CHECK_LIB(blosc,blosc_cbuffer_validate,HAVE_BLOSC=yes,HAVE_BLOSC=no,-L$with_blosc/lib) -@@ -1953,8 +1947,8 @@ fi - - if test "$CURL_SETTING" = "yes" ; then - -- CURL_INC=`$LIBCURL_CONFIG --cflags` -- CURL_LIB=`$LIBCURL_CONFIG --libs` -+ CURL_INC="$CURL_CFLAGS" -+ CURL_LIB="$CURL_LIBS" - m4_foreach_w([frmt],CURL_FORMATS,[ - driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED]) - if test "x$driver_enabled" = "xyes"; then -@@ -2286,7 +2280,6 @@ else - - DDS_SETTING=yes - CRUNCHDIR="$with_dds" -- LIBS="-L$with_dds/lib/ -lcrunch $LIBS" - echo "using libcrunch from $with_dds." - - fi -@@ -2437,7 +2430,6 @@ else - - dnl We now require libgeotiff 1.5.0 - dnl first check if $with_geotiff/lib has the library: -- AC_CHECK_LIB(geotiff,GTIFAttachPROJContext,GEOTIFF_SETTING=external,GEOTIFF_SETTING=not_found,-L$with_geotiff/lib) - - if test $GEOTIFF_SETTING = "external" ; then - LIBS="-L$with_geotiff/lib -lgeotiff $LIBS" -@@ -2924,6 +2916,10 @@ if test x"$with_hdf4" = x"no" ; then - - echo "hdf4 support disabled." - -+elif test x"$with_hdf4" = x"yes" ; then -+ PKG_CHECK_MODULES([HDF4], [hdf], [HAVE_HDF4=yes], [AC_MSG_ERROR([hdf4 not found...])]) -+ PKG_CHECK_MODULES([HDF4], [hdf >= 4.2.5], [HDF4_HAS_MAXOPENFILES=yes], [HDF4_HAS_MAXOPENFILES=no]) -+ HDF4_INCLUDE="$HDF4_CFLAGS" - else - - if test x"$with_hdf4" = x"yes" -o x"$with_hdf4" = x"" ; then -@@ -3054,7 +3050,6 @@ elif test "$with_hdf5" = "yes" -o "$with_hdf5" = "" ; then - # Test that the package found is for the right architecture - saved_LIBS="$LIBS" - LIBS="$HDF5_LIBS" -- AC_CHECK_LIB(hdf5,H5Fopen, [HAVE_HDF5=yes], [HAVE_HDF5=no]) - LIBS="$saved_LIBS" - - if test "$HAVE_HDF5" = "yes"; then -@@ -3123,21 +3118,21 @@ KEA_CONFIG=no - - AC_ARG_WITH(kea,[ --with-kea[=ARG] Include kealib (ARG=path to kea-config) [[default=yes]]],,) - -+AC_MSG_CHECKING([for kea]) - if test "$with_kea" = "yes" -o "x$with_kea" = "x" ; then -- AC_PATH_PROG(KEA_CONFIG, kea-config, no) -+ HAVE_KEA=yes -+ AC_MSG_RESULT([yes]) - else -- KEA_CONFIG=$with_kea -+ HAVE_KEA=no -+ AC_MSG_RESULT([no]) - fi - --AC_MSG_CHECKING([for kea]) - - if test "$KEA_CONFIG" = "no" ; then - -- HAVE_KEA=no - KEA_LIB= - KEA_INC= - -- AC_MSG_RESULT([no]) - - else - if test -d $KEA_CONFIG ; then -@@ -4001,18 +3996,15 @@ MYSQL_CONFIG=no - AC_ARG_WITH(mysql,[ --with-mysql[=ARG] Include MySQL (ARG=path to mysql_config) [[default=no]]],,) - - if test "$with_mysql" = "yes" ; then -- AC_PATH_PROG(MYSQL_CONFIG, mysql_config, no) -+ HAVE_MYSQL=yes - else -- if test "x$with_mysql" != "x" ; then -- MYSQL_CONFIG=$with_mysql -- fi -+ HAVE_MYSQL=no - fi - - AC_MSG_CHECKING([for MySQL]) - - if test "$MYSQL_CONFIG" = "no" ; then - -- HAVE_MYSQL=no - MYSQL_LIB= - MYSQL_INC= - -@@ -4106,8 +4098,11 @@ dnl Check for Expat configuration. - dnl --------------------------------------------------------------------------- - - dnl Expat 1.95.0 released in 2000-09-28 --EXPAT_REQ_VERSION="1.95.0" --AX_LIB_EXPAT($EXPAT_REQ_VERSION) -+# AX_LIB_EXPAT is too fragile, it doesn't properly handle debug expat on Windows -+HAVE_EXPAT=no -+AC_ARG_WITH([expat], AS_HELP_STRING([--with-expat[=ARG]], [use Expat library (ARG=yes or no)]),,) -+if test x"$with_expat" = x"yes" ; then -+PKG_CHECK_MODULES([EXPAT], [expat >= 1.95.0], [HAVE_EXPAT=yes], [AC_MSG_ERROR([expat not found...])]) - - if test "$HAVE_EXPAT" = "yes"; then - LIBS="$EXPAT_LDFLAGS $LIBS" -@@ -4120,6 +4115,7 @@ m4_foreach_w([frmt],EXPAT_DRIVERS,[ - fi - ]) - -+fi - fi - - AC_SUBST([HAVE_EXPAT], $HAVE_EXPAT) -@@ -4366,7 +4362,6 @@ if test "x$with_xml2" = "xyes" -o "x$with_xml2" = "x" ; then - if test "${HAVE_LIBXML2}" = "yes"; then - SAVED_LIBS="${LIBS}" - LIBS="${LIBXML2_LIBS}" -- AC_CHECK_LIB(xml2,xmlParseDoc,HAVE_LIBXML2=yes,HAVE_LIBXML2=no) - LIBS="${SAVED_LIBS}" - fi - -@@ -4453,10 +4448,9 @@ else - AC_MSG_ERROR([cannot find pcre2.h]) - fi - else -- AC_CHECK_LIB(pcre2-8,pcre2_compile_8,HAVE_PCRE2=yes,HAVE_PCRE2=no,) -+ HAVE_PCRE2=yes - if test "$HAVE_PCRE2" = "yes" ; then - HAVE_PCRE2=yes -- LIBS="$LIBS -lpcre2-8" - else - if test "$with_pcre2" = "yes"; then - AC_MSG_ERROR([cannot find libpcre2]) -@@ -4487,10 +4481,9 @@ elif test "$HAVE_PCRE2" = "no"; then - AC_MSG_ERROR([cannot find pcre.h]) - fi - else -- AC_CHECK_LIB(pcre,pcre_compile,HAVE_PCRE=yes,HAVE_PCRE=no,) -+ HAVE_PCRE=yes - if test "$HAVE_PCRE" = "yes" ; then - HAVE_PCRE=yes -- LIBS="$LIBS -lpcre" - else - if test "$with_pcre" = "yes"; then - AC_MSG_ERROR([cannot find libpcre]) -@@ -4648,13 +4641,18 @@ dnl --------------------------------------------------------------------------- - dnl Check if geos library is available. - dnl --------------------------------------------------------------------------- - --GEOS_INIT(3.1.0) -+AC_ARG_WITH(geos, AS_HELP_STRING([--with-geos[=ARG]], [Include GEOS support (ARG=yes or no)]),,) -+HAVE_GEOS=no -+if test x"$with_geos" = x"no" ; then -+ AC_MSG_RESULT([GEOS support disabled]) -+else -+ PKG_CHECK_MODULES([GEOS], [geos >= 3.1.0], [HAVE_GEOS=yes], [AC_MSG_ERROR([geos not found...])]) - if test "${HAVE_GEOS}" = "yes" ; then - AC_MSG_NOTICE([Using C API from GEOS $GEOS_VERSION]) -- STRIP_SYSTEM_LIBRARY_PATHS("${GEOS_LIBS}") -- GEOS_LIBS="$STRIPPED_LIBRARY_NAME" - LIBS="${GEOS_LIBS} ${LIBS}" - fi -+fi -+AC_SUBST(HAVE_GEOS, $HAVE_GEOS) - - dnl --------------------------------------------------------------------------- - dnl Check if SFCGAL library is available. -@@ -4684,11 +4682,10 @@ elif test "$with_qhull" = "yes" -o "$with_qhull" = "" ; then - - AC_CHECK_HEADERS([libqhull_r/libqhull_r.h]) - if test "$ac_cv_header_libqhull_r_libqhull_r_h" = "yes"; then -- AC_CHECK_LIB(qhull_r,qh_new_qhull,QHULL_SETTING=yes,QHULL_SETTING=no,) -+ QHULL_SETTING=yes - if test "$QHULL_SETTING" = "yes"; then - QHULL_SETTING=external - QHULL_IS_LIBQHULL_R=1 -- LIBS="-lqhull_r $LIBS" - fi - else - # Only qhull 2012 is reliable on certain datasets. Older Ubuntu have -@@ -4798,7 +4795,9 @@ AC_MSG_CHECKING([for FreeXL support]) - HAVE_FREEXL=no - FREEXL_INCLUDE= - --if test "$with_freexl" = "" -o "$with_freexl" = "yes" ; then -+if test "$with_freexl" = "yes"; then -+ PKG_CHECK_MODULES([FREEXL], [freexl >= 1.0.0], [HAVE_FREEXL=yes], [AC_MSG_ERROR([freexl not found...])]) -+elif test "$with_freexl" = ""; then - AC_CHECK_HEADERS(freexl.h) - AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-lfreexl",FREEXL_LIBS=missing) - -@@ -4904,8 +4903,7 @@ if test "$with_libjson_c" = "external" -o "$with_libjson_c" = "" -o "$with_libjs - elif test "$with_libjson_c" = "internal" ; then - LIBJSONC_SETTING=internal - elif test "$with_libjson_c" != "no"; then -- LIBS="-L$with_libjson_c/lib $LIBS" -- AC_CHECK_LIB(json-c,json_object_set_serializer,LIBJSONC_SETTING=external,LIBJSONC_SETTING=internal,-L$with_libjson_c/lib) -+ LIBJSONC_SETTING=external - else - AC_MSG_ERROR([libjson-c (internal or external) is required]) - fi -@@ -6079,7 +6077,6 @@ else - # Test that the package found is for the right architecture - saved_LIBS="$LIBS" - LIBS="$EXR_LIBS" -- AC_CHECK_LIB(IlmImf,ImfTiledInputReadTile, [HAVE_EXR=yes], [HAVE_EXR=no]) - if test "$HAVE_EXR" = "no"; then - dnl Try with OpenEXR >= 3 name - AC_CHECK_LIB(OpenEXR,ImfTiledInputReadTile, [HAVE_EXR=yes], [HAVE_EXR=no]) +--- a/GDALmake.opt.in ++++ b/GDALmake.opt.in +@@ -619,7 +619,7 @@ endif + + ifeq ($(HAVE_LIBTOOL), yes) + +-CONFIG_LIBS = $(GDAL_ROOT)/$(LIBGDAL) ++CONFIG_LIBS = $(GDAL_ROOT)/$(LIBGDAL) $(LIBS) + ifeq ($(MACOSX_FRAMEWORK),yes) + CONFIG_LIBS_INS = -L$(INST_LIB)/unix/lib -lgdal + else +--- a/configure.ac ++++ b/configure.ac +@@ -1168,6 +1168,10 @@ AC_ARG_WITH(libdeflate, + [enable libdeflate usage (optional for faster Deflate support (still requires zlib) (ARG=yes/no/prefix), enabled by default)]),,) + + if test "$with_libdeflate" != "no" ; then ++# AC_CHECK_LIB tests not robust enough (don't handle static libdeflate on windows) ++if test "$with_libdeflate" = "yes" ; then ++ LIBDEFLATE_SETTING=yes ++else + + if test "$with_libdeflate" != "" -a "$with_libdeflate" != "yes"; then + AC_CHECK_LIB(deflate, libdeflate_zlib_decompress, [libdeflate_lib=yes], [libdeflate_lib=no],-L$with_libdeflate/lib) +@@ -1197,13 +1201,13 @@ if test "$with_libdeflate" != "no" ; then + fi + + fi ++fi + + if test "$LIBDEFLATE_SETTING" = "yes" ; then + if test "$with_libdeflate" != "" -a "$with_libdeflate" != "yes"; then + EXTRA_INCLUDES="-I$with_libdeflate/include $EXTRA_INCLUDES" + LIBS="-L$with_libdeflate/lib -ldeflate $LIBS" +- else +- LIBS="-ldeflate $LIBS" ++ # Too fragile: libdeflate static lib name on windows is libdeflatestatic + fi + fi + +@@ -1371,7 +1375,7 @@ else + AC_MSG_RESULT([using libtiff from ${with_libtiff}.]) + + dnl Check for the BigTIFF enabled library (libtiff >= 4.0) +- AC_CHECK_LIB(tiff,TIFFScanlineSize64,HAVE_BIGTIFF=yes,HAVE_BIGTIFF=no,) ++ AC_CHECK_LIB(tiff,TIFFScanlineSize64,HAVE_BIGTIFF=yes,HAVE_BIGTIFF=no,$LIBS) + + fi + +@@ -1395,23 +1399,11 @@ AC_ARG_WITH(curl, + dnl Clear some cache variables + unset ac_cv_path_LIBCURL + +-if test "`basename xx/$with_curl`" = "curl-config" ; then +- LIBCURL_CONFIG="$with_curl" +-elif test "$with_curl" = "no" ; then +- LIBCURL_CONFIG=no ++PKG_PROG_PKG_CONFIG([0.21]) ++if test "$with_curl" = "yes" ; then ++ PKG_CHECK_MODULES([CURL], [libcurl], [CURL_SETTING=yes], [AC_MSG_ERROR([libcurl not found...])]) + else +- AC_PATH_PROG(LIBCURL_CONFIG, curl-config, no) +-fi +- +-if test "$LIBCURL_CONFIG" != "no" ; then +- +- CURL_VERNUM=`$LIBCURL_CONFIG --vernum` +- CURL_VER=`$LIBCURL_CONFIG --version | awk '{print $2}'` +- +- AC_MSG_RESULT([ found libcurl version $CURL_VER]) +- +- AC_CHECK_LIB(curl,curl_global_init,CURL_SETTING=yes,CURL_SETTING=no,`$LIBCURL_CONFIG --libs`) +- ++ CURL_SETTING=no + fi + + AC_SUBST(CURL_SETTING,$CURL_SETTING) +@@ -1423,8 +1415,11 @@ dnl Check for SQLite + dnl Proj depends on it so it must appear before. + dnl --------------------------------------------------------------------------- + +-SQLITE3_REQ_VERSION="3.0.0" +-AX_LIB_SQLITE3($SQLITE3_REQ_VERSION) ++HAVE_SQLITE3=no ++AC_ARG_WITH(sqlite3, AS_HELP_STRING([--with-sqlite3[=ARG]], [use SQLite 3 library (ARG=yes or no)]),,) ++if test x"$with_sqlite3" = x"yes" ; then ++ PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= 3.0.0], [HAVE_SQLITE3=yes], [AC_MSG_ERROR([sqlite3 not found...])]) ++fi + + if test "$HAVE_SQLITE3" = "yes"; then + LIBS="$SQLITE3_LDFLAGS $LIBS" +@@ -1455,11 +1450,7 @@ if test "x$with_proj" = "xno" ; then + else + + if test "x$with_proj" = "xyes" -o "x$with_proj" = "x"; then +- ORIG_LIBS="$LIBS" +- LIBS="-lproj $with_proj_extra_lib_for_test $ORIG_LIBS" +- AC_LANG_PUSH([C++]) +- AC_CHECK_LIB(proj,proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,) +- AC_LANG_POP([C++]) ++ PROJ_FOUND=yes + if test "$PROJ_FOUND" = "no"; then + AC_LANG_PUSH([C++]) + AC_CHECK_LIB(proj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,) +@@ -1690,6 +1681,8 @@ dnl --------------------------------------------------------------------------- + AC_ARG_WITH(blosc,[ --with-blosc[=ARG] Include blosc support (ARG=yes/no/installation_prefix)],,) + + if test "$with_blosc" = "" -o "$with_blosc" = "yes" ; then ++ HAVE_BLOSC=yes ++ if false; then + AC_CHECK_LIB(blosc,blosc_cbuffer_validate,HAVE_BLOSC=yes,HAVE_BLOSC=no,) + + if test "$HAVE_BLOSC" = "yes" ; then +@@ -1701,6 +1694,7 @@ if test "$with_blosc" = "" -o "$with_blosc" = "yes" ; then + echo "libblosc not found - BLOSC support disabled" + fi + fi ++ fi + elif test "$with_blosc" != "" -a "$with_blosc" != "no"; then + + AC_CHECK_LIB(blosc,blosc_cbuffer_validate,HAVE_BLOSC=yes,HAVE_BLOSC=no,-L$with_blosc/lib) +@@ -1953,8 +1947,8 @@ fi + + if test "$CURL_SETTING" = "yes" ; then + +- CURL_INC=`$LIBCURL_CONFIG --cflags` +- CURL_LIB=`$LIBCURL_CONFIG --libs` ++ CURL_INC="$CURL_CFLAGS" ++ CURL_LIB="$CURL_LIBS" + m4_foreach_w([frmt],CURL_FORMATS,[ + driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED]) + if test "x$driver_enabled" = "xyes"; then +@@ -2286,7 +2280,6 @@ else + + DDS_SETTING=yes + CRUNCHDIR="$with_dds" +- LIBS="-L$with_dds/lib/ -lcrunch $LIBS" + echo "using libcrunch from $with_dds." + + fi +@@ -2437,7 +2430,6 @@ else + + dnl We now require libgeotiff 1.5.0 + dnl first check if $with_geotiff/lib has the library: +- AC_CHECK_LIB(geotiff,GTIFAttachPROJContext,GEOTIFF_SETTING=external,GEOTIFF_SETTING=not_found,-L$with_geotiff/lib) + + if test $GEOTIFF_SETTING = "external" ; then + LIBS="-L$with_geotiff/lib -lgeotiff $LIBS" +@@ -2924,6 +2916,10 @@ if test x"$with_hdf4" = x"no" ; then + + echo "hdf4 support disabled." + ++elif test x"$with_hdf4" = x"yes" ; then ++ PKG_CHECK_MODULES([HDF4], [hdf], [HAVE_HDF4=yes], [AC_MSG_ERROR([hdf4 not found...])]) ++ PKG_CHECK_MODULES([HDF4], [hdf >= 4.2.5], [HDF4_HAS_MAXOPENFILES=yes], [HDF4_HAS_MAXOPENFILES=no]) ++ HDF4_INCLUDE="$HDF4_CFLAGS" + else + + if test x"$with_hdf4" = x"yes" -o x"$with_hdf4" = x"" ; then +@@ -3054,7 +3050,6 @@ elif test "$with_hdf5" = "yes" -o "$with_hdf5" = "" ; then + # Test that the package found is for the right architecture + saved_LIBS="$LIBS" + LIBS="$HDF5_LIBS" +- AC_CHECK_LIB(hdf5,H5Fopen, [HAVE_HDF5=yes], [HAVE_HDF5=no]) + LIBS="$saved_LIBS" + + if test "$HAVE_HDF5" = "yes"; then +@@ -3123,21 +3118,21 @@ KEA_CONFIG=no + + AC_ARG_WITH(kea,[ --with-kea[=ARG] Include kealib (ARG=path to kea-config) [[default=yes]]],,) + ++AC_MSG_CHECKING([for kea]) + if test "$with_kea" = "yes" -o "x$with_kea" = "x" ; then +- AC_PATH_PROG(KEA_CONFIG, kea-config, no) ++ HAVE_KEA=yes ++ AC_MSG_RESULT([yes]) + else +- KEA_CONFIG=$with_kea ++ HAVE_KEA=no ++ AC_MSG_RESULT([no]) + fi + +-AC_MSG_CHECKING([for kea]) + + if test "$KEA_CONFIG" = "no" ; then + +- HAVE_KEA=no + KEA_LIB= + KEA_INC= + +- AC_MSG_RESULT([no]) + + else + if test -d $KEA_CONFIG ; then +@@ -4001,18 +3996,15 @@ MYSQL_CONFIG=no + AC_ARG_WITH(mysql,[ --with-mysql[=ARG] Include MySQL (ARG=path to mysql_config) [[default=no]]],,) + + if test "$with_mysql" = "yes" ; then +- AC_PATH_PROG(MYSQL_CONFIG, mysql_config, no) ++ HAVE_MYSQL=yes + else +- if test "x$with_mysql" != "x" ; then +- MYSQL_CONFIG=$with_mysql +- fi ++ HAVE_MYSQL=no + fi + + AC_MSG_CHECKING([for MySQL]) + + if test "$MYSQL_CONFIG" = "no" ; then + +- HAVE_MYSQL=no + MYSQL_LIB= + MYSQL_INC= + +@@ -4106,8 +4098,11 @@ dnl Check for Expat configuration. + dnl --------------------------------------------------------------------------- + + dnl Expat 1.95.0 released in 2000-09-28 +-EXPAT_REQ_VERSION="1.95.0" +-AX_LIB_EXPAT($EXPAT_REQ_VERSION) ++# AX_LIB_EXPAT is too fragile, it doesn't properly handle debug expat on Windows ++HAVE_EXPAT=no ++AC_ARG_WITH([expat], AS_HELP_STRING([--with-expat[=ARG]], [use Expat library (ARG=yes or no)]),,) ++if test x"$with_expat" = x"yes" ; then ++PKG_CHECK_MODULES([EXPAT], [expat >= 1.95.0], [HAVE_EXPAT=yes], [AC_MSG_ERROR([expat not found...])]) + + if test "$HAVE_EXPAT" = "yes"; then + LIBS="$EXPAT_LDFLAGS $LIBS" +@@ -4120,6 +4115,7 @@ m4_foreach_w([frmt],EXPAT_DRIVERS,[ + fi + ]) + ++fi + fi + + AC_SUBST([HAVE_EXPAT], $HAVE_EXPAT) +@@ -4366,7 +4362,6 @@ if test "x$with_xml2" = "xyes" -o "x$with_xml2" = "x" ; then + if test "${HAVE_LIBXML2}" = "yes"; then + SAVED_LIBS="${LIBS}" + LIBS="${LIBXML2_LIBS}" +- AC_CHECK_LIB(xml2,xmlParseDoc,HAVE_LIBXML2=yes,HAVE_LIBXML2=no) + LIBS="${SAVED_LIBS}" + fi + +@@ -4453,10 +4448,9 @@ else + AC_MSG_ERROR([cannot find pcre2.h]) + fi + else +- AC_CHECK_LIB(pcre2-8,pcre2_compile_8,HAVE_PCRE2=yes,HAVE_PCRE2=no,) ++ HAVE_PCRE2=yes + if test "$HAVE_PCRE2" = "yes" ; then + HAVE_PCRE2=yes +- LIBS="$LIBS -lpcre2-8" + else + if test "$with_pcre2" = "yes"; then + AC_MSG_ERROR([cannot find libpcre2]) +@@ -4487,10 +4481,9 @@ elif test "$HAVE_PCRE2" = "no"; then + AC_MSG_ERROR([cannot find pcre.h]) + fi + else +- AC_CHECK_LIB(pcre,pcre_compile,HAVE_PCRE=yes,HAVE_PCRE=no,) ++ HAVE_PCRE=yes + if test "$HAVE_PCRE" = "yes" ; then + HAVE_PCRE=yes +- LIBS="$LIBS -lpcre" + else + if test "$with_pcre" = "yes"; then + AC_MSG_ERROR([cannot find libpcre]) +@@ -4648,13 +4641,18 @@ dnl --------------------------------------------------------------------------- + dnl Check if geos library is available. + dnl --------------------------------------------------------------------------- + +-GEOS_INIT(3.1.0) ++AC_ARG_WITH(geos, AS_HELP_STRING([--with-geos[=ARG]], [Include GEOS support (ARG=yes or no)]),,) ++HAVE_GEOS=no ++if test x"$with_geos" = x"no" ; then ++ AC_MSG_RESULT([GEOS support disabled]) ++else ++ PKG_CHECK_MODULES([GEOS], [geos >= 3.1.0], [HAVE_GEOS=yes], [AC_MSG_ERROR([geos not found...])]) + if test "${HAVE_GEOS}" = "yes" ; then + AC_MSG_NOTICE([Using C API from GEOS $GEOS_VERSION]) +- STRIP_SYSTEM_LIBRARY_PATHS("${GEOS_LIBS}") +- GEOS_LIBS="$STRIPPED_LIBRARY_NAME" + LIBS="${GEOS_LIBS} ${LIBS}" + fi ++fi ++AC_SUBST(HAVE_GEOS, $HAVE_GEOS) + + dnl --------------------------------------------------------------------------- + dnl Check if SFCGAL library is available. +@@ -4684,11 +4682,10 @@ elif test "$with_qhull" = "yes" -o "$with_qhull" = "" ; then + + AC_CHECK_HEADERS([libqhull_r/libqhull_r.h]) + if test "$ac_cv_header_libqhull_r_libqhull_r_h" = "yes"; then +- AC_CHECK_LIB(qhull_r,qh_new_qhull,QHULL_SETTING=yes,QHULL_SETTING=no,) ++ QHULL_SETTING=yes + if test "$QHULL_SETTING" = "yes"; then + QHULL_SETTING=external + QHULL_IS_LIBQHULL_R=1 +- LIBS="-lqhull_r $LIBS" + fi + else + # Only qhull 2012 is reliable on certain datasets. Older Ubuntu have +@@ -4798,7 +4795,9 @@ AC_MSG_CHECKING([for FreeXL support]) + HAVE_FREEXL=no + FREEXL_INCLUDE= + +-if test "$with_freexl" = "" -o "$with_freexl" = "yes" ; then ++if test "$with_freexl" = "yes"; then ++ PKG_CHECK_MODULES([FREEXL], [freexl >= 1.0.0], [HAVE_FREEXL=yes], [AC_MSG_ERROR([freexl not found...])]) ++elif test "$with_freexl" = ""; then + AC_CHECK_HEADERS(freexl.h) + AC_CHECK_LIB(freexl,freexl_open,FREEXL_LIBS="-lfreexl",FREEXL_LIBS=missing) + +@@ -4904,8 +4903,7 @@ if test "$with_libjson_c" = "external" -o "$with_libjson_c" = "" -o "$with_libjs + elif test "$with_libjson_c" = "internal" ; then + LIBJSONC_SETTING=internal + elif test "$with_libjson_c" != "no"; then +- LIBS="-L$with_libjson_c/lib $LIBS" +- AC_CHECK_LIB(json-c,json_object_set_serializer,LIBJSONC_SETTING=external,LIBJSONC_SETTING=internal,-L$with_libjson_c/lib) ++ LIBJSONC_SETTING=external + else + AC_MSG_ERROR([libjson-c (internal or external) is required]) + fi +@@ -6079,7 +6077,6 @@ else + # Test that the package found is for the right architecture + saved_LIBS="$LIBS" + LIBS="$EXR_LIBS" +- AC_CHECK_LIB(IlmImf,ImfTiledInputReadTile, [HAVE_EXR=yes], [HAVE_EXR=no]) + if test "$HAVE_EXR" = "no"; then + dnl Try with OpenEXR >= 3 name + AC_CHECK_LIB(OpenEXR,ImfTiledInputReadTile, [HAVE_EXR=yes], [HAVE_EXR=no]) diff --git a/recipes/gdal/pre_3.5.0/patches/3.4.x/fix-include-jsonc-3.4.1.patch b/recipes/gdal/pre_3.5.0/patches/3.4.x/fix-include-jsonc-3.4.1.patch index b085458322fe7b..97df16ea3d058a 100644 --- a/recipes/gdal/pre_3.5.0/patches/3.4.x/fix-include-jsonc-3.4.1.patch +++ b/recipes/gdal/pre_3.5.0/patches/3.4.x/fix-include-jsonc-3.4.1.patch @@ -1,104 +1,104 @@ ---- a/gcore/gdal_rat.cpp -+++ b/gcore/gdal_rat.cpp -@@ -50,7 +50,7 @@ - #pragma clang diagnostic ignored "-Wunknown-pragmas" - #pragma clang diagnostic ignored "-Wdocumentation" - #endif --#include "json.h" -+#include - #ifdef __clang__ - #pragma clang diagnostic pop - #endif ---- a/ogr/ogrsf_frmts/geojson/ogresrijsonreader.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogresrijsonreader.cpp -@@ -37,7 +37,7 @@ - - #include "cpl_conv.h" - #include "cpl_error.h" --#include "json.h" -+#include - // #include "json_object.h" - // #include "json_tokener.h" - #include "ogr_api.h" ---- a/ogr/ogrsf_frmts/geojson/ogrgeojsondatasource.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrgeojsondatasource.cpp -@@ -41,7 +41,7 @@ - #include "cpl_string.h" - #include "cpl_vsi.h" - #include "cpl_vsi_error.h" --#include "json.h" -+#include - // #include "json_object.h" - #include "gdal_utils.h" - #include "gdal.h" ---- a/ogr/ogrsf_frmts/geojson/ogrgeojsonlayer.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrgeojsonlayer.cpp -@@ -37,7 +37,7 @@ - # endif - #endif // !DEBUG_VERBOSE - --#include -+#include - - #if !DEBUG_JSON - # ifdef __clang ---- a/ogr/ogrsf_frmts/geojson/ogrgeojsonreader.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrgeojsonreader.cpp -@@ -32,7 +32,7 @@ - #include "ogrgeojsonreader.h" - #include "ogrgeojsonutils.h" - #include "ogr_geojson.h" --#include // JSON-C -+#include - - #if (!defined(JSON_C_VERSION_NUM)) || (JSON_C_VERSION_NUM < JSON_C_VER_013) - #include // just for sizeof(struct json_object) ---- a/ogr/ogrsf_frmts/geojson/ogrgeojsonutils.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrgeojsonutils.cpp -@@ -32,7 +32,7 @@ - #include "cpl_port.h" - #include "cpl_conv.h" - #include "ogr_geometry.h" --#include // JSON-C -+#include - - #include - #include ---- a/ogr/ogrsf_frmts/geojson/ogrgeojsonwriter.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrgeojsonwriter.cpp -@@ -33,13 +33,13 @@ - #include "ogrgeojsonutils.h" - #include "ogr_geojson.h" - #include "ogrgeojsonreader.h" --#include // JSON-C -+#include - - #if (!defined(JSON_C_VERSION_NUM)) || (JSON_C_VERSION_NUM < JSON_C_VER_013) - #include - #endif - --#include -+#include - #include "ogr_api.h" - #include "ogr_p.h" - ---- a/ogr/ogrsf_frmts/geojson/ogrtopojsonreader.cpp -+++ b/ogr/ogrsf_frmts/geojson/ogrtopojsonreader.cpp -@@ -30,5 +30,5 @@ - #include "ogrgeojsonutils.h" - #include "ogr_geojson.h" --#include // JSON-C -+#include - #include "ogr_api.h" - ---- a/port/cpl_json_header.h -+++ b/port/cpl_json_header.h -@@ -33,7 +33,7 @@ - #pragma GCC system_header - #endif - --#include -+#include - - #undef json_object_object_foreachC - #define json_object_object_foreachC(obj,iter) \ +--- a/gcore/gdal_rat.cpp ++++ b/gcore/gdal_rat.cpp +@@ -50,7 +50,7 @@ + #pragma clang diagnostic ignored "-Wunknown-pragmas" + #pragma clang diagnostic ignored "-Wdocumentation" + #endif +-#include "json.h" ++#include + #ifdef __clang__ + #pragma clang diagnostic pop + #endif +--- a/ogr/ogrsf_frmts/geojson/ogresrijsonreader.cpp ++++ b/ogr/ogrsf_frmts/geojson/ogresrijsonreader.cpp +@@ -37,7 +37,7 @@ + + #include "cpl_conv.h" + #include "cpl_error.h" +-#include "json.h" ++#include + // #include "json_object.h" + // #include "json_tokener.h" + #include "ogr_api.h" +--- a/ogr/ogrsf_frmts/geojson/ogrgeojsondatasource.cpp ++++ b/ogr/ogrsf_frmts/geojson/ogrgeojsondatasource.cpp +@@ -41,7 +41,7 @@ + #include "cpl_string.h" + #include "cpl_vsi.h" + #include "cpl_vsi_error.h" +-#include "json.h" ++#include + // #include "json_object.h" + #include "gdal_utils.h" + #include "gdal.h" +--- a/ogr/ogrsf_frmts/geojson/ogrgeojsonlayer.cpp ++++ b/ogr/ogrsf_frmts/geojson/ogrgeojsonlayer.cpp +@@ -37,7 +37,7 @@ + # endif + #endif // !DEBUG_VERBOSE + +-#include ++#include + + #if !DEBUG_JSON + # ifdef __clang +--- a/ogr/ogrsf_frmts/geojson/ogrgeojsonreader.cpp ++++ b/ogr/ogrsf_frmts/geojson/ogrgeojsonreader.cpp +@@ -32,7 +32,7 @@ + #include "ogrgeojsonreader.h" + #include "ogrgeojsonutils.h" + #include "ogr_geojson.h" +-#include // JSON-C ++#include + + #if (!defined(JSON_C_VERSION_NUM)) || (JSON_C_VERSION_NUM < JSON_C_VER_013) + #include // just for sizeof(struct json_object) +--- a/ogr/ogrsf_frmts/geojson/ogrgeojsonutils.cpp ++++ b/ogr/ogrsf_frmts/geojson/ogrgeojsonutils.cpp +@@ -32,7 +32,7 @@ + #include "cpl_port.h" + #include "cpl_conv.h" + #include "ogr_geometry.h" +-#include // JSON-C ++#include + + #include + #include +--- a/ogr/ogrsf_frmts/geojson/ogrgeojsonwriter.cpp ++++ b/ogr/ogrsf_frmts/geojson/ogrgeojsonwriter.cpp +@@ -33,13 +33,13 @@ + #include "ogrgeojsonutils.h" + #include "ogr_geojson.h" + #include "ogrgeojsonreader.h" +-#include // JSON-C ++#include + + #if (!defined(JSON_C_VERSION_NUM)) || (JSON_C_VERSION_NUM < JSON_C_VER_013) + #include + #endif + +-#include ++#include + #include "ogr_api.h" + #include "ogr_p.h" + +--- a/ogr/ogrsf_frmts/geojson/ogrtopojsonreader.cpp ++++ b/ogr/ogrsf_frmts/geojson/ogrtopojsonreader.cpp +@@ -30,5 +30,5 @@ + #include "ogrgeojsonutils.h" + #include "ogr_geojson.h" +-#include // JSON-C ++#include + #include "ogr_api.h" + +--- a/port/cpl_json_header.h ++++ b/port/cpl_json_header.h +@@ -33,7 +33,7 @@ + #pragma GCC system_header + #endif + +-#include ++#include + + #undef json_object_object_foreachC + #define json_object_object_foreachC(obj,iter) \