diff options
author | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2003-11-10 20:33:56 +0000 |
---|---|---|
committer | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2003-11-10 20:33:56 +0000 |
commit | 364a2096fff25d5155a4c782c949513c179ed75a (patch) | |
tree | fc7d1ae2876d7070f62934941ba038c1764ea118 /lib/make/extras/HDF5 | |
parent | c2b5e6cf434dac91772ab814fa8c408d50417175 (diff) |
Check whether the HDF5 installation has the external szlib I/O filter built in,
and if so, add the szlib library to the HDF5 system libs.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3455 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make/extras/HDF5')
-rwxr-xr-x | lib/make/extras/HDF5/setup.sh | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/lib/make/extras/HDF5/setup.sh b/lib/make/extras/HDF5/setup.sh index 5c552a84..4e25ffd4 100755 --- a/lib/make/extras/HDF5/setup.sh +++ b/lib/make/extras/HDF5/setup.sh @@ -77,6 +77,40 @@ if [ -n "$IRIX_BITS" ]; then fi fi + +# check whether we run Windows or not +$PERL -we 'exit (`uname` =~ /^CYGWIN/)' +is_windows=$? + + +# Check whether we have to link with libsz.a +grep -qe '#define H5_HAVE_LIBSZ 1' ${HDF5_DIR}/include/H5pubconf.h 2> /dev/null +test_szlib=$? +if [ $test_szlib -eq 0 ]; then + if [ $is_windows -eq 0 ]; then + libsz='libsz.a' + else + libsz='szlib.lib' + fi + + if [ -z "$LIBSZ_DIR" -a ! -r /usr/lib/$libsz ]; then + echo " HDF5 library was built with external szlib I/O filter, searching for library $libsz ..." + CCTK_Search LIBSZ_DIR '/usr/local/lib c:/packages/libsz/lib c:/packages/hdf5/lib' $libsz + if [ -z "$LIBSZ_DIR" ]; then + echo " Unable to locate the library $libsz - please set LIBSZ_DIR" + exit 2 + fi + echo " Found library $libsz in $LIBSZ_DIR" + fi + if [ $is_windows -eq 0 ]; then + HDF5_LIBS="$HDF5_LIBS sz" + else + HDF5_LIBS="$HDF5_LIBS szlib" + fi + HDF5_LIB_DIRS="$HDF5_LIB_DIRS $LIBSZ_DIR" +fi + + # Check whether we have to link with libz.a # this is for current versions of HDF5 (starting from 1.4.x) @@ -89,10 +123,6 @@ if [ $test_zlib -ne 0 ]; then test_zlib=$? fi -# check whether we run Windows or not -$PERL -we 'exit (`uname` =~ /^CYGWIN/)' -is_windows=$? - if [ $test_zlib -eq 0 ]; then if [ $is_windows -eq 0 ]; then libz='libz.a' @@ -100,7 +130,7 @@ if [ $test_zlib -eq 0 ]; then libz='zlib.lib' fi if [ -z "$LIBZ_DIR" -a ! -r /usr/lib/$libz ]; then - echo " HDF5 library was compiled with compression library, searching for $libz ..." + echo " HDF5 library was built with external deflate I/O filter, searching for library $libz ..." CCTK_Search LIBZ_DIR '/usr/local/lib c:/packages/libz/lib c:/packages/hdf5/lib' $libz if [ -z "$LIBZ_DIR" ]; then echo " Unable to locate the library $libz - please set LIBZ_DIR" |