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

autoconf cleanup #3019

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1492,7 +1492,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