3 AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [
4 AC_CACHE_CHECK([whether limits.h is sane],
5 mfx_cv_header_sane_limits_h,
6 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <limits.h>
7 #if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
8 # if defined(__APPLE__) && defined(__GNUC__)
9 # error "your preprocessor is broken - use compiler option -no-cpp-precomp"
11 # include "your preprocessor is broken"
14 #define MFX_0xffff 0xffff
15 #define MFX_0xffffffffL 4294967295ul
16 #if !defined(CHAR_BIT) || (CHAR_BIT != 8)
17 # include "error CHAR_BIT"
19 #if !defined(UCHAR_MAX)
20 # include "error UCHAR_MAX 1"
22 #if !defined(USHRT_MAX)
23 # include "error USHRT_MAX 1"
25 #if !defined(UINT_MAX)
26 # include "error UINT_MAX 1"
28 #if !defined(ULONG_MAX)
29 # include "error ULONG_MAX 1"
31 #if !defined(SHRT_MAX)
32 # include "error SHRT_MAX 1"
35 # include "error INT_MAX 1"
37 #if !defined(LONG_MAX)
38 # include "error LONG_MAX 1"
41 # include "error UCHAR_MAX 2"
44 # include "error USHRT_MAX 2"
47 # include "error UINT_MAX 2"
50 # include "error ULONG_MAX 2"
52 #if (UCHAR_MAX < 0xff)
53 # include "error UCHAR_MAX 3"
55 #if (USHRT_MAX < MFX_0xffff)
56 # include "error USHRT_MAX 3"
58 #if (UINT_MAX < MFX_0xffff)
59 # include "error UINT_MAX 3"
61 #if (ULONG_MAX < MFX_0xffffffffL)
62 # include "error ULONG_MAX 3"
64 #if (USHRT_MAX > UINT_MAX)
65 # include "error USHRT_MAX vs UINT_MAX"
67 #if (UINT_MAX > ULONG_MAX)
68 # include "error UINT_MAX vs ULONG_MAX"
71 #if (USHRT_MAX == MFX_0xffff)
72 { typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; }
73 #elif (USHRT_MAX >= MFX_0xffff)
74 { typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; }
76 #if (UINT_MAX == MFX_0xffff)
77 { typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; }
78 #elif (UINT_MAX >= MFX_0xffff)
79 { typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; }
81 #if (ULONG_MAX == MFX_0xffff)
82 { typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; }
83 #elif (ULONG_MAX >= MFX_0xffff)
84 { typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; }
86 #if !defined(_CRAY1) /* CRAY PVP systems */
87 #if (USHRT_MAX == MFX_0xffffffffL)
88 { typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; }
89 #elif (USHRT_MAX >= MFX_0xffffffffL)
90 { typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; }
93 #if (UINT_MAX == MFX_0xffffffffL)
94 { typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; }
95 #elif (UINT_MAX >= MFX_0xffffffffL)
96 { typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; }
98 #if (ULONG_MAX == MFX_0xffffffffL)
99 { typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; }
100 #elif (ULONG_MAX >= MFX_0xffffffffL)
101 { typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; }
104 [mfx_cv_header_sane_limits_h=yes],
105 [mfx_cv_header_sane_limits_h=no])])
108 # /***********************************************************************
110 # ************************************************************************/
112 AC_DEFUN([mfx_LZO_CHECK_ENDIAN], [
113 AC_C_BIGENDIAN([AC_DEFINE(LZO_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(LZO_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
117 # /***********************************************************************
119 # ************************************************************************/
121 dnl more types which are not yet covered by ACC
123 AC_DEFUN([mfx_CHECK_SIZEOF], [
124 AC_CHECK_SIZEOF(__int32)
125 AC_CHECK_SIZEOF(intmax_t)
126 AC_CHECK_SIZEOF(uintmax_t)
127 AC_CHECK_SIZEOF(intptr_t)
128 AC_CHECK_SIZEOF(uintptr_t)
130 AC_CHECK_SIZEOF(float)
131 AC_CHECK_SIZEOF(double)
132 AC_CHECK_SIZEOF(long double)
134 AC_CHECK_SIZEOF(dev_t)
135 AC_CHECK_SIZEOF(fpos_t)
136 AC_CHECK_SIZEOF(mode_t)
137 AC_CHECK_SIZEOF(off_t)
138 AC_CHECK_SIZEOF(ssize_t)
139 AC_CHECK_SIZEOF(time_t)
144 AC_DEFUN([mfx_CHECK_LIB_WINMM], [
145 if test "X$GCC" = Xyes; then
147 cygwin* | mingw* | pw32*)
148 test "X$LIBS" != "X" && LIBS="$LIBS "
149 LIBS="${LIBS}-lwinmm" ;;