| 724 | | AC_CHECK_HEADERS(unistd.h fcntl.h malloc.h stddef.h) |
| 725 | | # |
| | 724 | AC_CHECK_HEADERS([unistd.h fcntl.h malloc.h stddef.h sys/types.h]) |
| | 725 | # |
| | 726 | |
| | 727 | # When compiling ROMIO on Darwin with _POSIX_C_SOURCE defined (such as when |
| | 728 | # using --enable-strict in MPICH2), sys/types.h does not define u_short and |
| | 729 | # friends unless _DARWIN_C_SOURCE is also defined (see compat(5) on a Darwin |
| | 730 | # box). This would normally be fine, except sys/stat.h defines struct stat to |
| | 731 | # use u_long, so strict compiles fail. One option is to also compile with |
| | 732 | # _DARWIN_C_SOURCE, but this disables much of the strictness that is intended |
| | 733 | # by _POSIX_C_SOURCE. Instead we just define our own types if they are not |
| | 734 | # provided by the system. This isn't quite as safe as typedef'ing the |
| | 735 | # replacement types, but it will apply to later configure tests, which is |
| | 736 | # important. |
| | 737 | AC_CHECK_TYPE([u_char],[],[AC_DEFINE_UNQUOTED([u_char],[unsigned char],[Define to "unsigned char" if sys/types.h does not define.])]) |
| | 738 | AC_CHECK_TYPE([u_short],[],[AC_DEFINE_UNQUOTED([u_short],[unsigned short],[Define to "unsigned short" if sys/types.h does not define.])]) |
| | 739 | AC_CHECK_TYPE([u_int],[],[AC_DEFINE_UNQUOTED([u_int],[unsigned int],[Define to "unsigned int" if sys/types.h does not define.])]) |
| | 740 | AC_CHECK_TYPE([u_long],[],[AC_DEFINE_UNQUOTED([u_long],[unsigned long],[Define to "unsigned long" if sys/types.h does not define.])]) |
| | 741 | |
| | 742 | # must come _after_ the above checks for u_char/u_short/u_int/u_long |
| | 743 | AC_CHECK_HEADERS([sys/attr.h]) |
| | 744 | |