summaryrefslogtreecommitdiff
path: root/Build/Configure.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-01-01 16:26:43 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-01-01 16:26:43 -0400
commit7e36d7e8f63f4ea35ea8f1bc259cb4c4f013c678 (patch)
treedec173e95cf0eef8b96aaf0b9da53fa740b83564 /Build/Configure.hs
parentcd015ab0f9acb299ecf55f3ae9dd2a2c8c227bf6 (diff)
OSX: Avoid using external hash programs, since SIGILL is not fun
Diffstat (limited to 'Build/Configure.hs')
-rw-r--r--Build/Configure.hs18
1 files changed, 10 insertions, 8 deletions
diff --git a/Build/Configure.hs b/Build/Configure.hs
index 0926496f8..d255df794 100644
--- a/Build/Configure.hs
+++ b/Build/Configure.hs
@@ -1,5 +1,7 @@
{- Checks system configuration and generates SysConfig.hs. -}
+{-# LANGUAGE CPP #-}
+
module Build.Configure where
import System.Directory
@@ -53,8 +55,8 @@ tests =
, (384, "38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b")
]
-{- shaNsum are the program names used by coreutils. Some systems like OSX
- - sometimes install these with 'g' prefixes.
+{- shaNsum are the program names used by coreutils. Some systems
+ - install these with 'g' prefixes.
-
- On some systems, shaN is used instead, but on other
- systems, it might be "hashalot", which does not produce
@@ -74,13 +76,13 @@ shaTestCases l = map make l
then return $ Just c
else search cmds
- shacmds n = concatMap (\x -> [x, 'g':x, osxpath </> x]) $
+#ifndef darwin_HOST_OS
+ shacmds n = concatMap (\x -> [x, 'g':x]) $
map (\x -> "sha" ++ show n ++ x) ["sum", ""]
-
- {- Max OSX sometimes puts GNU tools outside PATH, so look in
- - the location it uses, and remember where to run them
- - from. -}
- osxpath = "/opt/local/libexec/gnubin"
+#else
+ -- OSX has had problems with gsha*sum crashing, so do not use.
+ shacmds _ = []
+#endif
tmpDir :: String
tmpDir = "tmp"