source: project/release/3/mysql/trunk/mysql.setup @ 7930

Last change on this file since 7930 was 7930, checked in by Kon Lovett, 12 years ago

1.3 release. Moved aux C code into .scm file. Added mysql-options conn arg helper.

File size: 1.1 KB
Line 
1; mysql.setup,v 1.2 2005/08/04 09:02:53 tbutzon Exp
2
3(define has-exports? (string>=? (chicken-version) "2.310"))
4
5(define (existing-absolute-pathname dirs #!optional fil ext)
6  (let ([absdir (make-absolute-pathname dirs #f)])
7    (and (file-exists? (make-absolute-pathname absdir fil ext))
8         absdir ) ) )
9
10(define mysql-header-search-option
11  (if (find-header "mysql/mysql.h")
12      (cond [(existing-absolute-pathname '("usr" "include" "mysql") "mysql" "h")
13              => (cut string-append "-I" <>) ]
14            [(existing-absolute-pathname '("usr" "local" "include" "mysql") "mysql" "h")
15              => (cut string-append "-I" <>) ]
16            [else
17              (print "Warning: unknown search path for \"mysql/mysql.h\"") ] )
18      "" ) )
19
20(compile -s -O2 -d1
21        ,@(if has-exports? '(-check-imports -emit-exports mysql.exports) '())
22  ,mysql-header-search-option -lmysqlclient -lz
23  mysql.scm)
24
25(install-extension 'mysql
26  '("mysql.so" "mysql-mole.html")
27  `((version 1.3)
28                ,@(if has-exports? `((exports "mysql.exports")) '())
29                (documentation "mysql.html") ) )
Note: See TracBrowser for help on using the repository browser.