-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure-compat
35 lines (30 loc) · 1.18 KB
/
configure-compat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
;;;
;;;To run the 'configure' script generated by newer Gauche in older Gauche
;;;
(use gauche.version)
;; For the compatibility to Gauche 0.9.7 - 0.9.9
(define (cf-init-gauche-extension)
(when (version<? (gauche-version) "0.9.7")
;; 0.9.6 or before doesn't have cf-init-gauche-extension.
;; Give the user a helpful message.
(exit 1 " Gauche 0.9.7 or later is required to use \
cf-init-gauche-extension."))
;; Call original procedure
((with-module gauche.configure cf-init-gauche-extension))
(when (version<=? (gauche-version) "0.9.9")
;; The default values for these variables weren't set in older Gauche.
(unless (cf-have-subst? 'CFLAGS)
(cf-subst 'CFLAGS (gauche-config "--default-cflags")))
(unless (cf-have-subst? 'CPPFLAGS) (cf-subst 'CPPFLAGS ""))
(unless (cf-have-subst? 'LDFLAGS) (cf-subst 'LDFLAGS ""))
(unless (cf-have-subst? 'LIBS) (cf-subst 'LIBS ""))
(unless (cf-have-subst? 'WINDOWS_UNICODE_FLAG)
(cf-subst 'WINDOWS_UNICODE_FLAG
(cond-expand
[(and gauche.os.windows gauche.ces.utf8) "-DUNICODE"]
[else ""])))
)
)
;; Local variables:
;; mode: scheme
;; end: