summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-11-23 15:46:55 +0000
committerBen Hutchings <ben@decadent.org.uk>2010-11-23 15:50:48 +0000
commit4f1d68d0b8765c11ca8ee5b7f199f05bb4380253 (patch)
tree457f39e4669f7cb429c4f3a79b52dadfd6ddcdb0 /configure.ac
parent9d6cd2ae2c62520e5d263cee1421e1dbbd20ffee (diff)
downloadethtool-4f1d68d0b8765c11ca8ee5b7f199f05bb4380253.tar.gz
ethtool: Work around old <linux/types.h> without big-endian types
Add an autoconf test for whether __be16 and __be32 are defined. If not, define them in ethtool-util.h. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f2401a4..2e31e3a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,6 +17,13 @@ dnl Checks for header files.
AC_CHECK_HEADERS(sys/ioctl.h)
dnl Checks for typedefs, structures, and compiler characteristics.
+AC_MSG_CHECKING([whether <linux/types.h> defines big-endian types])
+AC_TRY_COMPILE([#include <linux/types.h>],
+ [__be16 foo;__be32 bar;],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE([HAVE_BE_TYPES], [1],
+ [Define to 1 if <linux/types.h> defines big-endian types])],
+ [AC_MSG_RESULT(no)])
dnl Checks for library functions.
AC_HEADER_STDC