source: project/release/4/posix-shm/tags/1.1/posix-shm.setup @ 31733

Last change on this file since 31733 was 31733, checked in by Ivan Raikov, 6 years ago

posix-shm release 1.1

File size: 1.0 KB
Line 
1;; -*- Hen -*-
2
3(define (dynld-name fn)         
4  (make-pathname #f fn ##sys#load-dynamic-extension))   
5
6
7(define (shm-try-compile ldflags cflags)
8  (and (try-compile
9        (string-append "#include <sys/mman.h>\n"
10                       "#include <sys/stat.h>\n"
11                       "#include<fcntl.h>\n"
12                       "\n"
13                       "int main(int argc, char **argv) { shm_open(\"test\",0,0); return 0; }\n")
14        ldflags: ldflags
15        cflags: cflags)
16       (cons ldflags cflags)))
17
18
19(define-syntax shm-test
20  (syntax-rules ()
21    ((_ (flags ...))
22     (condition-case (shm-try-compile flags ...)
23                     (t ()    #f)))))
24
25
26(define c+ld-options (or (shm-test ("-lrt" "-DHAVE_POSIX_SHM")) ""))
27
28
29(compile -O2 -d0 -I. -S -s posix-shm.scm -j posix-shm
30         -L "\"" ,(car c+ld-options) "\""
31         -C "\"" ,(cdr c+ld-options) "\"" )
32(compile -O2 -d0 -s posix-shm.import.scm)
33
34(install-extension
35
36  ; Name of your extension:
37  'posix-shm
38
39  ; Files to install for your extension:
40  `(,(dynld-name "posix-shm") ,(dynld-name "posix-shm.import") )
41   
42  ; Assoc list with properties for your extension:
43  `((version 1.1)
44    ))
45
Note: See TracBrowser for help on using the repository browser.