From 9d71ffc831164c7cba260d1bb3f0a968cca8c3e7 Mon Sep 17 00:00:00 2001 From: hallgren Date: Mon, 20 Jan 2014 17:06:11 +0000 Subject: Optionally include C run-time support If the C run-time library is compiled and installed on your system, you can now do 'cabal configure -fc-runtime' to get the following extras: + The haskell binding to the C run-time library will be included in the PGF library (so you can import it in Haskell applications). Documentation on the new modules will be included when you run 'cabal haddock'. + The new command 'pgf-shell', implemented on top of haskell binding to the C run-time system. + Three new commands in the web API: c-parse, c-linearize and c-translate. Their interfaces are similar to the corresponding commands without the "c-" prefix, but they should be considered preliminary. --- gf.cabal | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'gf.cabal') diff --git a/gf.cabal b/gf.cabal index 84078a082..7715c1c6d 100644 --- a/gf.cabal +++ b/gf.cabal @@ -1,7 +1,7 @@ name: gf version: 3.5.11-darcs -cabal-version: >= 1.8 +cabal-version: >= 1.10 build-type: Custom license: OtherLicense license-file: LICENSE @@ -57,7 +57,12 @@ flag custom-binary Description: Use a customised version of the binary package Default: True +flag c-runtime + Description: Include functionality from the C run-time library (which must be installed already) + Default: False + Library + default-language: Haskell2010 build-depends: base >= 4.2 && <5, array, fst, @@ -113,7 +118,16 @@ Library PGF.VisualizeTree PGF.OldBinary + if flag(c-runtime) + exposed-modules: CId, CRuntimeFFI + other-modules: Gu, PgfLow + hs-source-dirs: src/runtime/haskell-bind + build-tools: hsc2hs + extra-libraries: gu pgf + cc-options: -std=c99 + Executable gf + default-language: Haskell2010 build-depends: gf, base >= 4.2 && <5, array, @@ -140,6 +154,8 @@ Executable gf other-modules: GFServer hs-source-dirs: src/server src/server/transfer src/example-based + if flag(c-runtime) + cpp-options: -DC_RUNTIME --if flag(new-comp) -- cpp-options: -DNEW_COMP @@ -232,6 +248,13 @@ Executable gf else other-modules: GF.System.NoSignal +executable pgf-shell + if !flag(c-runtime) + buildable: False + main-is: pgf-shell.hs + hs-source-dirs: src/runtime/haskell-bind/examples + build-depends: gf, base + default-language: Haskell2010 test-suite rgl-tests type: exitcode-stdio-1.0 -- cgit v1.2.3