From 2c2645d7a8b0498d7b581eae709e0f2ba51dcfe6 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Sun, 18 Apr 2021 23:44:36 -0400
Subject: sim: switch to AC_CHECK_HEADERS_ONCE

This avoids duplicate tests for headers between common m4, arches,
and any other sources that would trigger header tests.
---
 sim/m4/sim_ac_common.m4 | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

(limited to 'sim/m4')

diff --git a/sim/m4/sim_ac_common.m4 b/sim/m4/sim_ac_common.m4
index 7845142..3cc9e87 100644
--- a/sim/m4/sim_ac_common.m4
+++ b/sim/m4/sim_ac_common.m4
@@ -52,10 +52,17 @@ ZW_GNU_GETTEXT_SISTER_DIR(../../intl)
 
 # Check for common headers.
 # NB: You can assume C11 headers exist.
-AC_CHECK_HEADERS(unistd.h)
-AC_CHECK_HEADERS(sys/time.h sys/times.h sys/resource.h sys/mman.h)
-AC_CHECK_HEADERS(fcntl.h fpu_control.h)
-AC_CHECK_HEADERS(dlfcn.h sys/stat.h)
+AC_CHECK_HEADERS_ONCE(m4_flatten([
+  dlfcn.h
+  fcntl.h
+  fpu_control.h
+  unistd.h
+  sys/mman.h
+  sys/resource.h
+  sys/time.h
+  sys/times.h
+  sys/stat.h
+]))
 AC_CHECK_FUNCS_ONCE(m4_flatten([
   __setfpucw
   ftruncate
-- 
cgit v1.1