~ubuntu-branches/ubuntu/hardy/uim/hardy

« back to all changes in this revision

Viewing changes to sigscheme/m4/ax_c___alignof__.m4

  • Committer: Bazaar Package Importer
  • Author(s): Masahito Omote
  • Date: 2007-04-21 03:46:09 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20070421034609-gpcurkutp8vaysqj
Tags: 1:1.4.1-3
* Switch to dh_gtkmodules for the gtk 2.10 transition (Closes:
  #419318)
  - debian/control: Add ${misc:Depends} and remove libgtk2.0-bin on
    uim-gtk2.0.
  - debian/uim-gtk2.0.post{inst,rm}: Removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl Copyright (C) 2006 YAMAMOTO Kengo <yamaken AT bp.iij4u.or.jp>
 
2
dnl
 
3
dnl Copying and distribution of this file, with or without modification,
 
4
dnl are permitted in any medium without royalty provided the copyright
 
5
dnl notice and this notice are preserved.
 
6
dnl
 
7
dnl
 
8
dnl @synopsis AX_C___ALIGNOF__
 
9
dnl
 
10
dnl Checks if __alignof__ operator is available.
 
11
dnl
 
12
dnl @category C
 
13
dnl @author YAMAMOTO Kengo <yamaken AT bp.iij4u.or.jp>
 
14
dnl @version 2006-12-12
 
15
dnl @license AllPermissive
 
16
 
 
17
AC_DEFUN([AX_C___ALIGNOF__], [
 
18
  AC_CACHE_CHECK([for __alignof__],
 
19
    [ax_cv_c___alignof__],
 
20
    [AC_COMPILE_IFELSE([[
 
21
struct _st {
 
22
  int i;
 
23
  char c;
 
24
  void *p;
 
25
};
 
26
 
 
27
int  c[__alignof__(char)];
 
28
int  s[__alignof__(short)];
 
29
int  i[__alignof__(int)];
 
30
int  l[__alignof__(long)];
 
31
int vp[__alignof__(void *)];
 
32
int st[__alignof__(struct _st)];
 
33
 
 
34
/* test whether ((__alignof__(type)) != 0) */
 
35
int  c2[((__alignof__(char))       > 0) ? 1 : -1];
 
36
int  s2[((__alignof__(short))      > 0) ? 1 : -1];
 
37
int  i2[((__alignof__(int))        > 0) ? 1 : -1];
 
38
int  l2[((__alignof__(long))       > 0) ? 1 : -1];
 
39
int vp2[((__alignof__(void *))     > 0) ? 1 : -1];
 
40
int st2[((__alignof__(struct _st)) > 0) ? 1 : -1];
 
41
 
 
42
int
 
43
f(void)
 
44
{
 
45
  short sv;
 
46
 
 
47
  return (__alignof__(sv) >= __alignof__(char));
 
48
}
 
49
      ]],
 
50
      [ax_cv_c___alignof__=yes],
 
51
      [ax_cv_c___alignof__=no])])
 
52
  if test "x$ax_cv_c___alignof__" = xyes; then
 
53
    AC_DEFINE([HAVE___ALIGNOF__], [1],
 
54
              [Define to 1 if __alignof__ operator is available.])
 
55
  fi
 
56
])