mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
Modify nc-config --libs and --static arguments in support of https://github.com/Unidata/netcdf-c/issues/3032
This commit is contained in:
parent
0ad7164de0
commit
042c0b7cbd
@ -2038,7 +2038,7 @@ else
|
||||
NC_LIBS="$with_netcdf_c_lib"
|
||||
fi
|
||||
if test "x$enable_shared" != xyes; then
|
||||
NC_LIBS="$LDFLAGS $NC_LIBS $LIBS"
|
||||
NC_LIBS="$LDFLAGS $NC_LIBS"
|
||||
fi
|
||||
|
||||
case "x$target_os" in
|
||||
|
@ -14,7 +14,8 @@ cc="@CMAKE_C_COMPILER@"
|
||||
cflags="-I@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@"
|
||||
libs="-L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ @NC_LIBS@"
|
||||
libsprivate="@LIBS@"
|
||||
HAS_STATIC=""
|
||||
HAS_STATIC="FALSE"
|
||||
PRINTLIBS="FALSE"
|
||||
|
||||
has_dap2="@NETCDF_ENABLE_DAP2@"
|
||||
if [ -z $has_dap2 -o "$has_dap2" = "OFF" ]; then
|
||||
@ -228,6 +229,9 @@ fi
|
||||
|
||||
for i in "$@"; do
|
||||
case $i in
|
||||
--libs)
|
||||
PRINTLIBS="TRUE"
|
||||
;;
|
||||
--static)
|
||||
HAS_STATIC="TRUE"
|
||||
;;
|
||||
@ -349,7 +353,7 @@ while test $# -gt 0; do
|
||||
|
||||
--libs)
|
||||
if [ "x$HAS_STATIC" = "xTRUE" ]; then
|
||||
echo $libs $libsprivate
|
||||
echo $LDFLAGS $libs $libsprivate
|
||||
else
|
||||
echo $libs
|
||||
fi
|
||||
@ -369,7 +373,9 @@ while test $# -gt 0; do
|
||||
|
||||
;;
|
||||
--static)
|
||||
|
||||
if [ "x$PRINTLIBS" != "xTRUE" ]; then
|
||||
echo $LDFLAGS $libs $libsprivate
|
||||
fi
|
||||
;;
|
||||
|
||||
--prefix)
|
||||
|
16
nc-config.in
16
nc-config.in
@ -38,8 +38,8 @@ has_multifilters="yes"
|
||||
has_quantize="@HAS_QUANTIZE@"
|
||||
has_stdfilters="@STD_FILTERS@"
|
||||
version="@PACKAGE_NAME@ @PACKAGE_VERSION@"
|
||||
HAS_STATIC=""
|
||||
|
||||
HAS_STATIC="FALSE"
|
||||
PRINTLIBS="FALSE"
|
||||
usage()
|
||||
{
|
||||
cat <<EOF
|
||||
@ -128,6 +128,9 @@ fi
|
||||
|
||||
for i in "$@"; do
|
||||
case $i in
|
||||
--libs)
|
||||
PRINTLIBS="TRUE"
|
||||
;;
|
||||
--static)
|
||||
HAS_STATIC="TRUE"
|
||||
;;
|
||||
@ -249,10 +252,11 @@ while test $# -gt 0; do
|
||||
echo $libs
|
||||
fi
|
||||
;;
|
||||
--static)
|
||||
|
||||
;;
|
||||
|
||||
--static)
|
||||
if [ "x$PRINTLIBS" != "xTRUE" ]; then
|
||||
echo $libs $libsprivate
|
||||
fi
|
||||
;;
|
||||
--prefix)
|
||||
echo "${prefix}"
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user