Merge branch 'fix-find-ncxx-configs' of https://github.com/ZedThree/netcdf-c into v4.5.0-release-branch

This commit is contained in:
Ward Fisher 2017-06-07 17:20:16 -06:00
commit af91d03bac
2 changed files with 20 additions and 12 deletions

View File

@ -96,12 +96,16 @@ fi
has_cxx="no" has_cxx="no"
has_cxx4="no" has_cxx4="no"
if type -p ncxx4-config > /dev/null 2>&1; then
ncxxconf=$(which ncxx-config 2>/dev/null)
ncxx4conf=$(which ncxx4-config 2>/dev/null)
if [ -f "$ncxx4conf" ]; then
cxx4=`ncxx4-config --cxx` cxx4=`ncxx4-config --cxx`
cxx4flags=`ncxx4-config --cflags` cxx4flags=`ncxx4-config --cflags`
cxx4libs=`ncxx4-config --libs` cxx4libs=`ncxx4-config --libs`
has_cxx4="yes" has_cxx4="yes"
elif type -p ncxx-config > /dev/null 2>&1; then elif [ -f "$ncxxconf" ]; then
cxx=`ncxx-config --cxx` cxx=`ncxx-config --cxx`
cxxflags=`ncxx-config --cflags` cxxflags=`ncxx-config --cflags`
cxxlibs=`ncxx-config --libs` cxxlibs=`ncxx-config --libs`
@ -139,13 +143,13 @@ Available values for OPTION include:
--version Library version --version Library version
EOF EOF
if type -p ncxx4-config > /dev/null 2>&1; then if [ -f "$ncxx4conf" ]; then
cat <<EOF cat <<EOF
--cxx4 C++ compiler for netCDF-4 C++ library --cxx4 C++ compiler for netCDF-4 C++ library
--cxx4flags flags needed to compile a C++ program --cxx4flags flags needed to compile a C++ program
--cxx4libs libraries needed to link a C++ program --cxx4libs libraries needed to link a C++ program
EOF EOF
elif type -p ncxx-config > /dev/null 2>&1; then elif [ -f "$ncxxconf" ]; then
cat <<EOF cat <<EOF
--cxx C++ compiler --cxx C++ compiler
--cxxflags flags needed to compile a C++ program --cxxflags flags needed to compile a C++ program
@ -176,14 +180,14 @@ all()
echo " --has-c++ -> $has_cxx" echo " --has-c++ -> $has_cxx"
echo " --cxx -> $cxx" echo " --cxx -> $cxx"
if type -p ncxx-config > /dev/null 2>&1; then if [ -f "$ncxxconf" ]; then
echo " --cxxflags -> $cxxflags" echo " --cxxflags -> $cxxflags"
echo " --cxxlibs -> $cxxlibs" echo " --cxxlibs -> $cxxlibs"
fi fi
echo echo
echo " --has-c++4 -> $has_cxx4" echo " --has-c++4 -> $has_cxx4"
echo " --cxx4 -> $cxx4" echo " --cxx4 -> $cxx4"
if type -p ncxx4-config > /dev/null 2>&1; then if [ -f "$ncxx4conf" ]; then
echo " --cxx4flags -> $cxx4flags" echo " --cxx4flags -> $cxx4flags"
echo " --cxx4libs -> $cxx4libs" echo " --cxx4libs -> $cxx4libs"
fi fi

View File

@ -40,12 +40,16 @@ fi
has_cxx="no" has_cxx="no"
has_cxx4="no" has_cxx4="no"
if type -p ncxx4-config > /dev/null 2>&1; then
ncxxconf=$(which ncxx-config 2>/dev/null)
ncxx4conf=$(which ncxx4-config 2>/dev/null)
if [ -f "$ncxx4conf" ]; then
cxx4=`ncxx4-config --cxx` cxx4=`ncxx4-config --cxx`
cxx4flags=`ncxx4-config --cflags` cxx4flags=`ncxx4-config --cflags`
cxx4libs=`ncxx4-config --libs` cxx4libs=`ncxx4-config --libs`
has_cxx4="yes" has_cxx4="yes"
elif type -p ncxx-config > /dev/null 2>&1; then elif [ -f "$ncxxconf" ]; then
cxx=`ncxx-config --cxx` cxx=`ncxx-config --cxx`
cxxflags=`ncxx-config --cflags` cxxflags=`ncxx-config --cflags`
cxxlibs=`ncxx-config --libs` cxxlibs=`ncxx-config --libs`
@ -82,13 +86,13 @@ Available values for OPTION include:
--version Library version --version Library version
EOF EOF
if type -p ncxx4-config > /dev/null 2>&1; then if [ -f "$ncxx4conf" ]; then
cat <<EOF cat <<EOF
--cxx4 C++ compiler for netCDF-4 C++ library --cxx4 C++ compiler for netCDF-4 C++ library
--cxx4flags flags needed to compile a C++ program --cxx4flags flags needed to compile a C++ program
--cxx4libs libraries needed to link a C++ program --cxx4libs libraries needed to link a C++ program
EOF EOF
elif type -p ncxx-config > /dev/null 2>&1; then elif [ -f "$ncxxconf" ]; then
cat <<EOF cat <<EOF
--cxx C++ compiler --cxx C++ compiler
--cxxflags flags needed to compile a C++ program --cxxflags flags needed to compile a C++ program
@ -119,14 +123,14 @@ all()
echo " --has-c++ -> $has_cxx" echo " --has-c++ -> $has_cxx"
echo " --cxx -> $cxx" echo " --cxx -> $cxx"
if type -p ncxx-config > /dev/null 2>&1; then if [ -f "$ncxxconf" ]; then
echo " --cxxflags -> $cxxflags" echo " --cxxflags -> $cxxflags"
echo " --cxxlibs -> $cxxlibs" echo " --cxxlibs -> $cxxlibs"
fi fi
echo echo
echo " --has-c++4 -> $has_cxx4" echo " --has-c++4 -> $has_cxx4"
echo " --cxx4 -> $cxx4" echo " --cxx4 -> $cxx4"
if type -p ncxx4-config > /dev/null 2>&1; then if [ -f "$ncxx4conf" ]; then
echo " --cxx4flags -> $cxx4flags" echo " --cxx4flags -> $cxx4flags"
echo " --cxx4libs -> $cxx4libs" echo " --cxx4libs -> $cxx4libs"
fi fi