From 2b2c45a2a35d993c5b6e4e22c44f692dc515e2a5 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Sat, 7 Sep 2013 16:30:18 -0700 Subject: [PATCH] install-shim: Create directory in first directory of library path. Also, locate the directory for the -I CFLAG by searching the library path for mit-scheme.h. --- src/ffi/build.scm.in | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/ffi/build.scm.in b/src/ffi/build.scm.in index 5e646bab1..4229edeeb 100644 --- a/src/ffi/build.scm.in +++ b/src/ffi/build.scm.in @@ -34,8 +34,12 @@ USA. (run-command (append CCLD LDFLAGS (command-line) MODULE_LDFLAGS))) (define (install-shim libname) - (let ((library-dir (->namestring - (system-library-directory-pathname libname)))) + (let* ((pathname (pathname-as-directory libname)) + (library-dir + (->namestring + (or (system-library-directory-pathname pathname) + (merge-pathnames pathname + (system-library-directory-pathname)))))) (run-command (list "rm" "-rf" library-dir)) (run-command (list "mkdir" library-dir)) (run-command (append (list "install" "-m" "644") @@ -76,7 +80,9 @@ USA. (filter (lambda (i) (not (string=? "-DMIT_SCHEME" i))) (parse-words "@CC@ @DEFS@ @SCHEME_DEFS@ @CPPFLAGS@")) - (list (string-append "-I" (->namestring (system-library-pathname "")))) + (list (string-append "-I" (->namestring + (directory-pathname + (system-library-pathname "mit-scheme.h"))))) (parse-words "@CFLAGS@ @MODULE_CFLAGS@"))) (define (working-directory-name) -- 2.25.1