diff --git a/Setup.hs b/Setup.hs
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,10 +1,11 @@
 {-# OPTIONS_GHC -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates -Wcompat #-}
 
-import           Data.Bool                       (bool)
+import           Data.Bool                                    (bool)
 import           Distribution.CommandLine
 import           Distribution.PackageDescription
 import           Distribution.Simple
 import           Distribution.Simple.Setup
+import           Distribution.Types.GenericPackageDescription
 
 installActions :: IO ()
 installActions = sequence_
@@ -17,7 +18,7 @@
 maybeInstallActions cfs = bool nothing act cond
     where act = installActions
           nothing = pure mempty
-          cond = (mkFlagName "no-executable", True) `notElem` configConfigurationsFlags cfs
+          cond = (mkFlagName "no-executable", True) `notElem` unFlagAssignment (configConfigurationsFlags cfs)
 
 main :: IO ()
 main = defaultMainWithHooks $
diff --git a/ats-pkg.cabal b/ats-pkg.cabal
--- a/ats-pkg.cabal
+++ b/ats-pkg.cabal
@@ -1,6 +1,6 @@
 cabal-version: 1.18
 name: ats-pkg
-version: 2.7.1.0
+version: 2.7.1.1
 license: BSD3
 license-file: LICENSE
 copyright: Copyright: (c) 2018 Vanessa McHale
@@ -25,7 +25,7 @@
 
 custom-setup
     setup-depends: base -any,
-                   Cabal >=2.0,
+                   Cabal >=2.2,
                    cli-setup >=0.2.0.1
 
 flag development
diff --git a/src/Language/ATS/Package/Build.hs b/src/Language/ATS/Package/Build.hs
--- a/src/Language/ATS/Package/Build.hs
+++ b/src/Language/ATS/Package/Build.hs
@@ -5,7 +5,6 @@
 -- | This module holds various functions for turning a package into a set of rules
 -- or an 'IO ()'.
 module Language.ATS.Package.Build ( mkPkg
-                                  , pkgToAction
                                   , build
                                   , buildAll
                                   , check
@@ -227,7 +226,7 @@
             -> Maybe String -- ^ Optional compiler triple (overrides 'ccompiler')
             -> Pkg -- ^ Package data type
             -> Rules ()
-pkgToAction setup rs tgt ~(Pkg bs ts lbs mt _ v v' ds cds bdeps ccLocal cf as) =
+pkgToAction setup rs tgt ~(Pkg bs ts lbs mt _ v v' ds cds bdeps ccLocal cf as dl) =
 
     unless (rs == ["clean"]) $ do
 
@@ -258,7 +257,7 @@
           k False = SharedLibrary
           k True  = StaticLibrary
 
-          atsToolConfig = ATSToolConfig v v' False (ccFromString cc') False
+          atsToolConfig = ATSToolConfig v v' False (ccFromString cc') (not dl)
 
           cDepsRules = unless (null as) $ do
               let targets = fmap (unpack . cTarget) as
diff --git a/src/Language/ATS/Package/Type.hs b/src/Language/ATS/Package/Type.hs
--- a/src/Language/ATS/Package/Type.hs
+++ b/src/Language/ATS/Package/Type.hs
@@ -111,5 +111,6 @@
                , ccompiler    :: Text -- ^ The C compiler we should use
                , cflags       :: [Text] -- ^ List of flags to pass to the C compiler
                , atsSource    :: [Src] -- ^ ATS source to be compile to C.
+               , dynLink      :: Bool -- ^ Don't link statically, instead, use libraries installed by @atspkg@.
                }
          deriving (Show, Eq, Generic, Interpret, Binary, Hashable)
