aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-15 09:21:25 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-15 09:21:25 +0000
commit5460df5c7c35d1ff278150d830c7b9875663cf9d (patch)
treeef508d3284c713a6eb7ffc2e833f537cb8537b7b /configure.ac
parentc84d8b937dd22fcb3b7ede1f1c1b971edd05e0de (diff)
parent2cab479e280b8349d3a193a980c68400acb18733 (diff)
downloadethtool-2985eda801a4ea7d56f78a513571c817df9d3688.tar.gz
Snap for 11224086 from 2cab479e280b8349d3a193a980c68400acb18733 to mainline-tzdata5-releaseaml_tz5_341510070aml_tz5_341510050aml_tz5_341510010aml_tz5_341510010
Change-Id: I6a357e8402ecccb37f5f7f53757fe0ed16d74333
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac36
1 files changed, 26 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 56e4683..11efb99 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(ethtool, 5.3, netdev@vger.kernel.org)
+AC_INIT(ethtool, 6.5, netdev@vger.kernel.org)
AC_PREREQ(2.52)
+AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([ethtool.c])
-AM_INIT_AUTOMAKE([gnu])
+AM_INIT_AUTOMAKE([gnu subdir-objects])
AC_CONFIG_HEADERS([ethtool-config.h])
AM_MAINTAINER_MODE
@@ -13,22 +14,25 @@ AC_PROG_GCC_TRADITIONAL
AM_PROG_CC_C_O
PKG_PROG_PKG_CONFIG
+AC_DEFUN([AX_CHECK_STDC],
+ [AX_CHECK_COMPILE_FLAG([-std=gnu11],
+ [AX_APPEND_FLAG([-std=gnu11])],
+ [AX_CHECK_COMPILE_FLAG([-std=c11],
+ [AX_APPEND_FLAG([-std=c11])],
+ [AC_MSG_ERROR([$PACKAGE requires a C11 compiler])])
+ ])
+ ])
+AX_CHECK_STDC
+
dnl Checks for libraries.
dnl Checks for header files.
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
-AC_CHECK_FUNCS(socket strtol)
+AC_CHECK_FUNCS(socket)
dnl Check for options
AC_ARG_ENABLE(pretty-dump,
@@ -66,5 +70,17 @@ AC_SUBST([BASH_COMPLETION_DIR])
AM_CONDITIONAL([ENABLE_BASH_COMPLETION],
[test "x$with_bash_completion_dir" != xno])
+AC_ARG_ENABLE(netlink,
+ [ --enable-netlink enable netlink interface (enabled by default)],
+ ,
+ enable_netlink=yes)
+if test x$enable_netlink = xyes; then
+ PKG_PROG_PKG_CONFIG
+ PKG_CHECK_MODULES([MNL], [libmnl])
+ AC_DEFINE(ETHTOOL_ENABLE_NETLINK, 1,
+ Define this to support netlink interface to talk to kernel.)
+fi
+AM_CONDITIONAL([ETHTOOL_ENABLE_NETLINK], [test x$enable_netlink = xyes])
+
AC_CONFIG_FILES([Makefile ethtool.spec ethtool.8])
AC_OUTPUT