summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/buildhdf5137
1 files changed, 102 insertions, 35 deletions
diff --git a/bin/buildhdf5 b/bin/buildhdf5
index 2a6cfda..cb56efd 100755
--- a/bin/buildhdf5
+++ b/bin/buildhdf5
@@ -93,44 +93,111 @@ STEP()
# This is a hack because there is no consistent szlib pathname.
LOCATE_SZLIB()
{
- OS=`uname -s`
- echo OS=$OS
- case "$OS" in
- HP-UX)
- szlibpaths="/afs/ncsa/projects/hdf/packages/szip_new/HPUX-11.00"
- ;;
- IRIX)
- szlibpaths="/afs/ncsa/projects/hdf/packages/szip_new/IRIX64-6.5-32bit"
- ;;
- IRIX64)
- case "$CC" in
- *-n32)
- szlibpaths="/afs/ncsa/projects/hdf/packages/szip_new/IRIX64-6.5-32bit"
- ;;
- *)
- szlibpaths="/afs/ncsa/projects/hdf/packages/szip_new/IRIX64-6.5"
- ;;
+ # Try to guess what domain I am in.
+ if [ -d /usr/hdf/bin ]; then
+ # I am in an THG host.
+ mydomain=thg
+ elif [ -d /afs/ncsa/projects/hdf/packages ]; then
+ # I am in an NCSA host that has AFS.
+ mydomain=ncsa
+ else
+ mydomain=unknown
+ fi
+
+ case $mydomain in
+ thg)
+ # THG hosts
+ OS=`uname -s`
+ echo OS=$OS
+ case "$OS" in
+ Linux)
+ case `uname -m` in
+ i686) # 32 bits
+ szlibpaths="/home/packages/szip/static/encoder/Linux2.6-gcc"
+ ;;
+ x86_64) # 64 bits
+ szlibpaths="/home/packages/szip/static/encoder/Linux2.6-x86_64-gcc"
+ ;;
+ *)
+ # Don't know. Give a shot at standard places.
+ szlibpaths="/usr/hdf /usr/local"
+ ;;
+ esac
+ ;;
+ SunOS)
+ szlibpaths="/home/packages/szip/static/encoder/SunOS-5.10"
+ ;;
+ FreeBSD)
+ case `uname -m` in
+ i386) # 32 bits
+ szlibpaths="/home/packages/szip/static/encoder/FreeBSD"
+ ;;
+ amd64) # 64 bits
+ szlibpaths="/home/packages/szip/static/encoder/FreeBSD-64"
+ ;;
+ *)
+ # Don't know. Give a shot at standard places.
+ szlibpaths="/usr/hdf /usr/local"
+ ;;
+ esac
+ ;;
+ *)
+ # Don't know. Give a shot at standard places.
+ szlibpaths="/usr/hdf /usr/local"
+ ;;
esac
- ;;
- Linux)
- case `uname -m` in
- i686)
- szlibpaths="/afs/ncsa/projects/hdf/packages/szip_new/Linux2.4"
- ;;
- *)
- # Don't know. Give a shot at standard places.
- szlibpaths="/usr/ncsa /usr/sdt"
- ;;
+ ;; # end of case thg
+ ncsa)
+ # ncsa hosts
+ OS=`uname -s`
+ echo OS=$OS
+ case "$OS" in
+ HP-UX)
+ szlibpaths="/afs/ncsa/projects/hdf/packages/szip_new/HPUX-11.00"
+ ;;
+ IRIX)
+ szlibpaths="/afs/ncsa/projects/hdf/packages/szip_new/IRIX64-6.5-32bit"
+ ;;
+ IRIX64)
+ case "$CC" in
+ *-n32)
+ szlibpaths="/afs/ncsa/projects/hdf/packages/szip_new/IRIX64-6.5-32bit"
+ ;;
+ *)
+ szlibpaths="/afs/ncsa/projects/hdf/packages/szip_new/IRIX64-6.5"
+ ;;
+ esac
+ ;;
+ Linux)
+ case `uname -m` in
+ i686)
+ szlibpaths="/afs/ncsa/projects/hdf/packages/szip_new/Linux2.4"
+ ;;
+ *)
+ # Don't know. Give a shot at standard places.
+ szlibpaths="/usr/ncsa /usr/sdt"
+ ;;
+ esac
+ ;;
+ SunOS)
+ szlibpaths="/afs/ncsa/projects/hdf/packages/szip_new/SunOS_5.8"
+ ;;
+ *)
+ # Don't know. Give a shot at standard places.
+ szlibpaths="/usr/ncsa /usr/sdt"
+ ;;
esac
+ ;; # end of case ncsa
+ unknown)
+ # Unknow domain. Give a shot at the some standard places.
+ szlibpaths="/usr/local"
;;
- SunOS)
- szlibpaths="/afs/ncsa/projects/hdf/packages/szip_new/SunOS_5.8"
- ;;
- *)
- # Don't know. Give a shot at standard places.
- szlibpaths="/usr/ncsa /usr/sdt"
- ;;
- esac
+ esac # end of case $mydomain
+
+
+
+
+
echo szlibpaths=$szlibpaths
for x in $szlibpaths dummy; do
if [ $x != dummy -a -f $x/include/szlib.h -a -f $x/lib/libsz.a ]; then