Skip to content
Snippets Groups Projects
Commit e7d9ddae authored by rayg's avatar rayg
Browse files

make SZIP and HDF4 optional and autodetect

git-svn-id: https://svn.ssec.wisc.edu/repos/shellb3/trunk@842 145b5396-d1c6-4523-8c67-3646d8218c8b
parent ab4138be
No related branches found
No related tags found
No related merge requests found
...@@ -495,13 +495,14 @@ mk_szip() { ...@@ -495,13 +495,14 @@ mk_szip() {
mk_hdf5() { mk_hdf5() {
_find_cots HDF5 include/hdf5.h $BASE $COTS_HOME && return 0 _find_cots HDF5 include/hdf5.h $BASE $COTS_HOME && return 0
_find_cots SZLIB include/szlib.h $BASE $COTS_HOME /usr || oops "HDF5 requires szip" _find_cots SZLIB include/szlib.h $BASE $COTS_HOME /usr || echo "WARING: HDF5 is building without szip"
_find_cots ZLIB include/zlib.h $BASE $COTS_HOME /usr || oops "HDF5 requires zlib" _find_cots ZLIB include/zlib.h $BASE $COTS_HOME /usr || oops "HDF5 requires zlib"
echo unpacking hdf5... echo unpacking hdf5...
tar jxf src/hdf5-${HDF5VER}.tar.bz2 -C build || oops "could not unpack hdf5 from src/" tar jxf src/hdf5-${HDF5VER}.tar.bz2 -C build || oops "could not unpack hdf5 from src/"
echo building hdf5 for $BASE echo building hdf5 for $BASE
test -n "$SZLIB" && SZOPTS="--with-szlib=$SZLIB" || SZOPTS=""
(cd build/hdf5-${HDF5VER} \ (cd build/hdf5-${HDF5VER} \
&& ./configure --prefix=$BASE --enable-shared --with-pic --with-zlib=$ZLIB --with-pthread --with-szlib=$SZLIB\ && ./configure --prefix=$BASE --enable-shared --with-pic --with-zlib=$ZLIB --with-pthread $SZOPTS \
&& make \ && make \
&& make install ) \ && make install ) \
|| oops "hdf5 build failed" || oops "hdf5 build failed"
...@@ -693,7 +694,7 @@ SOSAYWEALL ...@@ -693,7 +694,7 @@ SOSAYWEALL
mk_netcdf4() { mk_netcdf4() {
_find_cots ZLIB include/zlib.h $BASE $COTS_HOME /usr || oops "netcdf4 needs ZLIB" _find_cots ZLIB include/zlib.h $BASE $COTS_HOME /usr || oops "netcdf4 needs ZLIB"
_find_cots JPEG include/jpeglib.h $BASE $COTS_HOME /usr || oops "netcdf4 needs JPEG" _find_cots JPEG include/jpeglib.h $BASE $COTS_HOME /usr || oops "netcdf4 needs JPEG"
_find_cots SZLIB include/szlib.h $BASE $COTS_HOME /usr || oops "netcdf4 needs SZIP" _find_cots SZLIB include/szlib.h $BASE $COTS_HOME /usr || echo "WARNING: netcdf4 building without SZIP"
_find_cots HDF5 include/hdf5.h $BASE $COTS_HOME || oops "netcdf4 requires hdf5-18" _find_cots HDF5 include/hdf5.h $BASE $COTS_HOME || oops "netcdf4 requires hdf5-18"
_find_cots HDF4 include/hdf.h $BASE $COTS_HOME || echo "WARNING: netcdf4 will not include hdf4 support" _find_cots HDF4 include/hdf.h $BASE $COTS_HOME || echo "WARNING: netcdf4 will not include hdf4 support"
_find_cots ZLIB include/zlib.h $BASE $COTS_HOME /usr || oops "netcdf4 requires zlib" _find_cots ZLIB include/zlib.h $BASE $COTS_HOME /usr || oops "netcdf4 requires zlib"
...@@ -714,9 +715,9 @@ mk_netcdf4() { ...@@ -714,9 +715,9 @@ mk_netcdf4() {
mk_netcdf4cxx() { mk_netcdf4cxx() {
_find_cots ZLIB include/zlib.h $BASE $COTS_HOME /usr || oops "netcdf4cxx needs ZLIB" _find_cots ZLIB include/zlib.h $BASE $COTS_HOME /usr || oops "netcdf4cxx needs ZLIB"
_find_cots JPEG include/jpeglib.h $BASE $COTS_HOME /usr || oops "netcdf4cxx needs JPEG" _find_cots JPEG include/jpeglib.h $BASE $COTS_HOME /usr || oops "netcdf4cxx needs JPEG"
_find_cots SZLIB include/szlib.h $BASE $COTS_HOME /usr || oops "netcdf4cxx needs SZIP" _find_cots SZLIB include/szlib.h $BASE $COTS_HOME /usr || echo "WARNING: netcdf4cxx building without SZIP"
_find_cots HDF5 include/hdf5.h $BASE $COTS_HOME || oops "netcdf4cxx requires hdf5-18" _find_cots HDF5 include/hdf5.h $BASE $COTS_HOME || oops "netcdf4cxx requires hdf5-18"
_find_cots HDF4 include/hdf.h $BASE $COTS_HOME || oops "netcdf4cxx requires hdf4" _find_cots HDF4 include/hdf.h $BASE $COTS_HOME || echo "WARNING: netcdf4cxx will build without HDF4"
_find_cots NETCDF4 include/netcdf.h $BASE $COTS_HOME || oops "netcdf4cxx requires netcdf4" _find_cots NETCDF4 include/netcdf.h $BASE $COTS_HOME || oops "netcdf4cxx requires netcdf4"
_find_cots ZLIB include/zlib.h $BASE $COTS_HOME /usr || oops "netcdf4cxx requires zlib" _find_cots ZLIB include/zlib.h $BASE $COTS_HOME /usr || oops "netcdf4cxx requires zlib"
echo "unpacking netcdf4cxx..." echo "unpacking netcdf4cxx..."
...@@ -735,9 +736,9 @@ mk_netcdf4cxx() { ...@@ -735,9 +736,9 @@ mk_netcdf4cxx() {
mk_netcdf4fortran() { mk_netcdf4fortran() {
_find_cots ZLIB include/zlib.h $BASE $COTS_HOME /usr || oops "netcdf4fortran needs ZLIB" _find_cots ZLIB include/zlib.h $BASE $COTS_HOME /usr || oops "netcdf4fortran needs ZLIB"
_find_cots JPEG include/jpeglib.h $BASE $COTS_HOME /usr || oops "netcdf4fortran needs JPEG" _find_cots JPEG include/jpeglib.h $BASE $COTS_HOME /usr || oops "netcdf4fortran needs JPEG"
_find_cots SZLIB include/szlib.h $BASE $COTS_HOME /usr || oops "netcdf4fortran needs SZIP" _find_cots SZLIB include/szlib.h $BASE $COTS_HOME /usr || echo "WARNING: netcdf4fortran building without SZIP"
_find_cots HDF5 include/hdf5.h $BASE $COTS_HOME || oops "netcdf4fortran requires hdf5-18" _find_cots HDF5 include/hdf5.h $BASE $COTS_HOME || oops "netcdf4fortran requires hdf5-18"
_find_cots HDF4 include/hdf.h $BASE $COTS_HOME || oops "netcdf4fortran requires hdf4" _find_cots HDF4 include/hdf.h $BASE $COTS_HOME || echo "WARNING: netcdf4fortran building without HDF4"
_find_cots NETCDF4 include/netcdf.h $BASE $COTS_HOME || oops "netcdf4fortran requires netcdf4" _find_cots NETCDF4 include/netcdf.h $BASE $COTS_HOME || oops "netcdf4fortran requires netcdf4"
_find_cots ZLIB include/zlib.h $BASE $COTS_HOME /usr || oops "netcdf4fortran requires zlib" _find_cots ZLIB include/zlib.h $BASE $COTS_HOME /usr || oops "netcdf4fortran requires zlib"
echo "unpacking netcdf4fortran..." echo "unpacking netcdf4fortran..."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment