AC_DEFUN(MP_GET_BLKSIZE, [ AC_MSG_CHECKING([file I/O block size]) AC_CACHE_VAL(mp_cv_var_st_blksize, [ >conftesttmp AC_TRY_RUN([ #include #include #include #ifdef HAVE_UNISTD_H # include #endif main() { struct stat statbuf; FILE *f; if (! (f = fopen("conftestval", "w"))) exit(1); if (stat("conftesttmp", &statbuf) == -1) exit(1); fprintf(f, "%d", statbuf.st_blksize); exit(0); }], [mp_cv_var_st_blksize=`cat conftestval`], [mp_cv_var_st_blksize=""])]) if test x"${mp_cv_var_st_blksize}" = x; then mp_cv_var_st_blksize=4096 AC_MSG_RESULT([Couldn't get block size, setting it to 4096]) else AC_MSG_RESULT($mp_cv_var_st_blksize) fi ]) .