From 1443d5fffa9dfadf7774fa4641da816445d594ad Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 18 Aug 2001 15:55:38 +0000 Subject: (jm_AC_TYPE_LONG_LONG): New macro. --- m4/longlong.m4 | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/m4/longlong.m4 b/m4/longlong.m4 index 44f7ce360..daa95c075 100644 --- a/m4/longlong.m4 +++ b/m4/longlong.m4 @@ -1,7 +1,25 @@ -#serial 3 +#serial 2 dnl From Paul Eggert. +# Define HAVE_LONG_LONG if 'long long' works. + +AC_DEFUN([jm_AC_TYPE_LONG_LONG], +[ + AC_CACHE_CHECK([for long long], ac_cv_type_long_long, + [AC_TRY_LINK([long long ll = 1; int i = 63;], + [long long llmax = (long long) -1; + return ll << i | ll >> i | llmax / ll | llmax % ll;], + ac_cv_type_long_long=yes, + ac_cv_type_long_long=no)]) + if test $ac_cv_type_long_long = yes; then + AC_DEFINE(HAVE_LONG_LONG, 1, + [Define if you have the long long type.]) + fi +]) + +# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works. + AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], [ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, -- cgit v1.2.3-70-g09d2