Mercurial > hg > octave-lyh > gnulib-hg
changeset 3356:8f113648d4ec
(jm_AC_TYPE_LONG_LONG): New macro.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Sat, 18 Aug 2001 15:55:38 +0000 |
parents | 867e9fa9a6c3 |
children | b1734ebed89b |
files | m4/longlong.m4 |
diffstat | 1 files changed, 19 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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,