Blame m4/longlong.m4

Packit Service 9f2c4a
# longlong.m4 serial 4
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_LONG_LONG if 'long long' works.
Packit Service 9f2c4a
Packit Service 9f2c4a
AC_DEFUN([jm_AC_TYPE_LONG_LONG],
Packit Service 9f2c4a
[
Packit Service 9f2c4a
  AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
Packit Service 9f2c4a
  [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
Packit Service 9f2c4a
    [long long llmax = (long long) -1;
Packit Service 9f2c4a
     return ll << i | ll >> i | llmax / ll | llmax % ll;],
Packit Service 9f2c4a
    ac_cv_type_long_long=yes,
Packit Service 9f2c4a
    ac_cv_type_long_long=no)])
Packit Service 9f2c4a
  if test $ac_cv_type_long_long = yes; then
Packit Service 9f2c4a
    AC_DEFINE(HAVE_LONG_LONG, 1,
Packit Service 9f2c4a
      [Define if you have the 'long long' type.])
Packit Service 9f2c4a
  fi
Packit Service 9f2c4a
])