diff --git a/scsh/configure.scm.in b/scsh/configure.scm.in index 4cb95e9..8bef38c 100644 --- a/scsh/configure.scm.in +++ b/scsh/configure.scm.in @@ -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: diff --git a/scsh/scsh-interfaces.scm b/scsh/scsh-interfaces.scm index 5b5acb2..315f49c 100644 --- a/scsh/scsh-interfaces.scm +++ b/scsh/scsh-interfaces.scm @@ -1190,6 +1190,9 @@ (define-interface configure-interface (export host + machine + vendor + os prefix exec-prefix bin-dir diff --git a/scsh/scsh-package.scm b/scsh/scsh-package.scm index 5553565..bc76fc7 100644 --- a/scsh/scsh-package.scm +++ b/scsh/scsh-package.scm @@ -589,5 +589,6 @@ (define-structure configure configure-interface (open scheme + re-level-0 rx-syntax (subset srfi-13 (string-join))) (files configure)) \ No newline at end of file