1. Sergey Astanin
  2. hs-libzip

Commits

Sergey Astanin  committed 8d7e3dd

Added configure flag NoPkgConfig.

When pkg-config is not available, the library can be build with
NoPkgConfig flag:

cabal configure -fNoPkgConfig

  • Participants
  • Parent commits 2f52588
  • Branches default
  • Tags bindings-libzip-0.1.0.2

Comments (0)

Files changed (1)

File bindings-libzip/bindings-libzip.cabal

View file
 Name:                bindings-libzip
-Version:             0.1.0.1
+Version:             0.1.0.2
 Synopsis:            Low level bindings to libzip.
 Description:
   This package provides low-level bindings to libzip library.
 Cabal-version:       >=1.2.3
 Tested-with:         GHC == 6.12.1, GHC == 7.0.1
 
+Flag NoPkgConfig
+  Description: Do not use pkg-config to check for library dependencies.
+  Default: False
+
 Library
   Extensions:
         ForeignFunctionInterface
         base >= 4.0 && < 4.4
       , bindings-DSL >= 1.0 && < 1.1
 
-  PkgConfig-Depends:
-        libzip >= 0.9
+  if flag(NoPkgConfig)
+    Includes: zip.h
+    Extra-Libraries: zip z
+  else
+    PkgConfig-Depends: libzip >= 0.9
 
   GHC-Options:
         -Wall