From: Eugene Crosser Date: Fri, 2 May 2014 16:42:04 +0000 (+0400) Subject: next take on version-dependent build X-Git-Tag: 0.9.0.1~12 X-Git-Url: http://average.org/gitweb/?a=commitdiff_plain;h=01954d976644a4fdd078ddd109b18ed89013079d;p=pdns-pipe-nmc.git next take on version-dependent build --- diff --git a/.ghci b/.ghci new file mode 100644 index 0000000..d4289dd --- /dev/null +++ b/.ghci @@ -0,0 +1 @@ +:set -optP-include -optPdist/build/autogen/cabal_macros.h diff --git a/build b/build index fe589f9..c1f039f 100755 --- a/build +++ b/build @@ -9,6 +9,12 @@ echo "Making $file.$sfx" # -optl-pthread -pgml g++ "$file" # but cannot make it "only glibc is shared". And with static glibc, # getaddrinfo does not work on systems with different glibc. +# +# To build with ghc, run this: +#ghc --make -optP-include -optPdist/build/autogen/cabal_macros.h "$file" +# but it is still necessary to run `cabal configure` before to generate +# the file `dist/build/autogen/cabal_macros.h`. + cabal build case $? in 0) ;; diff --git a/pdns-pipe-nmc.hs b/pdns-pipe-nmc.hs index dbb7853..bbe89ab 100644 --- a/pdns-pipe-nmc.hs +++ b/pdns-pipe-nmc.hs @@ -22,7 +22,7 @@ import Data.Map.Lazy (Map, empty, lookup, insert, delete, size) import Data.Aeson (encode, decode, Value(..)) import Network.HTTP.Types import Network.HTTP.Client -#if MIN_VERSION_data_default(0,5,3) +#if MIN_VERSION_http_client(0,3,0) import Data.Default.Class (def) #else import Data.Default (def)