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