mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-30 16:10:44 +08:00
Merge branch 'fix-find-ncxx-configs' of https://github.com/ZedThree/netcdf-c into v4.5.0-release-branch
This commit is contained in:
commit
af91d03bac
@ -96,12 +96,16 @@ fi
|
||||
|
||||
has_cxx="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`
|
||||
cxx4flags=`ncxx4-config --cflags`
|
||||
cxx4libs=`ncxx4-config --libs`
|
||||
has_cxx4="yes"
|
||||
elif type -p ncxx-config > /dev/null 2>&1; then
|
||||
elif [ -f "$ncxxconf" ]; then
|
||||
cxx=`ncxx-config --cxx`
|
||||
cxxflags=`ncxx-config --cflags`
|
||||
cxxlibs=`ncxx-config --libs`
|
||||
@ -139,13 +143,13 @@ Available values for OPTION include:
|
||||
--version Library version
|
||||
|
||||
EOF
|
||||
if type -p ncxx4-config > /dev/null 2>&1; then
|
||||
if [ -f "$ncxx4conf" ]; then
|
||||
cat <<EOF
|
||||
--cxx4 C++ compiler for netCDF-4 C++ library
|
||||
--cxx4flags flags needed to compile a C++ program
|
||||
--cxx4libs libraries needed to link a C++ program
|
||||
EOF
|
||||
elif type -p ncxx-config > /dev/null 2>&1; then
|
||||
elif [ -f "$ncxxconf" ]; then
|
||||
cat <<EOF
|
||||
--cxx C++ compiler
|
||||
--cxxflags flags needed to compile a C++ program
|
||||
@ -176,14 +180,14 @@ all()
|
||||
echo " --has-c++ -> $has_cxx"
|
||||
echo " --cxx -> $cxx"
|
||||
|
||||
if type -p ncxx-config > /dev/null 2>&1; then
|
||||
if [ -f "$ncxxconf" ]; then
|
||||
echo " --cxxflags -> $cxxflags"
|
||||
echo " --cxxlibs -> $cxxlibs"
|
||||
fi
|
||||
echo
|
||||
echo " --has-c++4 -> $has_cxx4"
|
||||
echo " --cxx4 -> $cxx4"
|
||||
if type -p ncxx4-config > /dev/null 2>&1; then
|
||||
if [ -f "$ncxx4conf" ]; then
|
||||
echo " --cxx4flags -> $cxx4flags"
|
||||
echo " --cxx4libs -> $cxx4libs"
|
||||
fi
|
||||
|
16
nc-config.in
16
nc-config.in
@ -40,12 +40,16 @@ fi
|
||||
|
||||
has_cxx="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`
|
||||
cxx4flags=`ncxx4-config --cflags`
|
||||
cxx4libs=`ncxx4-config --libs`
|
||||
has_cxx4="yes"
|
||||
elif type -p ncxx-config > /dev/null 2>&1; then
|
||||
elif [ -f "$ncxxconf" ]; then
|
||||
cxx=`ncxx-config --cxx`
|
||||
cxxflags=`ncxx-config --cflags`
|
||||
cxxlibs=`ncxx-config --libs`
|
||||
@ -82,13 +86,13 @@ Available values for OPTION include:
|
||||
--version Library version
|
||||
|
||||
EOF
|
||||
if type -p ncxx4-config > /dev/null 2>&1; then
|
||||
if [ -f "$ncxx4conf" ]; then
|
||||
cat <<EOF
|
||||
--cxx4 C++ compiler for netCDF-4 C++ library
|
||||
--cxx4flags flags needed to compile a C++ program
|
||||
--cxx4libs libraries needed to link a C++ program
|
||||
EOF
|
||||
elif type -p ncxx-config > /dev/null 2>&1; then
|
||||
elif [ -f "$ncxxconf" ]; then
|
||||
cat <<EOF
|
||||
--cxx C++ compiler
|
||||
--cxxflags flags needed to compile a C++ program
|
||||
@ -119,14 +123,14 @@ all()
|
||||
echo " --has-c++ -> $has_cxx"
|
||||
echo " --cxx -> $cxx"
|
||||
|
||||
if type -p ncxx-config > /dev/null 2>&1; then
|
||||
if [ -f "$ncxxconf" ]; then
|
||||
echo " --cxxflags -> $cxxflags"
|
||||
echo " --cxxlibs -> $cxxlibs"
|
||||
fi
|
||||
echo
|
||||
echo " --has-c++4 -> $has_cxx4"
|
||||
echo " --cxx4 -> $cxx4"
|
||||
if type -p ncxx4-config > /dev/null 2>&1; then
|
||||
if [ -f "$ncxx4conf" ]; then
|
||||
echo " --cxx4flags -> $cxx4flags"
|
||||
echo " --cxx4libs -> $cxx4libs"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user