~ubuntu-branches/ubuntu/raring/workrave/raring

« back to all changes in this revision

Viewing changes to m4/longlong.m4

  • Committer: Package Import Robot
  • Author(s): Francois Marier, Francois Marier, Jordi Mallach
  • Date: 2012-05-28 11:29:40 UTC
  • mfrom: (1.2.9)
  • Revision ID: package-import@ubuntu.com-20120528112940-bbbsjkk30fom9s8x
Tags: 1.9.909+abc941eb70-1
[ Francois Marier ]
* New upstream snapshot
  - Drop leak-fix patch (applied upstream)
  - Document how the tarball is built in README.source
* Build GNOME applets and use gsettings
* Massive update of Build-Depends as per configure.ac

* Update README.source with snapshot instructions
* Switch to machine-readable copyright file
* Update alioth git repo links
* Bump debhelper version to 9
* Bump Standards-Version to 3.9.3

[ Jordi Mallach ]
* Avoid references to GNU/Linux in manpage.
* Drop build dependency on libgnet-dev, it's obsolete and unneeded.
* Add myself to Uploaders.
* Rewrite d/rules into dh style.
  - Move all install tweaks to .install files.
  - Install manpages using dh_installman.
* As a side effect, the package installs arch-dependant data in the
  arch triplet directory; add the required Pre-Depends for m-a-support.
* Bring back GNOME Panel applet (for GNOME 3 fallback mode) and ship the
  new GNOME Shell extension (closes: #642514, #666100).
* Add private_dirs.patch: move libworkrave-private and GObject
  Introspection files to a private dir, so they are really out of the
  way, but disable it for now as it breaks the Shell extension.
* Move typelib out of the triplet dir as gobject-introspection is not
  M-A ready yet.
* Enable dh_autoreconf for the above patches.
* Add lintian overrides.
* Add necessary Breaks/Replaces as the xpm icon has moved to workrave-data.
* Prefix all debhelper files with package name.
* Suggest gnome-shell and gnome-panel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# longlong.m4 serial 8
2
 
dnl Copyright (C) 1999-2006 Free Software Foundation, Inc.
 
1
# longlong.m4 serial 13
 
2
dnl Copyright (C) 1999-2007 Free Software Foundation, Inc.
3
3
dnl This file is free software; the Free Software Foundation
4
4
dnl gives unlimited permission to copy and/or distribute it,
5
5
dnl with or without modifications, as long as this notice is preserved.
7
7
dnl From Paul Eggert.
8
8
 
9
9
# Define HAVE_LONG_LONG_INT if 'long long int' works.
10
 
# This fixes a bug in Autoconf 2.60, but can be removed once we
11
 
# assume 2.61 everywhere.
 
10
# This fixes a bug in Autoconf 2.61, but can be removed once we
 
11
# assume 2.62 everywhere.
12
12
 
13
13
# Note: If the type 'long long int' exists but is only 32 bits large
14
 
# (as on some very old compilers), AC_TYPE_LONG_LONG_INT will not be
 
14
# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
15
15
# defined. In this case you can treat 'long long int' like 'long int'.
16
16
 
17
17
AC_DEFUN([AC_TYPE_LONG_LONG_INT],
18
18
[
19
19
  AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
20
20
    [AC_LINK_IFELSE(
21
 
       [AC_LANG_PROGRAM(
22
 
          [[long long int ll = 9223372036854775807ll;
23
 
            long long int nll = -9223372036854775807LL;
24
 
            typedef int a[((-9223372036854775807LL < 0
25
 
                            && 0 < 9223372036854775807ll)
26
 
                           ? 1 : -1)];
27
 
            int i = 63;]],
28
 
          [[long long int llmax = 9223372036854775807ll;
29
 
            return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
30
 
                    | (llmax / ll) | (llmax % ll));]])],
31
 
       [ac_cv_type_long_long_int=yes],
 
21
       [_AC_TYPE_LONG_LONG_SNIPPET],
 
22
       [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
 
23
        dnl If cross compiling, assume the bug isn't important, since
 
24
        dnl nobody cross compiles for this platform as far as we know.
 
25
        AC_RUN_IFELSE(
 
26
          [AC_LANG_PROGRAM(
 
27
             [[@%:@include <limits.h>
 
28
               @%:@ifndef LLONG_MAX
 
29
               @%:@ define HALF \
 
30
                        (1LL << (sizeof (long long int) * CHAR_BIT - 2))
 
31
               @%:@ define LLONG_MAX (HALF - 1 + HALF)
 
32
               @%:@endif]],
 
33
             [[long long int n = 1;
 
34
               int i;
 
35
               for (i = 0; ; i++)
 
36
                 {
 
37
                   long long int m = n << i;
 
38
                   if (m >> i != n)
 
39
                     return 1;
 
40
                   if (LLONG_MAX / 2 < m)
 
41
                     break;
 
42
                 }
 
43
               return 0;]])],
 
44
          [ac_cv_type_long_long_int=yes],
 
45
          [ac_cv_type_long_long_int=no],
 
46
          [ac_cv_type_long_long_int=yes])],
32
47
       [ac_cv_type_long_long_int=no])])
33
48
  if test $ac_cv_type_long_long_int = yes; then
34
49
    AC_DEFINE([HAVE_LONG_LONG_INT], 1,
36
51
  fi
37
52
])
38
53
 
39
 
# This macro is obsolescent and should go away soon.
40
 
AC_DEFUN([gl_AC_TYPE_LONG_LONG],
 
54
# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
 
55
# This fixes a bug in Autoconf 2.61, but can be removed once we
 
56
# assume 2.62 everywhere.
 
57
 
 
58
# Note: If the type 'unsigned long long int' exists but is only 32 bits
 
59
# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
 
60
# will not be defined. In this case you can treat 'unsigned long long int'
 
61
# like 'unsigned long int'.
 
62
 
 
63
AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
41
64
[
42
 
  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
43
 
  ac_cv_type_long_long=$ac_cv_type_long_long_int
44
 
  if test $ac_cv_type_long_long = yes; then
45
 
    AC_DEFINE(HAVE_LONG_LONG, 1,
46
 
      [Define if you have the 'long long' type.])
 
65
  AC_CACHE_CHECK([for unsigned long long int],
 
66
    [ac_cv_type_unsigned_long_long_int],
 
67
    [AC_LINK_IFELSE(
 
68
       [_AC_TYPE_LONG_LONG_SNIPPET],
 
69
       [ac_cv_type_unsigned_long_long_int=yes],
 
70
       [ac_cv_type_unsigned_long_long_int=no])])
 
71
  if test $ac_cv_type_unsigned_long_long_int = yes; then
 
72
    AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], 1,
 
73
      [Define to 1 if the system has the type `unsigned long long int'.])
47
74
  fi
48
75
])
 
76
 
 
77
# Expands to a C program that can be used to test for simultaneous support
 
78
# of 'long long' and 'unsigned long long'. We don't want to say that
 
79
# 'long long' is available if 'unsigned long long' is not, or vice versa,
 
80
# because too many programs rely on the symmetry between signed and unsigned
 
81
# integer types (excluding 'bool').
 
82
AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
 
83
[
 
84
  AC_LANG_PROGRAM(
 
85
    [[/* Test preprocessor.  */
 
86
      #if ! (-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
 
87
        error in preprocessor;
 
88
      #endif
 
89
      #if ! (18446744073709551615ULL <= -1ull)
 
90
        error in preprocessor;
 
91
      #endif
 
92
      /* Test literals.  */
 
93
      long long int ll = 9223372036854775807ll;
 
94
      long long int nll = -9223372036854775807LL;
 
95
      unsigned long long int ull = 18446744073709551615ULL;
 
96
      /* Test constant expressions.   */
 
97
      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
 
98
                     ? 1 : -1)];
 
99
      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
 
100
                     ? 1 : -1)];
 
101
      int i = 63;]],
 
102
    [[/* Test availability of runtime routines for shift and division.  */
 
103
      long long int llmax = 9223372036854775807ll;
 
104
      unsigned long long int ullmax = 18446744073709551615ull;
 
105
      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
 
106
              | (llmax / ll) | (llmax % ll)
 
107
              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
 
108
              | (ullmax / ull) | (ullmax % ull));]])
 
109
])