From c74c4f00a977941dd09d814bffba99e2881b1cf4 Mon Sep 17 00:00:00 2001
From: John Ericson <John.Ericson@Obsidian.Systems>
Date: Fri, 5 Nov 2021 04:31:03 +0000
Subject: [PATCH] Move apple compat check to RTS configure

---
 configure.ac     | 14 --------------
 rts/configure.ac | 14 ++++++++++++++
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/configure.ac b/configure.ac
index addde578ad0e..289a6a5776a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1021,20 +1021,6 @@ fi
 AC_CHECK_FUNCS(clock_gettime timer_settime)
 FP_CHECK_TIMER_CREATE
 
-dnl ** check for Apple's "interesting" long double compatibility scheme
-AC_MSG_CHECKING(for printf\$LDBLStub)
-AC_LINK_IFELSE([AC_LANG_CALL([], [printf\$LDBLStub])],
-    [
-        AC_MSG_RESULT(yes)
-        AC_DEFINE([HAVE_PRINTF_LDBLSTUB],[1],
-            [Define to 1 if we have printf$LDBLStub (Apple Mac OS >= 10.4, PPC).])
-    ],
-    [
-        AC_MSG_RESULT(no)
-        AC_DEFINE([HAVE_PRINTF_LDBLSTUB],[0],
-            [Define to 1 if we have printf$LDBLStub (Apple Mac OS >= 10.4, PPC).])
-    ])
-
 FP_CHECK_PTHREAD_LIB
 AC_SUBST([UseLibpthread])
 
diff --git a/rts/configure.ac b/rts/configure.ac
index 6500e828ac52..cbf57b924150 100644
--- a/rts/configure.ac
+++ b/rts/configure.ac
@@ -33,6 +33,20 @@ GHC_CONVERT_PLATFORM_PARTS([host], [Host])
 FPTOOLS_SET_PLATFORM_VARS([host], [Host])
 FPTOOLS_SET_HASKELL_PLATFORM_VARS([Host])
 
+dnl ** check for Apple's "interesting" long double compatibility scheme
+AC_MSG_CHECKING(for printf\$LDBLStub)
+AC_LINK_IFELSE([AC_LANG_CALL([], [printf\$LDBLStub])],
+    [
+        AC_MSG_RESULT(yes)
+        AC_DEFINE([HAVE_PRINTF_LDBLSTUB],[1],
+            [Define to 1 if we have printf$LDBLStub (Apple Mac OS >= 10.4, PPC).])
+    ],
+    [
+        AC_MSG_RESULT(no)
+        AC_DEFINE([HAVE_PRINTF_LDBLSTUB],[0],
+            [Define to 1 if we have printf$LDBLStub (Apple Mac OS >= 10.4, PPC).])
+    ])
+
 FP_CHECK_PTHREAD_FUNCS
 
 dnl ** check for eventfd which is needed by the I/O manager
-- 
GitLab