From 01961be37a0dbc3c808b06fa8c085e2faa334efe Mon Sep 17 00:00:00 2001
From: Ben Gamari <ben@smart-cactus.org>
Date: Tue, 25 Jul 2023 11:13:20 -0400
Subject: [PATCH] configure: Derive library version from ghc-prim.cabal.in

Since ghc-prim.cabal is now generated by Hadrian, we cannot depend upon
it.

Closes #23726.
---
 configure.ac | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index ab809078004e..0e0034eceb25 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1146,11 +1146,11 @@ dnl The packages below should include all packages needed by
 dnl doc/users_guide/ghc_config.py.in.
 LIBRARY_VERSION(base)
 LIBRARY_VERSION(Cabal, Cabal/Cabal/Cabal.cabal)
-dnl template-haskell.cabal is generated later
-dnl but the .in file already has the version
+dnl template-haskell.cabal and ghc-prim.cabal are generated later
+dnl by Hadrian but the .in files already have the version
 LIBRARY_VERSION(template-haskell, template-haskell/template-haskell.cabal.in)
 LIBRARY_VERSION(array)
-LIBRARY_VERSION(ghc-prim)
+LIBRARY_VERSION(ghc-prim, ghc-prim/ghc-prim.cabal.in)
 LIBRARY_VERSION(ghc-compact)
 LIBRARY_ghc_VERSION="$ProjectVersion"
 AC_SUBST(LIBRARY_ghc_VERSION)
-- 
GitLab