Debian Codegraph @

matio-1.5.0/config/matio_uint16_t.m4

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