diff options
author | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-03-08 19:03:02 +0000 |
---|---|---|
committer | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-03-08 19:03:02 +0000 |
commit | ce3f8bb71244d634b0d8bcde4cf72f0c5d0ef15f (patch) | |
tree | 95385d6d80f8c0c1dde7aab35db7c8181aa13992 /lib | |
parent | 149bc7b5fbd2da9f2a2f9df7ca7bf0e29ae09912 (diff) |
Added /usr/local/hdf5/serial/ to the search path for HDF5 installations.
This is where they installed HDF5 on berte.zib.de.
As soon as parallel HDF5 is working the path should be changed to point
to /usr/local/hdf5/parallel/.
This fixes BR IO:212.
The script now also checks if libhdf5.a was compiled with libz.a -
if so, it does a search on this lib and adds it to LIBS and LIBDIRS.
You can also set LIBZ_DIR manually.
Thomas
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1448 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/make/extras/HDF5/setup.sh | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/lib/make/extras/HDF5/setup.sh b/lib/make/extras/HDF5/setup.sh index 7759edd2..42da18af 100755 --- a/lib/make/extras/HDF5/setup.sh +++ b/lib/make/extras/HDF5/setup.sh @@ -12,13 +12,11 @@ if test -n "$HDF5" ; then echo "Configuring with HDF5. Blocks with #ifdef HDF5 will be activated" -CCTK_WriteLine cctk_Extradefs.h "#define HDF5" - # Work out which variation of HDF5 lib if test -z "$HDF5_DIR" ; then echo "HDF5 selected but no HDF5_DIR set... Checking some places" - CCTK_Search HDF5_DIR "/usr /usr/local /usr/local/hdf5 /usr/local/packages/hdf5 /usr/local/apps/hdf5 c:/packages/hdf5" include/hdf5.h + CCTK_Search HDF5_DIR "/usr /usr/local /usr/local/hdf5 /usr/local/packages/hdf5 /usr/local/apps/hdf5 /usr/local/hdf5/serial c:/packages/hdf5" include/hdf5.h if test -z "$HDF5_DIR" ; then echo "Unable to locate the HDF5 directory - please set HDF5_DIR" exit 2 @@ -26,6 +24,9 @@ if test -z "$HDF5_DIR" ; then echo "Found an HDF5 package in $HDF5_DIR" fi + +# Check what version we found + grep -qe '#define HAVE_PARALLEL 1' ${HDF5_DIR}/include/H5config.h 2> /dev/null test_phdf5=$? @@ -43,17 +44,36 @@ else fi fi + # Set the HDF5 libs, libdirs and includedirs HDF5_LIBS=hdf5 -if test `uname` = "Linux" ; then - HDF5_LIBS="hdf5 z" -fi HDF5_LIB_DIRS="$HDF5_DIR/lib" HDF5_INC_DIRS="$HDF5_DIR/include" + +# Check whether we have to link with libz.a + +grep -qe '#define HAVE_COMPRESS2 1' ${HDF5_DIR}/include/H5config.h 2> /dev/null +test_compress2=$? + +if [ $test_compress2 -eq 0 ] ; then + if test -z "$LIBZ_DIR" ; then + echo "HDF5 library was compiled with libz, searching for libz.a ..." + CCTK_Search LIBZ_DIR "/usr/lib /usr/local/lib c:/packages/libz" libz.a + if test -z "$LIBZ_DIR" ; then + echo "Unable to locate the library libz.a - please set LIBZ_DIR" + exit 2 + fi + echo "Found library libz.a in $LIBZ_DIR" + fi + HDF5_LIBS="$HDF5_LIBS z" + HDF5_LIB_DIRS="$HDF5_LIB_DIRS $LIBZ_DIR" +fi + # Write the data out to the header and make files. +CCTK_WriteLine cctk_Extradefs.h "#define HDF5" CCTK_WriteLine make.extra.defn "HDF5_LIBS = $HDF5_LIBS" CCTK_WriteLine make.extra.defn "HDF5_LIB_DIRS = $HDF5_LIB_DIRS" CCTK_WriteLine make.extra.defn "HDF5_INC_DIRS = $HDF5_INC_DIRS" |