setup detect msys added by klovett on Sun Feb 18 04:15:56 2018

(use posix utils (srfi 13))

(define *SETUP-OSTYPE*
  (let-values (((in out pid) (process "echo $OSTYPE")))
    (let* (
      (in-str (read-all in))
      (in-str (string-trim-both in-str))
      (ostype (string->symbol in-str)) )
      ;
      (process-wait pid)
      (close-input-port in)
      (close-output-port out)
      ;
      ostype ) ))

(register-feature! *SETUP-OSTYPE*)

;;

(define mathh-compile-options `(
  -local -no-procedure-checks
  ,@(cond-expand
      (linux    '(-C -D_ISOC99_SOURCE) ) ;_GNU_SOURCE instead?
      (msys     '(-C -mwin32) )
      (else     '() ) ) ) )