From: Peter Johnson Date: Thu, 13 Feb 2003 06:56:34 +0000 (-0000) Subject: Add long long detection to unsigned long long detection. X-Git-Tag: v0.2.0~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f4920c410a127e9eb868962ba9c431a89417509e;p=yasm Add long long detection to unsigned long long detection. svn path=/trunk/yasm/; revision=832 --- diff --git a/m4/Makefile.am b/m4/Makefile.am index 4a9b658b..e7ea26a0 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -13,8 +13,8 @@ EXTRA_DIST = Makefile.am \ lib-link.m4 \ lib-prefix.m4 \ libtool.m4 \ + longlong.m4 \ ltdl.m4 \ progtest.m4 \ stdint_h.m4 \ - uintmax_t.m4 \ - ulonglong.m4 + uintmax_t.m4 diff --git a/m4/ulonglong.m4 b/m4/longlong.m4 similarity index 50% rename from m4/ulonglong.m4 rename to m4/longlong.m4 index c375e474..daa95c07 100644 --- a/m4/ulonglong.m4 +++ b/m4/longlong.m4 @@ -1,13 +1,25 @@ -# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40) -dnl Copyright (C) 1999-2002 Free Software Foundation, Inc. -dnl This file is free software, distributed under the terms of the GNU -dnl General Public License. As a special exception to the GNU General -dnl Public License, this file may be distributed as part of a program -dnl that contains a configuration script generated by Autoconf, under -dnl the same distribution terms as the rest of that program. +#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,