Previous: Systemology, Up: Writing Tests [Contents][Index]
½èÍý¤Ë¤è¤Ã¤Æ¤Ï¡¤¤½¤ì¤¾¤ì°Û¤Ê¤ëUNIX¤Ë°Í¸¤·¤Æ¡¤¹Í¤¨¤é¤ì¤ë¤¤¤¯¤Ä¤«¤Î ÊýË¡¤ÇãÀ®¤µ¤ì¤ë¤â¤Î¤â¤¢¤ê¤Þ¤¹¡¥¤½¤ì¤òËܼÁŪ¤ËÄ´ºº¤¹¤ë¤¿¤á¤Ë¤Ï¡¤“case ʸ”¤¬É¬ÍפǤ¹¡¥Autoconf¤ÏľÀܤ½¤ì¤òÄ󶡤·¤Æ¤¤¤Þ¤»¤ó¡¥¤·¤«¤·¡¤¼Â¹Ô¤¹¤ë½è Íý¤¬¸«¤Ä¤«¤Ã¤¿¤«¤É¤¦¤«¤ÎÄÉÀפò³¤±¤ë¤¿¤á¡¤¥·¥§¥ëÊÑ¿ô¤ò»ÈÍѤ¹¤ë¤³¤È¤Ç´Êñ ¤Ë¥·¥ß¥å¥ì¡¼¥È²Äǽ¤Ç¤¹¡¥
»Ä¤Ã¤Æ¤¤¤ëcase¤òÄ´ºº¤¹¤ëɬÍפ¬¤¢¤ë¤«¤É¤¦¤«¤Ë´Ø·¸¤Ê¤¯ÄÉÀפò³¤±¤ë¤¿¤á¤Ë¡¤
¥·¥§¥ëÊÑ¿ôfstype
¤ò»ÈÍѤ¹¤ëÎã¤Ï¡¤°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡¥
AC_MSG_CHECKING([how to get file system type]) fstype=no # The order of these tests is important. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/statvfs.h> #include <sys/fstyp.h>]])], [AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4]) if test $fstype = no; then AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/statfs.h> #include <sys/fstyp.h>]])], [AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3]) fi if test $fstype = no; then AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/statfs.h> #include <sys/vmount.h>]])]), [AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX]) fi # (more cases omitted here) AC_MSG_RESULT([$fstype])