echo "gdal" $VERSION
echo "##########################################################################"
-CONFIGURE_FLAGS=
-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}"
-
-./configure --prefix=$CURRENT_SOFTWARE_INSTALL_DIR
-LDFLAGS=
-LDFLAGS+=" -L${HDF5_ROOT_DIR}/lib/ -lhdf5 -L${HDF5_ROOT_DIR}/lib/libhdf5_hl.so -lhdf5_hl"
-LDFLAGS+=" -L${NETCDF_ROOT_DIR}/lib -lnetcdf"
-
-HDF5_CFLAGS=
-HDF5_CFLAGS+=" -I${HDF5_ROOT_DIR}/include -L${HDF5_ROOT_DIR}/lib/ -lhdf5"
-HDF5_CFLAGS+=" -L${HDF5_ROOT_DIR}/lib/libhdf5_hl.so -lhdf5_hl"
-
-LIBS=
-LIBS+=" -L${HDF5_ROOT_DIR}/lib/ -lhdf5 -L${HDF5_ROOT_DIR}/lib/libhdf5_hl.so -lhdf5_hl"
-LIBS+=" -L${NETCDF_ROOT_DIR}/lib -lnetcdf"
-
-HDF5_LIBS="-L${HDF5_ROOT_DIR}/lib/ -lhdf5 -L${HDF5_ROOT_DIR}/lib/libhdf5_hl.so -lhdf5_hl"
-HDF5_INCLUDE="-I${HDF5_ROOT_DIR}/include"
-
CONFIGURE_FLAGS=
CONFIGURE_FLAGS+=" --with-pcraster=internal"
CONFIGURE_FLAGS+=" --with-png=internal"
CONFIGURE_FLAGS+=" --with-python=yes"
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}"
echo
-echo "*** configure $CONFIGURE_FLAGS"
+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\""
rm -rf $BUILD_DIR
mkdir -p $BUILD_DIR
-cd $SOURCE_DIR/gdal
-./configure --prefix=$PRODUCT_INSTALL $CONFIGURE_FLAGS
+cp -r $SOURCE_DIR/gdal $BUILD_DIR/gdal
+cd $BUILD_DIR/gdal
+./configure --prefix=$PRODUCT_INSTALL $CONFIGURE_FLAGS LDFLAGS="-L${HDF5HOME}/lib/ -lhdf5 -lhdf5_hl -L${NETCDF_INSTALL_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"
if [ $? -ne 0 ]
then
echo "ERROR on configure"
def set_env(env, prereq_dir, version):
env.set('NETCDF_ROOT_DIR', prereq_dir)
+ env.set('NETCDF_INSTALL_DIR', prereq_dir)
env.set('NETCDF_VERSION',version)
env.prepend('PATH', os.path.join(prereq_dir,'bin'))
env.prepend('LD_LIBRARY_PATH',os.path.join(prereq_dir, 'lib'))