X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/2527c2f7749b27399392afdb84b50c0d939fc723..ae4fc08a6d82e7430a7be02fe540985a98fce5e8:/configure.ac?ds=sidebyside diff --git a/configure.ac b/configure.ac index 6171efd2..bd2c3b5c 100644 --- a/configure.ac +++ b/configure.ac @@ -307,6 +307,21 @@ fi catacomb_LIMIT([SIZET], [=0], [~(size_t)0]) AC_SUBST([limits]) +dnl Figure out other aspects of the implementation's arithmetic. +AC_CACHE_CHECK([whether negative numbers use two's complement], + [catacomb_cv_neg_twoc], +[AC_TRY_COMPILE( +[#include ], +[int check[2*!!(-INT_MAX == INT_MIN + 1) - 1];], +[catacomb_cv_neg_twoc=yes], +[catacomb_cv_neg_twoc=no])]) +case $catacomb_cv_neg_twoc in + yes) + AC_DEFINE([NEG_TWOC], [1], + [Define if signed numbers are represented in two's complement.]) + ;; +esac + dnl Functions used for noise-gathering. AC_CHECK_FUNCS([setgroups]) AC_CHECK_HEADERS([linux/random.h])