on master help sign in
Add more ifdefs for DragonFly
commitea08a2e5e6b3e851a1b243cd380b1a6e361f5c7d authorMarkus Pfeiffer <markus.pfeiffer@morphism.de> dateSun 5 Jan 2014, 16:57 (13 years ago) parent7da9a4e
3 files changed+7−2
idris.cabal+3 src/IRTS/System.hs+2−2 src/Util/DynamicLinker.hs+2
idris.cabal+3
@@ -453,6 +453,9 @@ Library
453453 if os(freebsd)
454454 cpp-options: -DFREEBSD
455455 build-depends: unix
456+ if os(dragonfly)
457+ cpp-options: -DDRAGONFLY
458+ build-depends: unix
456459 if os(darwin)
457460 cpp-options: -DMACOSX
458461 build-depends: unix
src/IRTS/System.hs+2−2
@@ -32,7 +32,7 @@ environment x = catchIO (do e <- getEnv x
3232getTargetDir :: IO String
3333getTargetDir = environment "TARGET" >>= maybe getDataDir return
3434
35−#ifdef FREEBSD
35+#if defined(FREEBSD) || defined(DRAGONFLY)
3636extraLib = " -L/usr/local/lib"
3737#else
3838extraLib = ""
@@ -51,7 +51,7 @@ getLibFlags = do dir <- getDataDir
5151getIdrisLibDir = do dir <- getDataDir
5252 return $ addTrailingPathSeparator dir
5353
54−#ifdef FREEBSD
54+#if defined(FREEBSD) || defined(DRAGONFLY)
5555extraInclude = " -I/usr/local/include"
5656#else
5757extraInclude = ""
src/Util/DynamicLinker.hs+2
@@ -24,6 +24,8 @@ hostDynamicLibExt = "dylib"
2424hostDynamicLibExt = "dll"
2525#elif FREEBSD
2626hostDynamicLibExt = "so"
27+#elif DRAGONFLY
28+hostDynamicLibExt = "so"
2729#else
2830hostDynamicLibExt = error $ unwords
2931 [ "Undefined file extension for dynamic libraries"