Salome HOME
merge from master
[tools/sat_salome.git] / products / compil_scripts / gdal-2.4.0.sh
index d6ed267b1a54d5e59ea775523dba46b64662a3d6..1c2fd54d0e120d8c88e732f568b89bf46af1ec1c 100755 (executable)
@@ -4,6 +4,12 @@ echo "##########################################################################
 echo "gdal" $VERSION
 echo "##########################################################################"
 
+if [ -n "$SAT_HPC" ]  && [ -n "$MPI_ROOT_DIR" ]; then
+   echo "WARNING: setting CC and CXX environment variables and target MPI wrapper"
+   export CXX=${MPI_CXX_COMPILER}
+   export CC=${MPI_C_COMPILER}
+fi
+
 CONFIGURE_FLAGS=
 CONFIGURE_FLAGS+=" --with-pcraster=internal"
 CONFIGURE_FLAGS+=" --with-png=internal"
@@ -16,10 +22,16 @@ CONFIGURE_FLAGS+=" --with-geos=yes"
 CONFIGURE_FLAGS+=" --with-sqlite3=yes"
 CONFIGURE_FLAGS+=" --with-threads"
 CONFIGURE_FLAGS+=" --with-python=${PYTHONBIN}"
-CONFIGURE_FLAGS+=" --with-xml2=${LIBXML_ROOT_DIR}"
 CONFIGURE_FLAGS+=" --with-hdf5=${HDF5_ROOT_DIR}"
 CONFIGURE_FLAGS+=" --with-netcdf=${NETCDF_ROOT_DIR}"
 
+if [[ "$DIST_NAME$DIST_VERSION" == "CO8" ]]; then
+    CONFIGURE_FLAGS+=" --without-jasper"
+fi
+
+if [ ! -z "$LIBXML_ROOT_DIR" ]; then
+    CONFIGURE_FLAGS+=" --with-xml2=${LIBXML_ROOT_DIR}"
+fi
 echo
 echo "*** configure $CONFIGURE_FLAGS LDFLAGS=\"-L${HDF5HOME}/lib/ -lhdf5 -lhdf5_hl -L${NETCDF_ROOT_DIR}/lib -lnetcdf\" HDF5_CFLAGS=\"-I${HDF5HOME}/include -L${HDF5HOME}/lib/ -lhdf5 -lhdf5_hl\" LIBS=\"-L${HDF5HOME}/lib/ -lhdf5 -lhdf5_hl -L${NETCDF_INSTALL_DIR}/lib -lnetcdf\" HDF5_LIBS=\"-L${HDF5HOME}/lib/ -lhdf5 -lhdf5_hl \" HDF5_INCLUDE=\"-I${HDF5HOME}/include\""