mirror of https://github.com/yasm/yasm.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.4 KiB
45 lines
1.4 KiB
#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 |
|
AC_CACHE_CHECK(for __int64, ac_cv_c___int64, |
|
[AC_TRY_LINK([__int64 ll; int i = 63;], |
|
[__int64 llmax = (__int64) -1; |
|
return ll << i | ll >> i | llmax / ll | llmax % ll;], |
|
ac_cv_c___int64=yes, |
|
ac_cv_c___int64=no)]) |
|
if test $ac_cv_c___int64 = yes; then |
|
AC_DEFINE(HAVE___INT64, 1, |
|
[Define if your compiler supports the \`__int64' 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, |
|
[AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], |
|
[unsigned long long ullmax = (unsigned long long) -1; |
|
return ull << i | ull >> i | ullmax / ull | ullmax % ull;], |
|
ac_cv_type_unsigned_long_long=yes, |
|
ac_cv_type_unsigned_long_long=no)]) |
|
if test $ac_cv_type_unsigned_long_long = yes; then |
|
AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, |
|
[Define if you have the unsigned long long type.]) |
|
fi |
|
])
|
|
|