From: Matt Birkholz Date: Sat, 7 Sep 2013 23:30:18 +0000 (-0700) Subject: install-shim: Create directory in first directory of library path. X-Git-Tag: release-9.2.0~124 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=2b2c45a2a35d993c5b6e4e22c44f692dc515e2a5;p=mit-scheme.git 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. --- 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)