OpenBSD: Add support for OpenBSD 4.8
[openafs.git] / acinclude.m4
index 267785b..94376aa 100644 (file)
@@ -712,6 +712,8 @@ case $AFS_SYSNAME in
     *_obsd44)   AFS_PARAM_COMMON=param.obsd44.h  ;;
     *_obsd45)   AFS_PARAM_COMMON=param.obsd45.h  ;;
     *_obsd46)   AFS_PARAM_COMMON=param.obsd46.h  ;;
+    *_obsd47)   AFS_PARAM_COMMON=param.obsd47.h  ;;
+    *_obsd48)   AFS_PARAM_COMMON=param.obsd48.h  ;;
     *_linux22)  AFS_PARAM_COMMON=param.linux22.h ;;
     *_linux24)  AFS_PARAM_COMMON=param.linux24.h ;;
     *_linux26)  AFS_PARAM_COMMON=param.linux26.h ;;
@@ -1227,6 +1229,7 @@ AC_CHECK_HEADERS([ \
                   string.h \
                   strings.h \
                   sys/bitypes.h \
+                  sys/bswap.h \
                   sys/fcntl.h \
                   sys/file.h \
                   sys/fs_types.h \
@@ -1243,6 +1246,7 @@ AC_CHECK_HEADERS([ \
                   sys/statvfs.h \
                   sys/socket.h \
                   sys/time.h \
+                  sys/types.h \
                   sys/un.h \
                   sys/vfs.h \
                   syslog.h \
@@ -1411,6 +1415,36 @@ AS_IF([test "$ac_cv_header_err_h" != "yes" ],
       [])
 AC_SUBST(ROKEN_HEADERS)
 
+dnl Stuff that's harder ...
+AC_MSG_CHECKING([for bswap16])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_BSWAP_H
+#include <sys/bswap.h>
+#endif
+],
+[short a, b; b = bswap16(a); ])],
+[AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_BSWAP16, 1, [Define to 1 if you have the bswap16 function])
+],
+[AC_MSG_RESULT(no)])
+
+AC_MSG_CHECKING([for bswap32])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_BSWAP_H
+#include <sys/bswap.h>
+#endif
+],
+[int a, b; b = bswap32(a); ])],
+[AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_BSWAP32, 1, [Define to 1 if you have the bswap32 function])
+],
+[AC_MSG_RESULT(no)])
+
 AC_MSG_CHECKING([for positional I/O])
 if test "$ac_cv_func_pread" = "yes" && \
         test "$ac_cv_func_pwrite" = "yes"; then