5 # Define HAVE_LONG_LONG if 'long long' works.
7 AC_DEFUN([jm_AC_TYPE_LONG_LONG],
9 AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
10 [AC_TRY_LINK([long long ll = 1; int i = 63;],
11 [long long llmax = (long long) -1;
12 return ll << i | ll >> i | llmax / ll | llmax % ll;],
13 ac_cv_type_long_long=yes,
14 ac_cv_type_long_long=no)])
15 if test $ac_cv_type_long_long = yes; then
16 AC_DEFINE(HAVE_LONG_LONG, 1,
17 [Define if you have the long long type.])
21 # Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
23 AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
25 AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
26 [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
27 [unsigned long long ullmax = (unsigned long long) -1;
28 return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
29 ac_cv_type_unsigned_long_long=yes,
30 ac_cv_type_unsigned_long_long=no)])
31 if test $ac_cv_type_unsigned_long_long = yes; then
32 AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
33 [Define if you have the unsigned long long type.])