-dnl CHECK_IEEE_FP: determines if floating points are IEEE754 compliant
-dnl (inspired from NWS code)
-dnl
-AC_DEFUN([CHECK_IEEE_FP],
-[AC_MSG_CHECKING(if floating point datatypes are IEEE 754 compliant)
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "confdefs.h"
-union {
- double testFP;
- unsigned char bytes[sizeof(double)];
-} doubleTester;
-union {
- float testFP;
- unsigned char bytes[sizeof(float)];
-} floatTester;
-]],[[
-if (sizeof(double) != 8 || sizeof(float) != 4)
- return 1;
-
-memset(&doubleTester, 0, sizeof(doubleTester));
-memset(&floatTester, 0, sizeof(floatTester));
-
-doubleTester.bytes[GRAS_BIGENDIAN ? sizeof(double) - 1 : 0]=192;
-doubleTester.bytes[GRAS_BIGENDIAN ? sizeof(double) - 2 : 1] =
- (sizeof(double) == 4) ? 128 :
- (sizeof(double) == 8) ? 16 :
- (sizeof(double) == 16) ? 1 : 0;
-if (doubleTester.testFP != -4.0) return 1;
-
-floatTester.bytes[GRAS_BIGENDIAN ? sizeof(float) - 1 : 0]=192;
-floatTester.bytes[GRAS_BIGENDIAN ? sizeof(float) - 2 : 1] =
- (sizeof(float) == 4) ? 128 :
- (sizeof(float) == 8) ? 16 :
- (sizeof(float) == 16) ? 1 : 0;
-if (floatTester.testFP != -4.0) return 1;]])],[IEEE_FP=yes],[IEEE_FP=no])
-AC_MSG_RESULT($IEEE_FP)
-
-if test x$IEEE_FP != xyes ; then
- AC_MSG_ERROR([GRAS works only on IEEE754 compliant systems (yet)])
-else
- AC_DEFINE(IEEE_FP,1,[defines if this architecture floating point types are IEEE754 compliant])
-fi
-])dnl end of CHECK_IEEE_FP
-
+# GRAS_STRUCT_BOUNDARY(): Check the minimal alignment boundary of $1 in structures
+# ---------------------
+# (using integer, I hope no arch let it change with the content)
+AC_DEFUN([GRAS_STRUCT_BOUNDARY],
+[changequote(<<, >>)dnl
+ dnl The cache variable name (and of the result).
+ define(<<GRAS_STRUCT_BOUNDARY_RES>>, translit(ac_cv_struct_boundary_$1, [ *()], [_pLR]))dnl
+ changequote([, ])dnl
+ AC_MSG_CHECKING(for the minimal structure boundary of $1)