1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
--- configure.ac.orig 2009-08-27 17:37:12.000000000 +0200
+++ configure.ac 2009-09-29 20:32:39.000000000 +0200
@@ -476,7 +476,7 @@ AC_CHECK_HEADERS([fcntl.h limits.h sys/t
[AC_MSG_ERROR([Required header file(s) are missing.])])
# If any of these headers are missing, things should still work correctly:
-AC_CHECK_HEADERS([sys/param.h sys/sysctl.h byteswap.h],
+AC_CHECK_HEADERS([sys/param.h sys/sysctl.h byteswap.h sys/endian.h],
[], [], [
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
@@ -504,6 +504,25 @@ main(void)
])dnl
fi
+if test x$ac_cv_header_sys_endian_h = xyes ; then
+ m4_foreach([FUNC], [bswap16,bswap32,bswap64], [
+ AC_MSG_CHECKING([if FUNC is available])
+ AC_LINK_IFELSE([AC_LANG_SOURCE([
+#include <sys/endian.h>
+int
+main(void)
+{
+ FUNC[](42);
+ return 0;
+}
+ ])], [
+ AC_DEFINE(HAVE_[]m4_toupper(FUNC), [1],
+ [Define to 1 if] FUNC [is available.])
+ AC_MSG_RESULT([yes])
+ ], [AC_MSG_RESULT([no])])
+
+ ])dnl
+fi
###############################################################################
# Checks for typedefs, structures, and compiler characteristics.
|