@@ -31,6 +31,10 @@ Flag allow-sendfilefd
3131 Description: Allow use of sendfileFd (not available on GNU/kFreeBSD)
3232 Default: True
3333
34+Flag warp-debug
35+ Description: print debug output. not suitable for production
36+ Default: False
37+
3438Library
3539 Build-Depends: base >= 3 && < 5
3640 , array
@@ -77,6 +81,9 @@ Library
7781 Network.Wai.Handler.Warp.Types
7882 Paths_warp
7983 Ghc-Options: -Wall
84+
85+ if flag(warp-debug)
86+ Cpp-Options: -DWARP_DEBUG
8087 if (os(linux) || os(freebsd) || os(darwin)) && flag(allow-sendfilefd)
8188 Cpp-Options: -DSENDFILEFD
8289 Build-Depends: hashable