Last change
on this file since 27762 was 27762, checked in by jdquinn, 22 months ago |
CHG: Working towards static linking of lcurl and hdf5 libs to libnetcdf on binaries builds
|
-
Property svn:executable
set to
*
|
File size:
1.4 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 | set -eu
|
---|
3 |
|
---|
4 |
|
---|
5 | # Dependencies
|
---|
6 | # - MPI implementation (for parallel I/O support)
|
---|
7 | # - hdf5 (1.8.9 / 1.10.1 or later, for netCDF-4 support)
|
---|
8 | # - zlib (1.2.5 or later, for netCDF-4 compression)
|
---|
9 | # - curl (7.18.0 or later, for DAP remote access client support)
|
---|
10 | #
|
---|
11 | # Sources:
|
---|
12 | # - https://www.unidata.ucar.edu/software/netcdf/documentation/NUG/getting_and_building_netcdf.html#building
|
---|
13 | #
|
---|
14 |
|
---|
15 | # Constants
|
---|
16 | #
|
---|
17 | VER="4.7.2"
|
---|
18 |
|
---|
19 | PREFIX="${ISSM_DIR}/externalpackages/netcdf/install" # Set to location where external package should be installed
|
---|
20 |
|
---|
21 | # Environment
|
---|
22 | #
|
---|
23 | export CPPFLAGS="-I${HDF5_ROOT}/include -I${CURL_ROOT}/include -I${ZLIB_ROOT}/include"
|
---|
24 | export LDFLAGS="-L${HDF5_ROOT}/lib -L${CURL_ROOT}/lib -L${ZLIB_ROOT}/lib"
|
---|
25 |
|
---|
26 | # Download source
|
---|
27 | $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/netcdf-c-${VER}.tar.gz" "netcdf-c-${VER}.tar.gz"
|
---|
28 |
|
---|
29 | # Unpack source
|
---|
30 | tar -zxvf netcdf-c-${VER}.tar.gz
|
---|
31 |
|
---|
32 | # Cleanup
|
---|
33 | rm -rf ${PREFIX} src
|
---|
34 | mkdir -p ${PREFIX} src
|
---|
35 |
|
---|
36 | # Move source to 'src' directory
|
---|
37 | mv netcdf-c-${VER}/* src
|
---|
38 | rm -rf netcdf-c-${VER}
|
---|
39 |
|
---|
40 | # Configure
|
---|
41 | cd src
|
---|
42 | ./configure \
|
---|
43 | --prefix="${PREFIX}" \
|
---|
44 | --disable-static \
|
---|
45 | --disable-dependency-tracking \
|
---|
46 | --enable-fast-install \
|
---|
47 | --disable-doxygen \
|
---|
48 | --enable-netcdf4 \
|
---|
49 | --disable-filter-testing \
|
---|
50 | --disable-examples \
|
---|
51 | --disable-dap-remote-tests
|
---|
52 |
|
---|
53 | # Compile, test, and install
|
---|
54 | if [ $# -eq 0 ]; then
|
---|
55 | make
|
---|
56 | make check
|
---|
57 | make install
|
---|
58 | else
|
---|
59 | make
|
---|
60 | make -j $1 check
|
---|
61 | make -j $1 install
|
---|
62 | fi
|
---|
Note:
See
TracBrowser
for help on using the repository browser.