~ chicken-core (chicken-5) 8502720741144d81e6ae80e5147cc398e7e469b0
commit 8502720741144d81e6ae80e5147cc398e7e469b0
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Sat May 7 14:12:29 2011 +0200
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Sat May 7 14:12:29 2011 +0200
CHICKEN_C_INCLUDE_PATH and CHICKEN_C_LIBRARY_PATH (undocumented)
diff --git a/csc.scm b/csc.scm
index f414a02f..51277124 100644
--- a/csc.scm
+++ b/csc.scm
@@ -232,7 +232,12 @@
(define compile-options '())
(define builtin-compile-options
- (if include-dir (list (conc "-I\"" include-dir "\"")) '()))
+ (append
+ (if include-dir (list (conc "-I\"" include-dir "\"")) '())
+ (cond ((get-environment-variable "CHICKEN_C_INCLUDE_PATH") =>
+ (lambda (path)
+ (map (cut string-append "-I\"" <> "\"") (string-split path ":;"))))
+ (else '()))))
(define compile-only-flag "-c")
(define translation-optimization-options default-translation-optimization-options)
@@ -248,19 +253,24 @@
(define link-options '())
(define (builtin-link-options)
- (cond (elf
- (list
- (conc "-L\"" library-dir "\"")
- (conc " -Wl,-R\""
- (if (and deployed (not netbsd))
- "\\$ORIGIN"
- (prefix "" "lib"
- (if host-mode
- INSTALL_LIB_HOME
- TARGET_RUN_LIB_HOME)))
- "\"")) )
- (else
- (list (conc "-L\"" library-dir "\"")))))
+ (append
+ (cond (elf
+ (list
+ (conc "-L\"" library-dir "\"")
+ (conc " -Wl,-R\""
+ (if (and deployed (not netbsd))
+ "\\$ORIGIN"
+ (prefix "" "lib"
+ (if host-mode
+ INSTALL_LIB_HOME
+ TARGET_RUN_LIB_HOME)))
+ "\"")) )
+ (else
+ (list (conc "-L\"" library-dir "\""))))
+ (cond ((get-environment-variable "CHICKEN_C_LIBRARY_PATH") =>
+ (lambda (path)
+ (map (cut string-append "-L\"" <> "\"") (string-split path ":;"))))
+ (else '()))))
(define target-filename #f)
(define verbose #f)
Trap