Blame m4/ulonglong.m4

Packit Service 9f2c4a
# ulonglong.m4 serial 3
Packit Service 9f2c4a
dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
Packit Service 9f2c4a
dnl This file is free software, distributed under the terms of the GNU
Packit Service 9f2c4a
dnl General Public License.  As a special exception to the GNU General
Packit Service 9f2c4a
dnl Public License, this file may be distributed as part of a program
Packit Service 9f2c4a
dnl that contains a configuration script generated by Autoconf, under
Packit Service 9f2c4a
dnl the same distribution terms as the rest of that program.
Packit Service 9f2c4a
Packit Service 9f2c4a
dnl From Paul Eggert.
Packit Service 9f2c4a
Packit Service 9f2c4a
# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
Packit Service 9f2c4a
Packit Service 9f2c4a
AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
Packit Service 9f2c4a
[
Packit Service 9f2c4a
  AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
Packit Service 9f2c4a
  [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
Packit Service 9f2c4a
    [unsigned long long ullmax = (unsigned long long) -1;
Packit Service 9f2c4a
     return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
Packit Service 9f2c4a
    ac_cv_type_unsigned_long_long=yes,
Packit Service 9f2c4a
    ac_cv_type_unsigned_long_long=no)])
Packit Service 9f2c4a
  if test $ac_cv_type_unsigned_long_long = yes; then
Packit Service 9f2c4a
    AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
Packit Service 9f2c4a
      [Define if you have the 'unsigned long long' type.])
Packit Service 9f2c4a
  fi
Packit Service 9f2c4a
])