Compiling zlib-1.2.11 with GNU 6

A Massively Spiffy Yet Delicately Unobtrusive Compression Library

Prerequisites

GNU 6.5

Compiling

wget http://www.zlib.net/zlib-1.2.11.tar.gz
tar -xvzf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure --prefix=/usr/local/zlib-1.2.11-gcc6
make check

Compile zlib-1.2.8 with Intel-15.0.6

Step 1: Download the zlib from HDF5 (https://support.hdfgroup.org/HDF5/release/obtain5.html)
In your .bashrc, you can

source /usr/local/intel_2015/bin/compilervars.sh intel64
source /usr/local/intel_2015/impi/5.0.3.049/bin64/mpivars.sh intel64
source /usr/local/intel_2015/mkl/bin/mklvars.sh intel64
export CC=icc
export CFLAGS='-O3 -xHost -ip'

At your command prompt

$ tar -zxvf zlib-1.2.8.tar.gz
$ cd zlib-1.2.8
$ ./configure --prefix=/usr/local/zlib-1.2.7
$ make
$ make check
$ make install

References:

  1. Building HDF5* with Intel® compilers