on master help sign in
Merge pull request #766 from markuspf/dragonfly

DragonFly support

commit7b7993a29e0fc1f03e33c653df9b020ef659980e authorEdwin Brady <edwin.brady@gmail.com> dateMon 6 Jan 2014, 15:32 (13 years ago) parentb02f954ea08a2e
4 files changed+8−3
Setup.hs+1−1 idris.cabal+3 src/IRTS/System.hs+2−2 src/Util/DynamicLinker.hs+2
Setup.hs+1−1
@@ -38,7 +38,7 @@ idrisCmd local = ".." </> ".." </> buildDir local </> "idris" </> "idris"
3838-- Make Commands
3939
4040-- use GNU make on FreeBSD
41−#ifdef freebsd_HOST_OS
41+#if defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS)
4242mymake = "gmake"
4343#else
4444mymake = "make"
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"