on master help sign in
Add more ifdefs for DragonFly
ea08a2eMarkus Pfeiffer
idris.cabal+3
@@ -453,6 +453,9 @@ Library
453 if os(freebsd)
453 if os(freebsd)
454 cpp-options: -DFREEBSD
454 cpp-options: -DFREEBSD
455 build-depends: unix
455 build-depends: unix
456+ if os(dragonfly)
457+ cpp-options: -DDRAGONFLY
458+ build-depends: unix
456 if os(darwin)
459 if os(darwin)
457 cpp-options: -DMACOSX
460 cpp-options: -DMACOSX
458 build-depends: unix
461 build-depends: unix
src/IRTS/System.hs+2−2
@@ -32,7 +32,7 @@ environment x = catchIO (do e <- getEnv x
32getTargetDir :: IO String
32getTargetDir :: IO String
33getTargetDir = environment "TARGET" >>= maybe getDataDir return
33getTargetDir = environment "TARGET" >>= maybe getDataDir return
34
34
35−#ifdef FREEBSD
35+#if defined(FREEBSD) || defined(DRAGONFLY)
36extraLib = " -L/usr/local/lib"
36extraLib = " -L/usr/local/lib"
37#else
37#else
38extraLib = ""
38extraLib = ""
@@ -51,7 +51,7 @@ getLibFlags = do dir <- getDataDir
51getIdrisLibDir = do dir <- getDataDir
51getIdrisLibDir = do dir <- getDataDir
52 return $ addTrailingPathSeparator dir
52 return $ addTrailingPathSeparator dir
53
53
54−#ifdef FREEBSD
54+#if defined(FREEBSD) || defined(DRAGONFLY)
55extraInclude = " -I/usr/local/include"
55extraInclude = " -I/usr/local/include"
56#else
56#else
57extraInclude = ""
57extraInclude = ""
src/Util/DynamicLinker.hs+2
@@ -24,6 +24,8 @@ hostDynamicLibExt = "dylib"
24hostDynamicLibExt = "dll"
24hostDynamicLibExt = "dll"
25#elif FREEBSD
25#elif FREEBSD
26hostDynamicLibExt = "so"
26hostDynamicLibExt = "so"
27+#elif DRAGONFLY
28+hostDynamicLibExt = "so"
27#else
29#else
28hostDynamicLibExt = error $ unwords
30hostDynamicLibExt = error $ unwords
29 [ "Undefined file extension for dynamic libraries"
31 [ "Undefined file extension for dynamic libraries"