1*4882a593Smuzhiyun 2*4882a593SmuzhiyunAC_DEFUN([mfx_ACC_CHECK_ENDIAN], [ 3*4882a593SmuzhiyunAC_C_BIGENDIAN([AC_DEFINE(ACC_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(ACC_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])]) 4*4882a593Smuzhiyun])# 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunAC_DEFUN([mfx_ACC_CHECK_HEADERS], [ 7*4882a593SmuzhiyunAC_HEADER_TIME 8*4882a593SmuzhiyunAC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h float.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/stat.h sys/time.h sys/types.h sys/wait.h]) 9*4882a593Smuzhiyun])# 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunAC_DEFUN([mfx_ACC_CHECK_FUNCS], [ 12*4882a593SmuzhiyunAC_CHECK_FUNCS(access alloca atexit atoi atol chmod chown ctime difftime fstat gettimeofday gmtime localtime longjmp lstat memcmp memcpy memmove memset mktime qsort raise setjmp signal snprintf strcasecmp strchr strdup strerror strftime stricmp strncasecmp strnicmp strrchr strstr time umask utime vsnprintf) 13*4882a593Smuzhiyun])# 14*4882a593Smuzhiyun 15*4882a593Smuzhiyun 16*4882a593SmuzhiyunAC_DEFUN([mfx_ACC_CHECK_SIZEOF], [ 17*4882a593SmuzhiyunAC_CHECK_SIZEOF(short) 18*4882a593SmuzhiyunAC_CHECK_SIZEOF(int) 19*4882a593SmuzhiyunAC_CHECK_SIZEOF(long) 20*4882a593Smuzhiyun 21*4882a593SmuzhiyunAC_CHECK_SIZEOF(long long) 22*4882a593SmuzhiyunAC_CHECK_SIZEOF(__int16) 23*4882a593SmuzhiyunAC_CHECK_SIZEOF(__int32) 24*4882a593SmuzhiyunAC_CHECK_SIZEOF(__int64) 25*4882a593Smuzhiyun 26*4882a593SmuzhiyunAC_CHECK_SIZEOF(void *) 27*4882a593SmuzhiyunAC_CHECK_SIZEOF(size_t) 28*4882a593SmuzhiyunAC_CHECK_SIZEOF(ptrdiff_t) 29*4882a593Smuzhiyun])# 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun# /*********************************************************************** 33*4882a593Smuzhiyun# // Check for ACC_conformance 34*4882a593Smuzhiyun# ************************************************************************/ 35*4882a593Smuzhiyun 36*4882a593SmuzhiyunAC_DEFUN([mfx_ACC_ACCCHK], [ 37*4882a593Smuzhiyunmfx_tmp=$1 38*4882a593Smuzhiyunmfx_save_CPPFLAGS=$CPPFLAGS 39*4882a593Smuzhiyundnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here 40*4882a593Smuzhiyuntest "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS" 41*4882a593Smuzhiyun 42*4882a593SmuzhiyunAC_MSG_CHECKING([whether your compiler passes the ACC conformance test]) 43*4882a593Smuzhiyun 44*4882a593SmuzhiyunAC_LANG_CONFTEST([AC_LANG_PROGRAM( 45*4882a593Smuzhiyun[[#define ACC_CONFIG_NO_HEADER 1 46*4882a593Smuzhiyun#include "acc/acc.h" 47*4882a593Smuzhiyun#include "acc/acc_incd.h" 48*4882a593Smuzhiyun#undef ACCCHK_ASSERT 49*4882a593Smuzhiyun#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr) 50*4882a593Smuzhiyun#include "acc/acc_chk.ch" 51*4882a593Smuzhiyun#undef ACCCHK_ASSERT 52*4882a593Smuzhiyunstatic void test_acc_compile_time_assert(void) { 53*4882a593Smuzhiyun#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr) 54*4882a593Smuzhiyun#include "acc/acc_chk.ch" 55*4882a593Smuzhiyun#undef ACCCHK_ASSERT 56*4882a593Smuzhiyun} 57*4882a593Smuzhiyun#undef NDEBUG 58*4882a593Smuzhiyun#include <assert.h> 59*4882a593Smuzhiyunstatic int test_acc_run_time_assert(int r) { 60*4882a593Smuzhiyun#define ACCCHK_ASSERT(expr) assert(expr); 61*4882a593Smuzhiyun#include "acc/acc_chk.ch" 62*4882a593Smuzhiyun#undef ACCCHK_ASSERT 63*4882a593Smuzhiyunreturn r; 64*4882a593Smuzhiyun} 65*4882a593Smuzhiyun]], [[ 66*4882a593Smuzhiyuntest_acc_compile_time_assert(); 67*4882a593Smuzhiyunif (test_acc_run_time_assert(1) != 1) return 1; 68*4882a593Smuzhiyun]] 69*4882a593Smuzhiyun)]) 70*4882a593Smuzhiyun 71*4882a593Smuzhiyunmfx_tmp=FAILED 72*4882a593Smuzhiyun_AC_COMPILE_IFELSE([], [mfx_tmp=yes]) 73*4882a593Smuzhiyunrm -f conftest.$ac_ext conftest.$ac_objext 74*4882a593Smuzhiyun 75*4882a593SmuzhiyunCPPFLAGS=$mfx_save_CPPFLAGS 76*4882a593Smuzhiyun 77*4882a593SmuzhiyunAC_MSG_RESULT([$mfx_tmp]) 78*4882a593Smuzhiyuncase x$mfx_tmp in 79*4882a593Smuzhiyun xpassed | xyes) ;; 80*4882a593Smuzhiyun *) 81*4882a593Smuzhiyun AC_MSG_NOTICE([]) 82*4882a593Smuzhiyun AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ]) 83*4882a593Smuzhiyun AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending]) 84*4882a593Smuzhiyun AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.]) 85*4882a593Smuzhiyun AC_MSG_NOTICE([Thanks for your support.]) 86*4882a593Smuzhiyun AC_MSG_NOTICE([]) 87*4882a593Smuzhiyun AC_MSG_ERROR([ACC conformance test failed. Stop.]) 88*4882a593Smuzhiyundnl AS_EXIT 89*4882a593Smuzhiyun ;; 90*4882a593Smuzhiyunesac 91*4882a593Smuzhiyun])# mfx_ACC_ACCCHK 92*4882a593Smuzhiyun 93*4882a593Smuzhiyun 94*4882a593Smuzhiyun# /*********************************************************************** 95*4882a593Smuzhiyun# // Check for ACC_conformance 96*4882a593Smuzhiyun# ************************************************************************/ 97*4882a593Smuzhiyun 98*4882a593SmuzhiyunAC_DEFUN([mfx_MINIACC_ACCCHK], [ 99*4882a593Smuzhiyunmfx_tmp=$1 100*4882a593Smuzhiyunmfx_save_CPPFLAGS=$CPPFLAGS 101*4882a593Smuzhiyundnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here 102*4882a593Smuzhiyuntest "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS" 103*4882a593Smuzhiyun 104*4882a593SmuzhiyunAC_MSG_CHECKING([whether your compiler passes the ACC conformance test]) 105*4882a593Smuzhiyun 106*4882a593SmuzhiyunAC_LANG_CONFTEST([AC_LANG_PROGRAM( 107*4882a593Smuzhiyun[[#define ACC_CONFIG_NO_HEADER 1 108*4882a593Smuzhiyun#define ACC_WANT_ACC_INCD_H 1 109*4882a593Smuzhiyun#include $2 110*4882a593Smuzhiyun 111*4882a593Smuzhiyun#define ACC_WANT_ACC_CHK_CH 1 112*4882a593Smuzhiyun#undef ACCCHK_ASSERT 113*4882a593Smuzhiyun#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr) 114*4882a593Smuzhiyun#include $2 115*4882a593Smuzhiyun 116*4882a593Smuzhiyun#define ACC_WANT_ACC_CHK_CH 1 117*4882a593Smuzhiyun#undef ACCCHK_ASSERT 118*4882a593Smuzhiyun#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr) 119*4882a593Smuzhiyunstatic void test_acc_compile_time_assert(void) { 120*4882a593Smuzhiyun#include $2 121*4882a593Smuzhiyun} 122*4882a593Smuzhiyun 123*4882a593Smuzhiyun#undef NDEBUG 124*4882a593Smuzhiyun#include <assert.h> 125*4882a593Smuzhiyun#define ACC_WANT_ACC_CHK_CH 1 126*4882a593Smuzhiyun#undef ACCCHK_ASSERT 127*4882a593Smuzhiyun#define ACCCHK_ASSERT(expr) assert(expr); 128*4882a593Smuzhiyunstatic int test_acc_run_time_assert(int r) { 129*4882a593Smuzhiyun#include $2 130*4882a593Smuzhiyunreturn r; 131*4882a593Smuzhiyun} 132*4882a593Smuzhiyun]], [[ 133*4882a593Smuzhiyuntest_acc_compile_time_assert(); 134*4882a593Smuzhiyunif (test_acc_run_time_assert(1) != 1) return 1; 135*4882a593Smuzhiyun]] 136*4882a593Smuzhiyun)]) 137*4882a593Smuzhiyun 138*4882a593Smuzhiyunmfx_tmp=FAILED 139*4882a593Smuzhiyun_AC_COMPILE_IFELSE([], [mfx_tmp=yes]) 140*4882a593Smuzhiyunrm -f conftest.$ac_ext conftest.$ac_objext 141*4882a593Smuzhiyun 142*4882a593SmuzhiyunCPPFLAGS=$mfx_save_CPPFLAGS 143*4882a593Smuzhiyun 144*4882a593SmuzhiyunAC_MSG_RESULT([$mfx_tmp]) 145*4882a593Smuzhiyuncase x$mfx_tmp in 146*4882a593Smuzhiyun xpassed | xyes) ;; 147*4882a593Smuzhiyun *) 148*4882a593Smuzhiyun AC_MSG_NOTICE([]) 149*4882a593Smuzhiyun AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ]) 150*4882a593Smuzhiyun AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending]) 151*4882a593Smuzhiyun AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.]) 152*4882a593Smuzhiyun AC_MSG_NOTICE([Thanks for your support.]) 153*4882a593Smuzhiyun AC_MSG_NOTICE([]) 154*4882a593Smuzhiyun AC_MSG_ERROR([ACC conformance test failed. Stop.]) 155*4882a593Smuzhiyundnl AS_EXIT 156*4882a593Smuzhiyun ;; 157*4882a593Smuzhiyunesac 158*4882a593Smuzhiyun])# mfx_MINIACC_ACCCHK 159*4882a593Smuzhiyun 160*4882a593Smuzhiyun 161*4882a593Smuzhiyun 162*4882a593Smuzhiyun# serial 1 163*4882a593Smuzhiyun 164*4882a593SmuzhiyunAC_DEFUN([mfx_PROG_CPPFLAGS], [ 165*4882a593SmuzhiyunAC_MSG_CHECKING([whether the C preprocessor needs special flags]) 166*4882a593Smuzhiyun 167*4882a593SmuzhiyunAC_LANG_CONFTEST([AC_LANG_PROGRAM( 168*4882a593Smuzhiyun[[#include <limits.h> 169*4882a593Smuzhiyun#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul) 170*4882a593Smuzhiyun# include "your C preprocessor is broken 1" 171*4882a593Smuzhiyun#elif (0xffffu == 0xfffffffful) 172*4882a593Smuzhiyun# include "your C preprocessor is broken 2" 173*4882a593Smuzhiyun#elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX) 174*4882a593Smuzhiyun# include "your C preprocessor is broken 3" 175*4882a593Smuzhiyun#endif 176*4882a593Smuzhiyun]], [[ ]] 177*4882a593Smuzhiyun)]) 178*4882a593Smuzhiyun 179*4882a593Smuzhiyunmfx_save_CPPFLAGS=$CPPFLAGS 180*4882a593Smuzhiyunmfx_tmp=ERROR 181*4882a593Smuzhiyunfor mfx_arg in "" -no-cpp-precomp 182*4882a593Smuzhiyundo 183*4882a593Smuzhiyun CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS" 184*4882a593Smuzhiyun _AC_COMPILE_IFELSE([], 185*4882a593Smuzhiyun[mfx_tmp=$mfx_arg 186*4882a593Smuzhiyunbreak]) 187*4882a593Smuzhiyundone 188*4882a593SmuzhiyunCPPFLAGS=$mfx_save_CPPFLAGS 189*4882a593Smuzhiyunrm -f conftest.$ac_ext conftest.$ac_objext 190*4882a593Smuzhiyuncase x$mfx_tmp in 191*4882a593Smuzhiyun x) 192*4882a593Smuzhiyun AC_MSG_RESULT([none needed]) ;; 193*4882a593Smuzhiyun xERROR) 194*4882a593Smuzhiyun AC_MSG_RESULT([ERROR]) 195*4882a593Smuzhiyun AC_MSG_ERROR([your C preprocessor is broken - for details see config.log]) 196*4882a593Smuzhiyun ;; 197*4882a593Smuzhiyun *) 198*4882a593Smuzhiyun AC_MSG_RESULT([$mfx_tmp]) 199*4882a593Smuzhiyun CPPFLAGS="$mfx_tmp $CPPFLAGS" 200*4882a593Smuzhiyun ;; 201*4882a593Smuzhiyunesac 202*4882a593Smuzhiyun])# mfx_PROG_CPPFLAGS 203*4882a593Smuzhiyun 204*4882a593Smuzhiyun 205*4882a593Smuzhiyun 206*4882a593Smuzhiyun# serial 3 207*4882a593Smuzhiyun 208*4882a593SmuzhiyunAC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [ 209*4882a593SmuzhiyunAC_CACHE_CHECK([whether limits.h is sane], 210*4882a593Smuzhiyunmfx_cv_header_sane_limits_h, 211*4882a593Smuzhiyun[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <limits.h> 212*4882a593Smuzhiyun#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul) 213*4882a593Smuzhiyun# if defined(__APPLE__) && defined(__GNUC__) 214*4882a593Smuzhiyun# error "your preprocessor is broken - use compiler option -no-cpp-precomp" 215*4882a593Smuzhiyun# else 216*4882a593Smuzhiyun# include "your preprocessor is broken" 217*4882a593Smuzhiyun# endif 218*4882a593Smuzhiyun#endif 219*4882a593Smuzhiyun#define MFX_0xffff 0xffff 220*4882a593Smuzhiyun#define MFX_0xffffffffL 4294967295ul 221*4882a593Smuzhiyun#if !defined(CHAR_BIT) || (CHAR_BIT != 8) 222*4882a593Smuzhiyun# include "error CHAR_BIT" 223*4882a593Smuzhiyun#endif 224*4882a593Smuzhiyun#if !defined(UCHAR_MAX) 225*4882a593Smuzhiyun# include "error UCHAR_MAX 1" 226*4882a593Smuzhiyun#endif 227*4882a593Smuzhiyun#if !defined(USHRT_MAX) 228*4882a593Smuzhiyun# include "error USHRT_MAX 1" 229*4882a593Smuzhiyun#endif 230*4882a593Smuzhiyun#if !defined(UINT_MAX) 231*4882a593Smuzhiyun# include "error UINT_MAX 1" 232*4882a593Smuzhiyun#endif 233*4882a593Smuzhiyun#if !defined(ULONG_MAX) 234*4882a593Smuzhiyun# include "error ULONG_MAX 1" 235*4882a593Smuzhiyun#endif 236*4882a593Smuzhiyun#if !defined(SHRT_MAX) 237*4882a593Smuzhiyun# include "error SHRT_MAX 1" 238*4882a593Smuzhiyun#endif 239*4882a593Smuzhiyun#if !defined(INT_MAX) 240*4882a593Smuzhiyun# include "error INT_MAX 1" 241*4882a593Smuzhiyun#endif 242*4882a593Smuzhiyun#if !defined(LONG_MAX) 243*4882a593Smuzhiyun# include "error LONG_MAX 1" 244*4882a593Smuzhiyun#endif 245*4882a593Smuzhiyun#if (UCHAR_MAX < 1) 246*4882a593Smuzhiyun# include "error UCHAR_MAX 2" 247*4882a593Smuzhiyun#endif 248*4882a593Smuzhiyun#if (USHRT_MAX < 1) 249*4882a593Smuzhiyun# include "error USHRT_MAX 2" 250*4882a593Smuzhiyun#endif 251*4882a593Smuzhiyun#if (UINT_MAX < 1) 252*4882a593Smuzhiyun# include "error UINT_MAX 2" 253*4882a593Smuzhiyun#endif 254*4882a593Smuzhiyun#if (ULONG_MAX < 1) 255*4882a593Smuzhiyun# include "error ULONG_MAX 2" 256*4882a593Smuzhiyun#endif 257*4882a593Smuzhiyun#if (UCHAR_MAX < 0xff) 258*4882a593Smuzhiyun# include "error UCHAR_MAX 3" 259*4882a593Smuzhiyun#endif 260*4882a593Smuzhiyun#if (USHRT_MAX < MFX_0xffff) 261*4882a593Smuzhiyun# include "error USHRT_MAX 3" 262*4882a593Smuzhiyun#endif 263*4882a593Smuzhiyun#if (UINT_MAX < MFX_0xffff) 264*4882a593Smuzhiyun# include "error UINT_MAX 3" 265*4882a593Smuzhiyun#endif 266*4882a593Smuzhiyun#if (ULONG_MAX < MFX_0xffffffffL) 267*4882a593Smuzhiyun# include "error ULONG_MAX 3" 268*4882a593Smuzhiyun#endif 269*4882a593Smuzhiyun#if (USHRT_MAX > UINT_MAX) 270*4882a593Smuzhiyun# include "error USHRT_MAX vs UINT_MAX" 271*4882a593Smuzhiyun#endif 272*4882a593Smuzhiyun#if (UINT_MAX > ULONG_MAX) 273*4882a593Smuzhiyun# include "error UINT_MAX vs ULONG_MAX" 274*4882a593Smuzhiyun#endif 275*4882a593Smuzhiyun]], [[ 276*4882a593Smuzhiyun#if (USHRT_MAX == MFX_0xffff) 277*4882a593Smuzhiyun{ typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; } 278*4882a593Smuzhiyun#elif (USHRT_MAX >= MFX_0xffff) 279*4882a593Smuzhiyun{ typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; } 280*4882a593Smuzhiyun#endif 281*4882a593Smuzhiyun#if (UINT_MAX == MFX_0xffff) 282*4882a593Smuzhiyun{ typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; } 283*4882a593Smuzhiyun#elif (UINT_MAX >= MFX_0xffff) 284*4882a593Smuzhiyun{ typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; } 285*4882a593Smuzhiyun#endif 286*4882a593Smuzhiyun#if (ULONG_MAX == MFX_0xffff) 287*4882a593Smuzhiyun{ typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; } 288*4882a593Smuzhiyun#elif (ULONG_MAX >= MFX_0xffff) 289*4882a593Smuzhiyun{ typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; } 290*4882a593Smuzhiyun#endif 291*4882a593Smuzhiyun#if (USHRT_MAX == MFX_0xffffffffL) 292*4882a593Smuzhiyun{ typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; } 293*4882a593Smuzhiyun#elif (USHRT_MAX >= MFX_0xffffffffL) 294*4882a593Smuzhiyun{ typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; } 295*4882a593Smuzhiyun#endif 296*4882a593Smuzhiyun#if (UINT_MAX == MFX_0xffffffffL) 297*4882a593Smuzhiyun{ typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; } 298*4882a593Smuzhiyun#elif (UINT_MAX >= MFX_0xffffffffL) 299*4882a593Smuzhiyun{ typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; } 300*4882a593Smuzhiyun#endif 301*4882a593Smuzhiyun#if (ULONG_MAX == MFX_0xffffffffL) 302*4882a593Smuzhiyun{ typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; } 303*4882a593Smuzhiyun#elif (ULONG_MAX >= MFX_0xffffffffL) 304*4882a593Smuzhiyun{ typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; } 305*4882a593Smuzhiyun#endif 306*4882a593Smuzhiyun]])], 307*4882a593Smuzhiyun[mfx_cv_header_sane_limits_h=yes], 308*4882a593Smuzhiyun[mfx_cv_header_sane_limits_h=no])]) 309*4882a593Smuzhiyun]) 310*4882a593Smuzhiyun 311*4882a593Smuzhiyun# /*********************************************************************** 312*4882a593Smuzhiyun# // standard 313*4882a593Smuzhiyun# ************************************************************************/ 314*4882a593Smuzhiyun 315*4882a593SmuzhiyunAC_DEFUN([mfx_LZO_CHECK_ENDIAN], [ 316*4882a593SmuzhiyunAC_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.])]) 317*4882a593Smuzhiyun])# 318*4882a593Smuzhiyun 319*4882a593Smuzhiyun 320*4882a593Smuzhiyun# /*********************************************************************** 321*4882a593Smuzhiyun# // 322*4882a593Smuzhiyun# ************************************************************************/ 323*4882a593Smuzhiyun 324*4882a593Smuzhiyundnl more types which are not yet covered by ACC 325*4882a593Smuzhiyun 326*4882a593SmuzhiyunAC_DEFUN([mfx_CHECK_SIZEOF], [ 327*4882a593SmuzhiyunAC_CHECK_SIZEOF(__int32) 328*4882a593SmuzhiyunAC_CHECK_SIZEOF(intmax_t) 329*4882a593SmuzhiyunAC_CHECK_SIZEOF(uintmax_t) 330*4882a593SmuzhiyunAC_CHECK_SIZEOF(intptr_t) 331*4882a593SmuzhiyunAC_CHECK_SIZEOF(uintptr_t) 332*4882a593Smuzhiyun 333*4882a593SmuzhiyunAC_CHECK_SIZEOF(float) 334*4882a593SmuzhiyunAC_CHECK_SIZEOF(double) 335*4882a593SmuzhiyunAC_CHECK_SIZEOF(long double) 336*4882a593Smuzhiyun 337*4882a593SmuzhiyunAC_CHECK_SIZEOF(dev_t) 338*4882a593SmuzhiyunAC_CHECK_SIZEOF(fpos_t) 339*4882a593SmuzhiyunAC_CHECK_SIZEOF(mode_t) 340*4882a593SmuzhiyunAC_CHECK_SIZEOF(off_t) 341*4882a593SmuzhiyunAC_CHECK_SIZEOF(ssize_t) 342*4882a593SmuzhiyunAC_CHECK_SIZEOF(time_t) 343*4882a593Smuzhiyun])# 344*4882a593Smuzhiyun 345*4882a593Smuzhiyun 346*4882a593Smuzhiyun 347*4882a593SmuzhiyunAC_DEFUN([mfx_CHECK_LIB_WINMM], [ 348*4882a593Smuzhiyunif test "X$GCC" = Xyes; then 349*4882a593Smuzhiyuncase $host_os in 350*4882a593Smuzhiyuncygwin* | mingw* | pw32*) 351*4882a593Smuzhiyun test "X$LIBS" != "X" && LIBS="$LIBS " 352*4882a593Smuzhiyun LIBS="${LIBS}-lwinmm" ;; 353*4882a593Smuzhiyun*) 354*4882a593Smuzhiyun ;; 355*4882a593Smuzhiyunesac 356*4882a593Smuzhiyunfi 357*4882a593Smuzhiyun])# 358*4882a593Smuzhiyun 359*4882a593Smuzhiyun#serial 6 360*4882a593Smuzhiyun 361*4882a593Smuzhiyundnl From Paul Eggert. 362*4882a593Smuzhiyun 363*4882a593Smuzhiyun# Define ST_MTIM_NSEC to be the nanoseconds member of struct stat's st_mtim, 364*4882a593Smuzhiyun# if it exists. 365*4882a593Smuzhiyun 366*4882a593SmuzhiyunAC_DEFUN([AC_STRUCT_ST_MTIM_NSEC], 367*4882a593Smuzhiyun [AC_CACHE_CHECK([for nanoseconds member of struct stat.st_mtim], 368*4882a593Smuzhiyun ac_cv_struct_st_mtim_nsec, 369*4882a593Smuzhiyun [ac_save_CPPFLAGS="$CPPFLAGS" 370*4882a593Smuzhiyun ac_cv_struct_st_mtim_nsec=no 371*4882a593Smuzhiyun # tv_nsec -- the usual case 372*4882a593Smuzhiyun # _tv_nsec -- Solaris 2.6, if 373*4882a593Smuzhiyun # (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1 374*4882a593Smuzhiyun # && !defined __EXTENSIONS__) 375*4882a593Smuzhiyun # st__tim.tv_nsec -- UnixWare 2.1.2 376*4882a593Smuzhiyun for ac_val in tv_nsec _tv_nsec st__tim.tv_nsec; do 377*4882a593Smuzhiyun CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val" 378*4882a593Smuzhiyun AC_TRY_COMPILE([#include <sys/types.h> 379*4882a593Smuzhiyun#include <sys/stat.h>], [struct stat s; s.st_mtim.ST_MTIM_NSEC;], 380*4882a593Smuzhiyun [ac_cv_struct_st_mtim_nsec=$ac_val; break]) 381*4882a593Smuzhiyun done 382*4882a593Smuzhiyun CPPFLAGS="$ac_save_CPPFLAGS"]) 383*4882a593Smuzhiyun 384*4882a593Smuzhiyun if test $ac_cv_struct_st_mtim_nsec != no; then 385*4882a593Smuzhiyun AC_DEFINE_UNQUOTED(ST_MTIM_NSEC, $ac_cv_struct_st_mtim_nsec, 386*4882a593Smuzhiyun [Define to be the nanoseconds member of struct stat's st_mtim, 387*4882a593Smuzhiyun if it exists.]) 388*4882a593Smuzhiyun fi 389*4882a593Smuzhiyun ] 390*4882a593Smuzhiyun) 391