Blob Blame History Raw
diff -rupN gdal-2.2.2-fedora/configure.ac gdal-2.2.2-fedora-new/configure.ac
--- gdal-2.2.2-fedora/configure.ac	2017-09-15 12:37:46.000000000 +0200
+++ gdal-2.2.2-fedora-new/configure.ac	2017-10-30 13:00:43.214169559 +0100
@@ -1089,53 +1089,15 @@ dnl ------------------------------------
 dnl Select an PostgreSQL Library to use, or disable driver.
 dnl ---------------------------------------------------------------------------
 
-PG_CONFIG=no
-
-AC_ARG_WITH(pg,
-	    AS_HELP_STRING([--with-pg[=ARG]],
-	       [Include PostgreSQL GDAL/OGR Support (ARG=path to pg_config)]),,)
-
-if test "x$with_pg" = "xyes" -o "x$with_pg" = "x" ; then
-  AC_PATH_PROG(PG_CONFIG, pg_config, no)
-else
-  PG_CONFIG=$with_pg
-fi
-
-AC_MSG_CHECKING([for PostgreSQL])
-
-if test "x$PG_CONFIG" = "xno" ; then
-
-  HAVE_PG=no
-  PG_LIB=
-  PG_INC=
-
-  AC_MSG_RESULT([no])
-
-else
-  if test -d ${PG_CONFIG} ; then
-      AC_MSG_RESULT([no])
-      AC_MSG_ERROR([--with-pg argument is a directory.  It should be the path to the pg_config script, often somewhere like /usr/local/pgsql/bin/pg_config.])
-  fi
-
-  if test \! -x ${PG_CONFIG} ; then
-      AC_MSG_RESULT([no])
-      AC_MSG_ERROR([--with-pg argument is a not an executable file.  It should be the path to the pg_config script, often somewhere like /usr/local/pgsql/bin/pg_config.])
-  fi
-
-  AC_MSG_RESULT([yes])
-
-  AC_CHECK_LIB(pq,PQconnectdb,HAVE_PG=yes,HAVE_PG=no,-L`$PG_CONFIG --libdir`)
-
-  if test "${HAVE_PG}" = "yes" ; then
-    LIBS=-L`$PG_CONFIG --libdir`" -lpq $LIBS"
-    PG_INC=-I`$PG_CONFIG --includedir`" -I"`$PG_CONFIG --includedir-server`
-  fi
-
-fi
+PKG_CHECK_MODULES([LIBPQ], [libpq],[
+    HAVE_PG="yes"
+],[
+    HAVE_PG="no"
+])
 
 AC_SUBST(HAVE_PG,$HAVE_PG)
-AC_SUBST(PG_INC,$PG_INC)
-AC_SUBST(PG_LIB,$PG_LIB)
+AC_SUBST(PG_INC,$LIBPQ_CFLAGS)
+LIBS="$LIBPQ_LIBS $LIBS"
 
 dnl ---------------------------------------------------------------------------
 dnl Check if we should build with GRASS support.
@@ -1219,40 +1181,15 @@ dnl ------------------------------------
 dnl Check if cfitsio library is available.
 dnl ---------------------------------------------------------------------------
 
-AC_ARG_WITH(cfitsio,[  --with-cfitsio[=ARG]    Include FITS support (ARG=no or libcfitsio path)],,)
-
-if test "$with_cfitsio" = "no" ; then
-
-  FITS_SETTING=no
-
-  echo "FITS support disabled."
-
-elif test "$with_cfitsio" = "yes" -o "$with_cfitsio" = "" ; then
-
-  AC_CHECK_LIB(cfitsio,ffopen,FITS_SETTING=external,FITS_SETTING=no,)
-
-  if test "$FITS_SETTING" = "external" ; then
-    LIBS="-lcfitsio $LIBS"
-    echo "using pre-installed libcfitsio."
-  else
-    echo "libcfitsio not found - FITS support disabled"
-  fi
-
-dnl Fedora has cfitsio headers in /usr/include/cfitsio
-  if test "$FITS_SETTING" = "external" -a -d /usr/include/cfitsio ; then
-    EXTRA_INCLUDES="-I/usr/include/cfitsio $EXTRA_INCLUDES"
-  fi
-
-else
-
-  FITS_SETTING=external
-  LIBS="-L$with_cfitsio -L$with_cfitsio/lib -lcfitsio $LIBS"
-  EXTRA_INCLUDES="-I$with_cfitsio -I$with_cfitsio/include $EXTRA_INCLUDES"
-
-  echo "using libcfitsio from $with_cfitsio."
-fi
+PKG_CHECK_MODULES([CFITSIO], [cfitsio],[
+    FITS_SETTING="yes"
+],[
+    FITS_SETTING="no"
+])
 
-AC_SUBST(FITS_SETTING,$FITS_SETTING)
+EXTRA_INCLUDES="$CFITSIO_CFLAGS $EXTRA_INCLUDES"
+LIBS="$CFITSIO_LIBS $LIBS"
+AC_SUBST([FITS_SETTING], $FITS_SETTING)
 
 if test "$FITS_SETTING" != "no" ; then
   OPT_GDAL_FORMATS="fits $OPT_GDAL_FORMATS"
@@ -3216,12 +3153,13 @@ dnl Check for Xerces C++ Parser support.
 dnl ---------------------------------------------------------------------------
 
 XERCES_REQ_VERSION="3.1.0"
-AX_LIB_XERCES($XERCES_REQ_VERSION)
-
-if test "$HAVE_XERCES" = "yes"; then
-    LIBS="$XERCES_LDFLAGS $LIBS"
-fi
+PKG_CHECK_MODULES([XERCES], [xerces-c >= $XERCES_REQ_VERSION],[
+    HAVE_XERCES="yes"
+],[
+    HAVE_XERCES="no"
+])
 
+LIBS="$XERCES_LIBS $LIBS"
 AC_SUBST([HAVE_XERCES], $HAVE_XERCES)
 AC_SUBST([XERCES_INCLUDE], $XERCES_CFLAGS)
 
@@ -3242,12 +3180,14 @@ dnl ------------------------------------
 
 dnl Expat 1.95.0 released in 2000-09-28
 EXPAT_REQ_VERSION="1.95.0"
-AX_LIB_EXPAT($EXPAT_REQ_VERSION)
 
-if test "$HAVE_EXPAT" = "yes"; then
-    LIBS="$EXPAT_LDFLAGS $LIBS"
-fi
+PKG_CHECK_MODULES([EXPAT], [expat >= $EXPAT_REQ_VERSION],[
+    HAVE_EXPAT="yes"
+],[
+    HAVE_EXPAT="no"
+])
 
+LIBS="$EXPAT_LIBS $LIBS"
 AC_SUBST([HAVE_EXPAT], $HAVE_EXPAT)
 AC_SUBST([EXPAT_INCLUDE], $EXPAT_CFLAGS)
 
@@ -3550,9 +3490,12 @@ if test -z "$with_spatialite" -o "$with_
 elif test "$with_spatialite" = "yes"; then
     AC_CHECK_HEADERS(sqlite3.h)
     if test "$ac_cv_header_sqlite3_h" = "yes"; then
-        AC_MSG_CHECKING([for spatialite.h in /usr/include or /usr/local/include])
-        if test -f "/usr/include/spatialite.h" -o -f "/usr/local/include/spatialite.h"; then
-            AC_MSG_RESULT(found)
+        AC_MSG_CHECKING([for spatialite.h])
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+          [[#include <sqlite3.h>
+            #include <spatialite.h>]])],
+          [
+            AC_MSG_RESULT([found])
             AC_CHECK_LIB(spatialite,spatialite_init,SPATIALITE_INIT_FOUND=yes,SPATIALITE_INIT_FOUND=no,)
             if test "$SPATIALITE_INIT_FOUND" = "yes"; then
                 HAVE_SPATIALITE=yes
@@ -3560,9 +3503,10 @@ elif test "$with_spatialite" = "yes"; th
                 LIBS="$LIBS $SPATIALITE_LIBS"
                 HAVE_SQLITE3=yes
             fi
-        else
-            AC_MSG_RESULT(not found : spatialite support disabled)
-        fi
+          ], [
+            AC_MSG_RESULT([not found : spatialite support disabled])
+          ]
+        )
     fi
 elif test "$with_spatialite" = "dlopen"; then
   HAVE_SPATIALITE=dlopen
diff -rupN gdal-2.2.2-fedora/GDALmake.opt.in gdal-2.2.2-fedora-new/GDALmake.opt.in
--- gdal-2.2.2-fedora/GDALmake.opt.in	2017-09-15 12:37:55.000000000 +0200
+++ gdal-2.2.2-fedora-new/GDALmake.opt.in	2017-10-30 13:00:43.215169557 +0100
@@ -36,7 +36,7 @@ INSTALL_DIR	= 	$(GDAL_ROOT)/install-sh -
 LIBS	=	$(SDE_LIB) @LIBS@ $(KAK_LIBS) $(DWG_LIBS) $(CURL_LIB) \
 		$(MRSID_LIBS) $(MRSID_LIDAR_LIBS) $(ECW_LIBS) $(INGRES_LIB) \
 		$(PCIDSK_LIB) $(RASDAMAN_LIB) $(CHARLS_LIB) $(SOSI_LIB) \
-		$(OPENCL_LIB) $(JVM_LIB) $(LIBICONV) $(FGDB_LIB) $(LIBXML2_LIB) $(MONGODB_LIB)
+		$(OPENCL_LIB) $(JVM_LIB) $(LIBICONV) $(FGDB_LIB) $(LIBXML2_LIB) $(MONGODB_LIB) -lgrib2c
 
 SSEFLAGS = @SSEFLAGS@
 SSSE3FLAGS = @SSSE3FLAGS@
diff -rupN gdal-2.2.2-fedora/GNUmakefile gdal-2.2.2-fedora-new/GNUmakefile
--- gdal-2.2.2-fedora/GNUmakefile	2017-09-15 12:37:47.000000000 +0200
+++ gdal-2.2.2-fedora-new/GNUmakefile	2017-10-30 13:00:54.414140750 +0100
@@ -219,7 +219,6 @@ endif
 ifneq ($(BINDINGS),)
 	(cd swig; $(MAKE) install)
 endif
-	(cd scripts; $(MAKE) install)
 	for f in LICENSE.TXT data/*.* ; do $(INSTALL_DATA) $$f $(DESTDIR)$(INST_DATA) ; done
 	$(LIBTOOL_FINISH) $(DESTDIR)$(INST_LIB)
 	$(INSTALL_DIR) $(DESTDIR)$(INST_LIB)/pkgconfig
diff -rupN gdal-2.2.2-fedora/ogr/ogrsf_frmts/gml/xercesc_headers.h gdal-2.2.2-fedora-new/ogr/ogrsf_frmts/gml/xercesc_headers.h
--- gdal-2.2.2-fedora/ogr/ogrsf_frmts/gml/xercesc_headers.h	2017-09-15 12:37:48.000000000 +0200
+++ gdal-2.2.2-fedora-new/ogr/ogrsf_frmts/gml/xercesc_headers.h	2017-10-30 13:00:43.215169557 +0100
@@ -39,14 +39,14 @@
 #define INFINITY INFINITY_XERCES
 #endif
 
-#include <util/PlatformUtils.hpp>
-#include <sax2/DefaultHandler.hpp>
-#include <sax2/ContentHandler.hpp>
-#include <sax2/SAX2XMLReader.hpp>
-#include <sax2/XMLReaderFactory.hpp>
-#include <sax2/Attributes.hpp>
-#include <sax/InputSource.hpp>
-#include <util/BinInputStream.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/sax2/DefaultHandler.hpp>
+#include <xercesc/sax2/ContentHandler.hpp>
+#include <xercesc/sax2/SAX2XMLReader.hpp>
+#include <xercesc/sax2/XMLReaderFactory.hpp>
+#include <xercesc/sax2/Attributes.hpp>
+#include <xercesc/sax/InputSource.hpp>
+#include <xercesc/util/BinInputStream.hpp>
 
 #ifdef XERCES_CPP_NAMESPACE_USE
 XERCES_CPP_NAMESPACE_USE
diff -rupN gdal-2.2.2-fedora/ogr/ogrsf_frmts/ili/xercesc_headers.h gdal-2.2.2-fedora-new/ogr/ogrsf_frmts/ili/xercesc_headers.h
--- gdal-2.2.2-fedora/ogr/ogrsf_frmts/ili/xercesc_headers.h	2017-09-15 12:37:51.000000000 +0200
+++ gdal-2.2.2-fedora-new/ogr/ogrsf_frmts/ili/xercesc_headers.h	2017-10-30 13:00:43.215169557 +0100
@@ -39,16 +39,16 @@
 #define INFINITY INFINITY_XERCES
 #endif
 
-#include <util/PlatformUtils.hpp>
-#include <sax2/DefaultHandler.hpp>
-#include <sax2/ContentHandler.hpp>
-#include <sax2/SAX2XMLReader.hpp>
-#include <sax2/XMLReaderFactory.hpp>
-#include <dom/DOM.hpp>
-#include <util/XMLString.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
+#include <xercesc/sax2/DefaultHandler.hpp>
+#include <xercesc/sax2/ContentHandler.hpp>
+#include <xercesc/sax2/SAX2XMLReader.hpp>
+#include <xercesc/sax2/XMLReaderFactory.hpp>
+#include <xercesc/dom/DOM.hpp>
+#include <xercesc/util/XMLString.hpp>
 
 #if _XERCES_VERSION >= 30000
-# include <sax2/Attributes.hpp>
+# include <xercesc/sax2/Attributes.hpp>
 #endif
 
 #ifdef XERCES_CPP_NAMESPACE_USE
diff -rupN gdal-2.2.2-fedora/ogr/ogr_xerces_headers.h gdal-2.2.2-fedora-new/ogr/ogr_xerces_headers.h
--- gdal-2.2.2-fedora/ogr/ogr_xerces_headers.h	2017-09-15 12:37:47.000000000 +0200
+++ gdal-2.2.2-fedora-new/ogr/ogr_xerces_headers.h	2017-10-30 13:00:43.215169557 +0100
@@ -33,7 +33,7 @@
 #pragma GCC system_header
 #endif
 
-#include <util/PlatformUtils.hpp>
+#include <xercesc/util/PlatformUtils.hpp>
 
 #ifdef XERCES_CPP_NAMESPACE_USE
 XERCES_CPP_NAMESPACE_USE