haskell-leksah-server (0.8.0.6-3) threaded_flag.cabal

Summary

 leksah-server.cabal |   21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

    
download this patch

Patch contents

Index: haskell-leksah-server-0.8.0.6/leksah-server.cabal
===================================================================
--- haskell-leksah-server-0.8.0.6.orig/leksah-server.cabal	2010-08-23 08:00:19.000000000 -0300
+++ haskell-leksah-server-0.8.0.6/leksah-server.cabal	2010-08-23 10:39:32.000000000 -0300
@@ -26,6 +26,10 @@
     Default: False
     Description: Use libcurl instead of running wget
 
+flag threaded
+    default: True
+    description: Build with support for multithreaded execution
+
 library
     build-depends: Cabal >=1.6.0.1, base >= 4.0.0.0 && <= 5, binary >=0.5.0.0,
                binary-shared >=0.8, bytestring >=0.9.0.1, containers >=0.2.0.0,
@@ -112,10 +116,14 @@
         IDE.Metainfo.WorkspaceCollector IDE.Metainfo.InterfaceCollector
         IDE.Metainfo.SourceCollectorH IDE.Metainfo.SourceDB IDE.Utils.Tool
         IDE.HeaderParser IDE.Metainfo.PackageCollector
-    if (impl(ghc >= 6.12))
-       ghc-options: -Wall -fno-warn-unused-do-bind -ferror-spans -threaded -O2
+
+    if flag(threaded)
+        ghc-options: -threaded
+
+    if impl(ghc >= 6.12)
+        ghc-options: -Wall -fno-warn-unused-do-bind -ferror-spans -O2
     else
-       ghc-options: -Wall -ferror-spans -threaded -O2
+        ghc-options: -Wall -ferror-spans -O2
     ghc-prof-options: -auto-all -prof
 
     -- Bundled leksah-process
@@ -132,10 +140,13 @@
     hs-source-dirs: src
     ghc-prof-options: -auto-all -prof
     ghc-shared-options: -auto-all -prof
+    if flag(threaded)
+        ghc-options: -threaded
+
     if (impl(ghc >= 6.12))
-       ghc-options: -Wall -fno-warn-unused-do-bind -ferror-spans -threaded -O2
+       ghc-options: -Wall -fno-warn-unused-do-bind -ferror-spans -O2
     else
-       ghc-options: -Wall -ferror-spans -threaded -O2
+       ghc-options: -Wall -ferror-spans -O2
 
     -- Bundled leksah-process
     c-sources: