From e9da224bce287653f96235bd6ae02da6f8f8b219 Mon Sep 17 00:00:00 2001 From: Niklas Hambüchen Date: Fri, 17 May 2019 02:50:03 +0200 Subject: Allow disabling random_r() usage manually. See #279. This allows building hmatrix against the musl libc, which allows easily linking Haskell programs statically. A feature-detection for random_r() would be even better, but this will do for now. --- packages/base/hmatrix.cabal | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'packages/base/hmatrix.cabal') diff --git a/packages/base/hmatrix.cabal b/packages/base/hmatrix.cabal index 1380a36..c371ae7 100644 --- a/packages/base/hmatrix.cabal +++ b/packages/base/hmatrix.cabal @@ -36,6 +36,11 @@ flag disable-default-paths default: False manual: True +flag no-random_r + description: When enabled, don't depend on the random_r() C function. + default: False + manual: True + library Build-Depends: base >= 4.8 && < 5, @@ -99,6 +104,9 @@ library cc-options: -msse2 + if flag(no-random_r) + cc-options: -DNO_RANDOM_R + if os(OSX) if flag(openblas) if !flag(disable-default-paths) -- cgit v1.2.3