@@ -95,7 +95,7 @@ import Distribution.Simple.Setup
9595 , boolOpt , boolOpt' , trueArg , falseArg
9696 , readPToMaybe , optionNumJobs )
9797import Distribution.Simple.InstallDirs
98- ( PathTemplate , InstallDirs (sysconfdir )
98+ ( PathTemplate , InstallDirs (hidir , sysconfdir )
9999 , toPathTemplate , fromPathTemplate )
100100import Distribution.Version
101101 ( Version , mkVersion , nullVersion , anyVersion , thisVersion )
@@ -379,6 +379,7 @@ filterConfigureFlags flags cabalLibVersion
379379 | cabalLibVersion < mkVersion [1 ,21 ,1 ] = flags_1_21_1
380380 | cabalLibVersion < mkVersion [1 ,22 ,0 ] = flags_1_22_0
381381 | cabalLibVersion < mkVersion [1 ,23 ,0 ] = flags_1_23_0
382+ | cabalLibVersion < mkVersion [1 ,25 ,0 ] = flags_1_25_0
382383 | otherwise = flags_latest
383384 where
384385 flags_latest = flags {
@@ -390,11 +391,15 @@ filterConfigureFlags flags cabalLibVersion
390391 configAllowNewer = Just (Cabal. AllowNewer Cabal. RelaxDepsNone )
391392 }
392393
394+ -- Cabal < 1.25 doesn't know about '--hidir'
395+ flags_1_25_0 = flags_latest { configInstallDirs = configInstallDirs_1_25_0 }
396+ configInstallDirs_1_25_0 = (configInstallDirs flags) { hidir = NoFlag }
397+
393398 -- Cabal < 1.23 doesn't know about '--profiling-detail'.
394399 -- Cabal < 1.23 has a hacked up version of 'enable-profiling'
395400 -- which we shouldn't use.
396401 (tryLibProfiling, tryExeProfiling) = computeEffectiveProfiling flags
397- flags_1_23_0 = flags_latest { configProfDetail = NoFlag
402+ flags_1_23_0 = flags_1_25_0 { configProfDetail = NoFlag
398403 , configProfLibDetail = NoFlag
399404 , configIPID = NoFlag
400405 , configProf = NoFlag
0 commit comments