netcdf-c/debug/cf
Dennis Heimbigner 25d2e05444 Prepare for the path management code
Rename some files in prep for eventual implementation
of more comprehensive cross-platform file path management.
2020-10-13 19:12:15 -06:00

174 lines
3.2 KiB
Bash

#!/bin/bash
#NB=1
DB=1
#X=-x
#ANSI=1
#MEM=1
#NOTUIL=1
FAST=1
#PROF=1
#BENCH=1
NCZARR=1
HDF5=1
DAP=1
#S3=1
#S3TEST=1
SZIP=1
#HDF4=1
#PNETCDF=1
#PAR4=1
AWSSDK_DIR="/cygdrive/c/tools/aws-cpp-sdk-all"
#TESTSERVERS="149.165.169.123:8080,remotetest.unidata.ucar.edu"
#TESTSERVERS="localhost:8080,149.165.169.123:8080"
#TESTSERVERS="149.165.169.123:8080"
#TESTSERVERS="remotetest.unidata.ucar.edu"
if test $# != 0 ; then
cmds=$@
fi
if test "x$PNETCDF" = x1 -o "x$PAR4" = x1 ; then
MPIO=1
fi
CFLAGS=""
#CFLAGS="-Wall -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-parameter -Wconversion ${CFLAGS}"
#CFLAGS="-Wall -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-parameter -Wno-char-subscripts -Wno-pointer-sign -Wno-format ${CFLAGS}"
CFLAGS="-Wall -Wno-unused-parameter -Wno-char-subscripts -Wno-pointer-sign ${CFLAGS}"
#CFLAGS="-Wall ${CFLAGS}"
#CFLAGS="$CFLAGS -Wconversion"
#CFLAGS="-Wall -Wunused-parameter -Wno-char-subscripts -Wno-pointer-sign ${CFLAGS}"
if test "x$MEM" = x1 ; then
CFLAGS="-fsanitize=address ${CFLAGS}"
fi
if test "x$ANSI" = x1 ; then
CFLAGS="-ansi ${CFLAGS}"
fi
stddir="/usr/local"
PREFIX=/usr/local
if test "x${cmds}" = x ; then
cmds=""
else
for f in $cmds ; do
if test "x$f" = "xdistcheck" ; then
PREFIX=/tmp/$HOST
fi
done
fi
# HDF4=>HDF5
if test "x$HDF4" = x1 ; then
HDF5=1
fi
# !HDF5=>!SZIP
if test "x$HDF5" != x1 ; then
SZIP=0
fi
CC=gcc
MALLOC_CHECK=""
CPPFLAGS=""
LDFLAGS="-L/usr/lib -L${stddir}/lib"
#LD_LIBRARY_PATH="/usr/lib:${stddir}/lib:$LD_LIBRARY_PATH"
CFLAGS="-g -O0 $CFLAGS -Wno-undefined"
MAKE=make
IGNORE="test 0 = 1"
if test "x$HDF5" != x ; then
CPPFLAGS="-I${stddir}/include $CPPFLAGS"
LDFLAGS="-lhdf5_hl -lhdf5 -lz $LDFLAGS"
else
FLAGS="$FLAGS --disable-netcdf-4"
#FLAGS="$FLAGS --disable-hdf5"
fi
if test "x$HDF4" = x1 ; then
FLAGS="$FLAGS --enable-hdf4 --enable-hdf4-file-tests"
fi
if test "x$DAP" = "x" ; then
FLAGS="$FLAGS --disable-dap"
fi
if test "x$MPIO" = x1 ; then
# MPIDIR=/usr/lib64/mpich
MPIDIR=/usr/lib64/openmpi
PATH="${PATH}:${MPIDIR}/bin"
CC="${MPIDIR}/bin/mpicc"
CPPFLAGS="-I${MPIDIR}/include"
LDFLAGS="$LDFLAGS -L${MPIDIR}"
LDLIBS="-lmpich"
FLAGS="$FLAGS --enable-parallel-tests"
fi
if test "x$PNETCDF" = x1 ; then
FLAGS="$FLAGS --enable-pnetcdf"
fi
if test "x$NCZARR" != "x" ; then
FLAGS="$FLAGS --enable-nczarr"
fi
if test "x$S3" != x ; then
FLAGS="$FLAGS --enable-s3-sdk"
else
FLAGS="$FLAGS --disable-s3-sdk"
fi
if test "x$S3TEST" != x ; then
FLAGS="$FLAGS --enable-nczarr-s3-tests"
export AWSSDK_DIR="${AWSSDK_DIR}"
LDFLAGS="$LDFLAGS $AWSSDK_DIR/bin/aws-cpp-sdk-s3.dll"
CPPFLAGS="$CPPFLAGS -I${AWSSDK_DIR}/include"
fi
if test "x${PROF}" = x1 ; then
CFLAGS="${CFLAGS} -pg"
LDFLAGS="${LDFLAGS} -pg"
fi
if test "x${BENCH}" = x1 ; then
FLAGS="$FLAGS --enable-benchmarks"
fi
FLAGS="$FLAGS --enable-byterange"
export PATH
export CC
export CPPFLAGS
export CFLAGS
export LDFLAGS
export LD_LIBRARY_PATH
export MALLOC_CHECK
export CXXFLAGS
DISTCHECK_CONFIGURE_FLAGS="$FLAGS"
export DISTCHECK_CONFIGURE_FLAGS
if test "x$NB" != x1 && test "x$FAST" != x1 ; then
${MAKE} distclean >/dev/null 2>&1
fi
if test "x$NB" != x1 ; then
if autoreconf -i --force ; then ok=1; else exit ; fi
fi
sh $X ./configure ${FLAGS}
for c in $cmds; do
printenv LD_LIBRARY_PATH
${MAKE} ${FORCE} $c
done
exit 0