Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing some autoconf problems #3022

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 0 additions & 45 deletions acinclude.m4
Original file line number Diff line number Diff line change
@@ -1,50 +1,5 @@
dnl UD macros for netcdf configure

dnl
dnl UD_CHECK_IEEE
dnl If the 'double' is not an IEEE double
dnl or the 'float' is not and IEEE single,
dnl define NO_IEEE_FLOAT
dnl
AC_DEFUN([UD_CHECK_IEEE],
[
AC_MSG_CHECKING(for IEEE floating point format)
AC_TRY_RUN([#ifndef NO_FLOAT_H
#include <float.h>
#endif

#define EXIT_NOTIEEE 1
#define EXIT_MAYBEIEEE 0

int
main()
{
#if defined(FLT_RADIX) && FLT_RADIX != 2
return EXIT_NOTIEEE;
#elif defined(DBL_MAX_EXP) && DBL_MAX_EXP != 1024
return EXIT_NOTIEEE;
#elif defined(DBL_MANT_DIG) && DBL_MANT_DIG != 53
return EXIT_NOTIEEE;
#elif defined(FLT_MAX_EXP) && !(FLT_MAX_EXP == 1024 || FLT_MAX_EXP == 128)
return EXIT_NOTIEEE;
#elif defined(FLT_MANT_DIG) && !(FLT_MANT_DIG == 53 || FLT_MANT_DIG == 24)
return EXIT_NOTIEEE;
#else
/* (assuming eight bit char) */
if(sizeof(double) != 8)
return EXIT_NOTIEEE;
if(!(sizeof(float) == 4 || sizeof(float) == 8))
return EXIT_NOTIEEE;

return EXIT_MAYBEIEEE;
#endif
}],ac_cv_c_ieeefloat=yes, ac_cv_c_ieeefloat=no, :)
AC_MSG_RESULT($ac_cv_c_ieeefloat)
if test "$ac_cv_c_ieeefloat" = no; then
AC_DEFINE([NO_IEEE_FLOAT], [], [no IEEE float on this platform])
fi
])


dnl
dnl Print which compilers are going to be used, the flags, and their
Expand Down
10 changes: 9 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ AC_MSG_RESULT($enable_dap)
if test "x$enable_remote_functionality" = xno ; then
AC_MSG_WARN([All network access is disabled => DAP support disabled.])
enable_dap=no
AC_MSG_WARN([All network access is disabled => NCZARR support disabled.])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving nczarr enabled despite the lack of network access is currently what we'd like to do, although there will be a bigger task ahead of us regarding a separation of 'local-nczarr functionality' vs. 'remote data access functionality', in the code. It's why I've, for the upcoming release candidate, opted to leave libcurl as a dependency when nczarr is enabled. Maybe it's already handled, but I need to make sure nothing breaks if we compile nczarr support without linking libcurl.

enable_nczarr=no
fi

AC_MSG_CHECKING([whether netcdf zarr storage format should be disabled])
Expand Down Expand Up @@ -664,6 +666,13 @@ AC_ARG_ENABLE([quantize],
[disable quantize support. It is safe to leave this on unless you specifically need to disable it.])])
test "x$enable_quantize" = xno || enable_quantize=yes

# If HDF5 and nczarr are disabled, there is no quantize.
if test "x${enable_hdf5}" = xno; then
if test "x${enable_nczarr}" = xno; then
enable_quantize=no
fi
fi

AC_MSG_RESULT($enable_quantize)
if test "x${enable_quantize}" = xyes; then
AC_DEFINE([NETCDF_ENABLE_QUANTIZE], [1], [if true, enable quantize support])
Expand Down Expand Up @@ -1492,7 +1501,6 @@ AC_SUBST(USEPLUGINS, [${enable_plugins}])
AC_FUNC_ALLOCA
AC_CHECK_DECLS([isnan, isinf, isfinite],,,[#include <math.h>])
AC_CHECK_MEMBERS([struct stat.st_blksize])
UD_CHECK_IEEE
AC_CHECK_TYPES([size_t, ssize_t, schar, uchar, longlong, ushort, uint, int64, uint64, size64_t, ssize64_t, _off64_t, uint64_t, ptrdiff_t])
AC_TYPE_OFF_T
AC_TYPE_UINTPTR_T
Expand Down
Loading