4 ;;; MaiSQL --- Common Lisp Interface Layer to SQL Databases
5 ;;; This is copyrighted software. See documentation for terms.
7 ;;; oracle-loader.cl --- Foreign Object Loader for Oracle
9 (in-package :clsql-oracle)
11 ;; Load the foreign library
13 (eval-when (:load-toplevel :compile-toplevel)
16 "The root of the Oracle installation, usually $ORACLE_HOME is set to this.")
19 (cdr (assoc ':ORACLE_HOME ext:*environment-list* :test #'eq)))))
21 (defparameter *oracle-libs*
22 '(#-oracle-9i "rdbms/lib/ssdbaed.o"
24 #-oracle-9i "rdbms/lib/homts.o"
29 #-oracle-9i"lib/libnsslb8.a"
30 #+oracle-9i "lib/homts.o"
32 "Oracle client libraries, relative to ORACLE_HOME.")
34 (defun make-oracle-load-path ()
36 (concatenate 'string *oracle-home* "/" x))
40 ; ;(defparameter *oracle-so-libraries*
41 ; ;; `(,(concatenate 'string "-L" *oracle-home* "/lib/")
59 ; "List of library flags needed to be passed to ld to load the
60 ; Oracle client library succesfully. If this differs at your site,
61 ; set *oracle-so-libraries* to the right path before compiling or
62 ; loading the system.")
66 (defun oracle-libraries ()
67 `(,(concatenate 'string
68 "-L" *oracle-home* "/lib")
84 ;; "List of library flags needed to be passed to ld to load the
85 ;;Oracle client library succesfully. If this differs at your site,
86 ;;set *oracle-so-libraries* to the right path before compiling or
87 ;;loading the system.")
90 (defun oracle-libraries ()
91 `(,(concatenate 'string
92 "-L" *oracle-home* "/lib")
108 #+redhat-linux "-L/usr/lib/gcc-lib/i386-redhat-linux/2.96"
112 (defmethod database-type-load-foreign ((database-type (eql :oracle)))
113 (progv '(sys::*dso-linker*)
115 (ext:load-foreign (make-oracle-load-path)
116 :libraries (oracle-libraries))))
119 (database-type-load-foreign :oracle)