+dnl
+dnl GRAS_TWO_COMPLIMENT: Make sure the type is two-compliment
+dnl
+AC_DEFUN([GRAS_TWO_COMPLIMENT],
+[
+AC_TRY_COMPILE([#include "confdefs.h"
+union {
+ signed $1 testInt;
+ unsigned char bytes[sizeof($1)];
+} intTester;
+],[
+ intTester.testInt = -2;
+ return ((unsigned int)intTester.bytes[0] +
+ (unsigned int)intTester.bytes[sizeof($1) - 1]) != 509;
+],[],[AC_MSG_ERROR([GRAS works only two-compliment integers (yet)])])dnl end of AC_TRY_COMPILE
+])