Skip to content

Commit

Permalink
autoconf cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Sep 12, 2024
1 parent 6f63ca6 commit 62a1162
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 46 deletions.
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

0 comments on commit 62a1162

Please sign in to comment.