#!/bin/bash
# script to building HDF-1.8.6 with the Intel Compiler Suite

## load compiler settings
# Intel(R) Composer XE 2011 Update 4 for Linux
source /opt/intel/composerxe-2011.4.191/bin/compilervars.sh intel64 # compiler suite
source /opt/intel/mkl/bin/mklvars.sh intel64 # math kernel library

# set environment variables
export CC=icc
export F9X=ifort
export CXX=icpc 
export CFLAGS='-O3 -xHost'
export FCFLAGS='-O3 -xHost'
export CXXFLAGS='-O3 -xHost'

## build static library
# configure (with Fortran and C++ libraries)
./configure --prefix=/usr/local --enable-fortran --enable-cxx 
# build
make

# install library if test successful
make check && make install
