Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame^] | 1 | From b0c98f93a7f427d18206c79bf2a0350dc81172f6 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Thu, 6 Apr 2023 10:44:08 -0700 |
| 4 | Subject: [PATCH] configure: Replace use of AC_EGREP_CPP |
| 5 | |
| 6 | Use AC_COMPILE_IFELSE instead to compute platform support for arp ioctls |
| 7 | AC_EGREP_CPP does not work as used with upcoming autoconf 2.72 |
| 8 | |
| 9 | Upstream-Status: Submitted [https://github.com/ofalk/libdnet/pull/85] |
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 11 | --- |
| 12 | m4/acinclude.m4 | 11 +++++------ |
| 13 | 1 file changed, 5 insertions(+), 6 deletions(-) |
| 14 | |
| 15 | diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 |
| 16 | index 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 | -- |
| 38 | 2.40.0 |
| 39 | |