blob: 133ccc46b2af3d4d3c8d407c7475640943b39852 [file] [log] [blame]
Patrick Williams8e7b46e2023-05-01 14:19:06 -05001From b0c98f93a7f427d18206c79bf2a0350dc81172f6 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 6 Apr 2023 10:44:08 -0700
4Subject: [PATCH] configure: Replace use of AC_EGREP_CPP
5
6Use AC_COMPILE_IFELSE instead to compute platform support for arp ioctls
7AC_EGREP_CPP does not work as used with upcoming autoconf 2.72
8
9Upstream-Status: Submitted [https://github.com/ofalk/libdnet/pull/85]
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 m4/acinclude.m4 | 11 +++++------
13 1 file changed, 5 insertions(+), 6 deletions(-)
14
15diff --git a/m4/acinclude.m4 b/m4/acinclude.m4
16index d6350a2..3699bf1 100644
17--- a/m4/acinclude.m4
18+++ b/m4/acinclude.m4
19@@ -196,12 +196,11 @@ dnl
20 AC_DEFUN([AC_DNET_IOCTL_ARP],
21 [AC_MSG_CHECKING(for arp(7) ioctls)
22 AC_CACHE_VAL(ac_cv_dnet_ioctl_arp,
23- AC_EGREP_CPP(werd,[#include <sys/types.h>
24- #define BSD_COMP
25- #include <sys/ioctl.h>
26- #ifdef SIOCGARP
27- werd
28- #endif],
29+ AC_COMPILE_IFELSE(
30+ [AC_LANG_PROGRAM([[#include <sys/types.h>
31+ #define BSD_COMP
32+ #include <sys/ioctl.h>]],
33+ [[int foo = SIOCGARP;]])],
34 ac_cv_dnet_ioctl_arp=yes,
35 ac_cv_dnet_ioctl_arp=no))
36 case "$host_os" in
37--
382.40.0
39