;; -*- Hen -*- (define (dynld-name fn) (make-pathname #f fn ##sys#load-dynamic-extension)) (define fortran-compiler (or (get-environment-variable "FORTRAN_COMPILER") "gfortran")) (define fortran-flags (or (get-environment-variable "FORTRAN_FLAGS") "-fno-automatic -fPIC")) (define fortran-libs (or (get-environment-variable "FORTRAN_LIBS") "-lgfortran")) (define bvspis-path (or (get-environment-variable "BVSPIS_PATH") "bvspis")) (if (not (file-exists? (make-pathname bvspis-path "Src/Dp/src.f"))) (begin (print "\n\nUnable to figure out the location of the BVSPIS Fortran library.\n" "You will need to supply the BVSPIS source code in order to compile this package.\n" "You can download and unpack BVSPIS as follows: \n\n" " wget http://www.netlib.org/toms/770\n" " mkdir bvspis && awk 'NR>4' 770 > bvspis/bvspis.sh && chmod u+x bvspis/bvspis.sh\n" " pushd bvspis && ./bvspis.sh && popd\n\n" "Then set the BVSPIS_PATH environment variable to $PWD/bvspis and run chicken-install again:\n\n" " BVSPIS_PATH=$PWD/bvspis chicken-install bvsp-spline") (exit 1))) (run (,fortran-compiler ,fortran-flags -c ,bvspis-path -o dbvspis.o)) (compile -O3 -d0 -S -s bvsp-spline.scm dbvspis.o -j bvsp-spline ,fortran-libs) (compile -O3 -d0 -s bvsp-spline.import.scm) (install-extension ; Name of your extension: 'bvsp-spline ; Files to install for your extension: `(,(dynld-name "bvsp-spline") ,(dynld-name "bvsp-spline.import") ) ; Assoc list with properties for your extension: `((version 1.0) ))