summaryrefslogtreecommitdiff
path: root/sdl2/config.scm.in
blob: 06f5519ba5000fd9ae0fb94d587504352d27346d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
(define-module (sdl2 config)
  #:export (%libsdl2
            %libsdl2-image
            %libsdl2-ttf
            %libsdl2-mixer))

;; Special case Windows since the DLL names are different.  Performing
;; this check at runtime allows a Linux machine to cross-compile
;; guile-sdl2 for a Windows target.
(define %windows? (string-prefix? "Windows" (utsname:sysname (uname))))
(define %libsdl2 (if %windows? "SDL2" "@LIBSDL2@"))
(define %libsdl2-image (if %windows? "SDL2_image" "@LIBSDL2_IMAGE@"))
(define %libsdl2-ttf (if %windows? "SDL2_ttf" "@LIBSDL2_TTF@"))
(define %libsdl2-mixer (if %windows? "SDL2_mixer" "@LIBSDL2_MIXER@"))