From 809e7c2dfb4c7aba7d8ed5297b0e9472a591beea Mon Sep 17 00:00:00 2001
From: John Ericson <John.Ericson@Obsidian.Systems>
Date: Sat, 6 Nov 2021 20:50:18 +0000
Subject: [PATCH] RTS configure: Move over `eventfd` check

This check is for the RTS part of the event manager and has a
corresponding part in `base`.

All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it
belongs in the RTS configure and should be safe to move without
modification.

Progress towards #17191
---
 configure.ac     | 4 ----
 rts/configure.ac | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 73cf86818337..0e6e2b1eb164 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1040,10 +1040,6 @@ AC_LINK_IFELSE([AC_LANG_CALL([], [printf\$LDBLStub])],
 
 FP_CHECK_PTHREADS
 
-dnl ** check for eventfd which is needed by the I/O manager
-AC_CHECK_HEADERS([sys/eventfd.h])
-AC_CHECK_FUNCS([eventfd])
-
 GHC_ADJUSTORS_METHOD([Target])
 AC_SUBST([UseLibffiForAdjustors])
 
diff --git a/rts/configure.ac b/rts/configure.ac
index ff9afdb6bf58..a0b9da9259c9 100644
--- a/rts/configure.ac
+++ b/rts/configure.ac
@@ -33,6 +33,10 @@ GHC_CONVERT_PLATFORM_PARTS([host], [Host])
 FPTOOLS_SET_PLATFORM_VARS([host], [Host])
 FPTOOLS_SET_HASKELL_PLATFORM_VARS([Host])
 
+dnl ** check for eventfd which is needed by the I/O manager
+AC_CHECK_HEADERS([sys/eventfd.h])
+AC_CHECK_FUNCS([eventfd])
+
 AC_CHECK_FUNCS([getpid getuid raise])
 
 dnl ** Check for __thread support in the compiler
-- 
GitLab