]> www.ginac.de Git - cln.git/blob - m4/longlong.m4
Remove the conversion step .tex -> .texi.
[cln.git] / m4 / longlong.m4
1 dnl -*- Autoconf -*-
2 dnl Copyright (C) 1993-2006 Free Software Foundation, Inc.
3 dnl This file is free software, distributed under the terms of the GNU
4 dnl General Public License.  As a special exception to the GNU General
5 dnl Public License, this file may be distributed as part of a program
6 dnl that contains a configuration script generated by Autoconf, under
7 dnl the same distribution terms as the rest of that program.
8
9 dnl From Bruno Haible, Marcus Daniels, Sam Steingold, Paul Eggert.
10
11 AC_PREREQ(2.57)
12
13 AC_DEFUN([CL_LONGLONG],
14 [AC_CACHE_CHECK(for long long type, cl_cv_c_longlong, [
15 AC_TRY_RUN([
16 #include <stdlib.h>
17 int main()
18 {
19 /* long longs don't work right with gcc-2.7.2 on m68k */
20 /* long longs don't work right with gcc-2.7.2 on rs6000: avcall/tests.c gets
21    miscompiled. */
22 #if defined(__m68k__) || (defined(_IBMR2) || defined(__powerpc))
23 #if defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ <= 7)
24   exit(1);
25 #endif
26 #endif
27   { long x = 944938507; long y = 737962842; long z = 162359677;
28     exit(!(((long long) x)*((long long) y)>>32 == z));
29   }
30 }],
31 cl_cv_c_longlong=yes, cl_cv_c_longlong=no, [
32 dnl When cross-compiling, use the test from gnulib.
33 AC_TRY_LINK([long long ll = 1LL; int i = 63;],
34   [long long llmax = (long long) -1;
35    return ll << i | ll >> i | llmax / ll | llmax % ll;],
36   cl_cv_c_longlong=yes,
37   cl_cv_c_longlong=no)])
38 ])
39 if test $cl_cv_c_longlong = yes; then
40   AC_DEFINE(HAVE_LONGLONG,,[compiler supports the `long long' type])
41 fi
42 ])