macos: add support for MacOS 11.0
[openafs.git] / src / cf / bswap.m4
1 AC_DEFUN([OPENAFS_BSWAP_CHECKS],[
2 dnl Stuff that's harder ...
3 AC_MSG_CHECKING([for bswap16])
4 AC_LINK_IFELSE([AC_LANG_PROGRAM([
5 #ifdef HAVE_SYS_TYPES_H
6 #include <sys/types.h>
7 #endif
8 #ifdef HAVE_SYS_BSWAP_H
9 #include <sys/bswap.h>
10 #endif
11 ],
12 [short a, b; b = bswap16(a); ])],
13 [AC_MSG_RESULT(yes)
14  AC_DEFINE(HAVE_BSWAP16, 1, [Define to 1 if you have the bswap16 function])
15 ],
16 [AC_MSG_RESULT(no)])
17
18 AC_MSG_CHECKING([for bswap32])
19 AC_LINK_IFELSE([AC_LANG_PROGRAM([#ifdef HAVE_SYS_TYPES_H
20 #include <sys/types.h>
21 #endif
22 #ifdef HAVE_SYS_BSWAP_H
23 #include <sys/bswap.h>
24 #endif
25 ],
26 [int a, b; b = bswap32(a); ])],
27 [AC_MSG_RESULT(yes)
28  AC_DEFINE(HAVE_BSWAP32, 1, [Define to 1 if you have the bswap32 function])
29 ],
30 [AC_MSG_RESULT(no)])
31 ])