diff --git a/liblib/CMakeLists.txt b/liblib/CMakeLists.txt index d496f0fac..36a709f65 100644 --- a/liblib/CMakeLists.txt +++ b/liblib/CMakeLists.txt @@ -65,7 +65,7 @@ if(NETCDF_ENABLE_NCZARR) ) endif() -if(ENABLE_S3_INTERNAL) +if(NETCDF_ENABLE_S3_INTERNAL) target_sources(netcdf PRIVATE $ @@ -156,16 +156,16 @@ if(NETCDF_ENABLE_PNETCDF) endif() -if(ENABLE_S3) - if(ENABLE_S3_AWS) +if(NETCDF_ENABLE_S3) + if(NETCDF_ENABLE_S3_AWS) target_link_directories(netcdf PUBLIC ${AWSSDK_LIB_DIR}) set(TLL_LIBS ${AWSSDK_LINK_LIBRARIES} ${TLL_LIBS}) - elseif(ENABLE_S3_INTERNAL) + elseif(NETCDF_ENABLE_S3_INTERNAL) if(OPENSSL_FOUND) set(TLL_LIBS ${OPENSSL_SSL_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARIES} ${TLL_LIBS}) endif(OPENSSL_FOUND) - endif(ENABLE_S3_AWS) -endif(ENABLE_S3) + endif(NETCDF_ENABLE_S3_AWS) +endif(NETCDF_ENABLE_S3) if(HAVE_LIBXML2) set(TLL_LIBS ${TLL_LIBS} ${LIBXML2_LIBRARIES}) diff --git a/liblib/Makefile.am b/liblib/Makefile.am index 3ccca12dd..cf94e889d 100644 --- a/liblib/Makefile.am +++ b/liblib/Makefile.am @@ -68,10 +68,10 @@ AM_CPPFLAGS += -I${top_srcdir}/libncxml if NETCDF_ENABLE_DAP4 libnetcdf_la_LIBADD += ${top_builddir}/libncxml/libncxml.la else -if ENABLE_S3_INTERNAL +if NETCDF_ENABLE_S3_INTERNAL libnetcdf_la_LIBADD += ${top_builddir}/libncxml/libncxml.la endif -endif # ENABLE_S3_INTERNAL || NETCDF_ENABLE_DAP4 +endif # NETCDF_ENABLE_S3_INTERNAL || NETCDF_ENABLE_DAP4 # NetCDF-4 ... if USE_NETCDF4 diff --git a/script.sh b/script.sh new file mode 100755 index 000000000..b65eea195 --- /dev/null +++ b/script.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# NETCDF_FIND_SHARED_LIBS +# NC_USE_STATIC_CRT +# NETCDF_PACKAGE + +# check NETCDF_ENABLE_NETCDF_4 +# check NETCDF_ENABLE_TESTS + +while IFS= read -r -u 3 var +do + prefixed_var="NETCDF_$var" + echo "Replacing $var with $prefixed_var..." + grep --exclude=variables.txt -rl "$var" . | xargs sed -i '' "s/$var/$prefixed_var/g" + echo "Press enter to continue to the next variable..." + read + git add . + git commit -m "Replace $var with $prefixed_var" +done 3< variables.txt