Minor enhancement for the configure module: Return machine, vendor and os.

This commit is contained in:
mainzelm 2004-01-09 14:55:33 +00:00
parent 655a2e5cc2
commit 065d686d21
3 changed files with 28 additions and 2 deletions

View File

@ -1,5 +1,23 @@
(define (host) "@scsh_host@")
(define (machine-vendor-os)
(let ((match (regexp-search (rx (submatch (+ (~ #\-))) "-"
(submatch (+ (~ #\-))) "-"
(submatch (+ any)))
(host))))
(list (match:substring match 1)
(match:substring match 2)
(match:substring match 3))))
(define (machine)
(car (machine-vendor-os)))
(define (vendor)
(cadr (machine-vendor-os)))
(define (os)
(caddr (machine-vendor-os)))
(define (prefix) "@scsh_prefix@")
(define (exec-prefix) "@scsh_exec_prefix@")
@ -24,8 +42,12 @@
(define (ldflags) "@scsh_LDFLAGS@")
(define (compiler-flags)
(string-join (list "-I" (include-dir) (defs))))
(define (linker-flags)
(string-join (list "-L" (lib-dir) (libs) "-lscsh") " "))
(define (compiler-flags)
(string-join (list "-I" (include-dir) (defs))))
;;; Local Variables:
;;; mode: Scheme
;;; End:

View File

@ -1190,6 +1190,9 @@
(define-interface configure-interface
(export host
machine
vendor
os
prefix
exec-prefix
bin-dir

View File

@ -589,5 +589,6 @@
(define-structure configure configure-interface
(open scheme
re-level-0 rx-syntax
(subset srfi-13 (string-join)))
(files configure))