|
Packit |
fc043f |
# longlong.m4 serial 5
|
|
Packit |
fc043f |
dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
|
|
Packit |
fc043f |
dnl This file is free software; the Free Software Foundation
|
|
Packit |
fc043f |
dnl gives unlimited permission to copy and/or distribute it,
|
|
Packit |
fc043f |
dnl with or without modifications, as long as this notice is preserved.
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
dnl From Paul Eggert.
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
# Define HAVE_LONG_LONG if 'long long' works.
|
|
Packit |
fc043f |
|
|
Packit |
fc043f |
AC_DEFUN([gl_AC_TYPE_LONG_LONG],
|
|
Packit |
fc043f |
[
|
|
Packit |
fc043f |
AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
|
|
Packit |
fc043f |
[AC_TRY_LINK([long long ll = 1LL; int i = 63;],
|
|
Packit |
fc043f |
[long long llmax = (long long) -1;
|
|
Packit |
fc043f |
return ll << i | ll >> i | llmax / ll | llmax % ll;],
|
|
Packit |
fc043f |
ac_cv_type_long_long=yes,
|
|
Packit |
fc043f |
ac_cv_type_long_long=no)])
|
|
Packit |
fc043f |
if test $ac_cv_type_long_long = yes; then
|
|
Packit |
fc043f |
AC_DEFINE(HAVE_LONG_LONG, 1,
|
|
Packit |
fc043f |
[Define if you have the 'long long' type.])
|
|
Packit |
fc043f |
fi
|
|
Packit |
fc043f |
])
|