Debian Codegraph @

matio-1.5.30/config/matio_uint32_t.m4

raw
1 dnl Copyright (c) 2015-2026, The matio contributors
2 dnl Copyright (c) 2005-2014, Christopher C. Hulbert
3 dnl All rights reserved.
4 dnl
5 dnl Redistribution and use in source and binary forms, with or without
6 dnl modification, are permitted provided that the following conditions are met:
7 dnl
8 dnl 1. Redistributions of source code must retain the above copyright notice, this
9 dnl list of conditions and the following disclaimer.
10 dnl
11 dnl 2. Redistributions in binary form must reproduce the above copyright notice,
12 dnl this list of conditions and the following disclaimer in the documentation
13 dnl and/or other materials provided with the distribution.
14 dnl
15 dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 dnl DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
19 dnl FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 dnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21 dnl SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22 dnl CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23 dnl OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 AC_DEFUN([CHECK_MATIO_UINT32_T],
26 [
27 AC_MSG_CHECKING([for mat_uint32_t])
28
29 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
30 #include <stdlib.h>
31 #ifdef HAVE_INTTYPES_H
32 # include <inttypes.h>
33 #endif
34 #ifdef HAVE_STDINT_H
35 # include <stdint.h>
36 #endif
37 ]], [[uint32_t i = 0;]])],[ac_have_mat_uint32_t=yes],[ac_have_mat_uint32_t=no])
38
39 if test "x$ac_have_mat_uint32_t" = "xyes"
40 then
41 ac_have_mat_uint32_t=yes
42 AC_DEFINE_UNQUOTED([HAVE_MAT_UINT32_T],[],[Have MAT int32])
43 AC_DEFINE_UNQUOTED([_mat_uint32_t],[uint32_t],[int32 type])
44 AC_MSG_RESULT([uint32_t])
45 fi
46 if test "x$ac_have_mat_uint32_t" != "xyes"
47 then
48 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
49 #include <stdlib.h>
50 #ifdef HAVE_INTTYPES_H
51 # include <inttypes.h>
52 #endif
53 #ifdef HAVE_STDINT_H
54 # include <stdint.h>
55 #endif
56 #include <limits.h>
57 #if CHAR_BIT != 32
58 #matio sizeof(signed char) not 32 bits
59 #endif
60 ]], [[unsigned char i = 0;]])],[ac_have_mat_uint32_t=yes],[ac_have_mat_uint32_t=no])
61
62 if test "x$ac_have_mat_uint32_t" = "xyes"
63 then
64 AC_DEFINE_UNQUOTED([HAVE_MAT_UINT32_T],[],[Have MAT int32])
65 AC_DEFINE_UNQUOTED([_mat_uint32_t],[unsigned char],[int32 type])
66 AC_MSG_RESULT([unsigned char])
67 fi
68 fi
69 if test "x$ac_have_mat_uint32_t" != "xyes"
70 then
71 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
72 #include <stdlib.h>
73 #ifdef HAVE_INTTYPES_H
74 # include <inttypes.h>
75 #endif
76 #ifdef HAVE_STDINT_H
77 # include <stdint.h>
78 #endif
79 #include <limits.h>
80 #if CHAR_BIT*SIZEOF_SHORT != 32
81 #matio sizeof(short) not 32 bits
82 #endif
83 ]], [[unsigned short i = 0;]])],[ac_have_mat_uint32_t=yes],[ac_have_mat_uint32_t=no])
84
85 if test "x$ac_have_mat_uint32_t" = "xyes"
86 then
87 AC_DEFINE_UNQUOTED([HAVE_MAT_UINT32_T],[],[Have MAT int32])
88 AC_DEFINE_UNQUOTED([_mat_uint32_t],[unsigned short],[int32 type])
89 AC_MSG_RESULT([unsigned short])
90 fi
91 fi
92 if test "x$ac_have_mat_uint32_t" != "xyes"
93 then
94 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
95 #include <stdlib.h>
96 #ifdef HAVE_INTTYPES_H
97 # include <inttypes.h>
98 #endif
99 #ifdef HAVE_STDINT_H
100 # include <stdint.h>
101 #endif
102 #include <limits.h>
103 #if CHAR_BIT*SIZEOF_INT != 32
104 #matio sizeof(int) not 32 bits
105 #endif
106 ]], [[unsigned int i = 0;]])],[ac_have_mat_uint32_t=yes],[ac_have_mat_uint32_t=no])
107
108 if test "x$ac_have_mat_uint32_t" = "xyes"
109 then
110 AC_DEFINE_UNQUOTED([HAVE_MAT_UINT32_T],[],[Have MAT int32])
111 AC_DEFINE_UNQUOTED([_mat_uint32_t],[unsigned int],[int32 type])
112 AC_MSG_RESULT([unsigned int])
113 fi
114 fi
115 if test "x$ac_have_mat_uint32_t" != "xyes"
116 then
117 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
118 #include <stdlib.h>
119 #ifdef HAVE_INTTYPES_H
120 # include <inttypes.h>
121 #endif
122 #ifdef HAVE_STDINT_H
123 # include <stdint.h>
124 #endif
125 #include <limits.h>
126 #if CHAR_BIT*SIZEOF_LONG != 32
127 #matio sizeof(long) not 32 bits
128 #endif
129 ]], [[unsigned long i = 0;]])],[ac_have_mat_uint32_t=yes],[ac_have_mat_uint32_t=no])
130
131 if test "x$ac_have_mat_uint32_t" = "xyes"
132 then
133 AC_DEFINE_UNQUOTED([HAVE_MAT_UINT32_T],[],[Have MAT int32])
134 AC_DEFINE_UNQUOTED([_mat_uint32_t],[unsigned long],[int32type ])
135 AC_MSG_RESULT([unsigned long])
136 fi
137 fi
138 if test "x$ac_have_mat_uint32_t" != "xyes"
139 then
140 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
141 #include <stdlib.h>
142 #ifdef HAVE_INTTYPES_H
143 # include <inttypes.h>
144 #endif
145 #ifdef HAVE_STDINT_H
146 # include <stdint.h>
147 #endif
148 #include <limits.h>
149 #if CHAR_BIT*SIZEOF_LONG_LONG != 32
150 #matio sizeof(long long) not 32 bits
151 #endif
152 ]], [[unsigned long long i = 0;]])],[ac_have_mat_uint32_t=yes],[ac_have_mat_uint32_t=no])
153
154 if test "x$ac_have_mat_uint32_t" = "xyes"
155 then
156 AC_DEFINE_UNQUOTED([HAVE_MAT_UINT32_T],[],[Have MAT int32])
157 AC_DEFINE_UNQUOTED([_mat_uint32_t],[unsigned long long],[int32 type])
158 AC_MSG_RESULT([unsigned long long])
159 fi
160 fi
161 if test "x$ac_have_mat_uint32_t" != "xyes"
162 then
163 AC_MSG_RESULT([])
164 fi
165 ])