summaryrefslogtreecommitdiff
path: root/lib/make/extras/HDF5
diff options
context:
space:
mode:
authorschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2005-10-08 03:06:58 +0000
committerschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2005-10-08 03:06:58 +0000
commit22d98874501afa7d5d6e9a2cf154d969a7d927a9 (patch)
tree6f7fcee4559d896860e38b62263797928261d91b /lib/make/extras/HDF5
parentd1332f3f8a5101d2c81f30e98e08fc34dbe036d1 (diff)
Support MacOS when configuring HDF5 with lib/make/extras/HDF5.
Similar to Windows, which is already handled as special case, it uses a different extension for dynamic libraries, namely ".dylib". I test for MacOS by grepping the output of uname for "^Darwin". This patch is necessary to make Cactus configure with HDF5 on my notebook, where I installed HDF5 via fink in the standard way. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4180 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make/extras/HDF5')
-rwxr-xr-xlib/make/extras/HDF5/setup.sh22
1 files changed, 16 insertions, 6 deletions
diff --git a/lib/make/extras/HDF5/setup.sh b/lib/make/extras/HDF5/setup.sh
index 0c5e38fe..16f39dc5 100755
--- a/lib/make/extras/HDF5/setup.sh
+++ b/lib/make/extras/HDF5/setup.sh
@@ -98,14 +98,22 @@ if test "X$choose_hdf5" = 'Xyes' ; then
is_windows=$?
+# check whether we run MacOS or not
+ $PERL -we 'exit (`uname` =~ /^Darwin/)'
+ is_macos=$?
+
+
+
# 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
+ if [ $is_windows -ne 0 ]; then
libsz='szlib.lib'
+ elif [ $is_macos -ne 0 ]; then
+ libsz='libsz.dylib'
+ else
+ libsz='libsz.a'
fi
if [ -z "$LIBSZ_DIR" -a ! -r /usr/lib/$libsz ]; then
@@ -140,10 +148,12 @@ if test "X$choose_hdf5" = 'Xyes' ; then
fi
if [ $test_zlib -eq 0 ]; then
- if [ $is_windows -eq 0 ]; then
- libz='libz.a'
- else
+ if [ $is_windows -ne 0 ]; then
libz='zlib.lib'
+ elif [ $is_macos -ne 0 ]; then
+ libz='libz.dylib'
+ else
+ libz='libz.a'
fi
if [ -z "$LIBZ_DIR" -a ! -r /usr/lib/$libz ]; then
echo " HDF5 library was built with external deflate I/O filter, searching for library $libz ..."