diff options
Diffstat (limited to 'm4/longlong.m4')
-rw-r--r-- | m4/longlong.m4 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/m4/longlong.m4 b/m4/longlong.m4 new file mode 100644 index 000000000..44f7ce360 --- /dev/null +++ b/m4/longlong.m4 @@ -0,0 +1,17 @@ +#serial 3 + +dnl From Paul Eggert. + +AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], +[ + AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, + [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], + [unsigned long long ullmax = (unsigned long long) -1; + return ull << i | ull >> i | ullmax / ull | ullmax % ull;], + ac_cv_type_unsigned_long_long=yes, + ac_cv_type_unsigned_long_long=no)]) + if test $ac_cv_type_unsigned_long_long = yes; then + AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, + [Define if you have the unsigned long long type.]) + fi +]) |