1 ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
5 ;;;; Name: oracle-loader.lisp
6 ;;;; Purpose: Foreign library loader for CLSQL Oracle interface
10 ;;;; This file is part of CLSQL.
12 ;;;; CLSQL users are granted the rights to distribute and use this software
13 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
14 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
15 ;;;; *************************************************************************
17 (in-package #:clsql-oracle)
19 ;; Load the foreign library
21 (eval-when (:load-toplevel :compile-toplevel)
24 "The root of the Oracle installation, usually $ORACLE_HOME is set to this.")
27 (cdr (assoc ':ORACLE_HOME ext:*environment-list* :test #'eq)))))
29 (defparameter *oracle-libs*
30 '(#-oracle-9i "rdbms/lib/ssdbaed.o"
32 #-oracle-9i "rdbms/lib/homts.o"
37 #-oracle-9i"lib/libnsslb8.a"
38 #+oracle-9i "lib/homts.o"
40 "Oracle client libraries, relative to ORACLE_HOME.")
42 (defun make-oracle-load-path ()
44 (concatenate 'string *oracle-home* "/" x))
48 ; ;(defparameter *oracle-so-libraries*
49 ; ;; `(,(concatenate 'string "-L" *oracle-home* "/lib/")
67 ; "List of library flags needed to be passed to ld to load the
68 ; Oracle client library succesfully. If this differs at your site,
69 ; set *oracle-so-libraries* to the right path before compiling or
70 ; loading the system.")
74 (defun oracle-libraries ()
75 `(,(concatenate 'string
76 "-L" *oracle-home* "/lib")
92 ;; "List of library flags needed to be passed to ld to load the
93 ;;Oracle client library succesfully. If this differs at your site,
94 ;;set *oracle-so-libraries* to the right path before compiling or
95 ;;loading the system.")
98 (defun oracle-libraries ()
99 `(,(concatenate 'string
100 "-L" *oracle-home* "/lib")
116 #+redhat-linux "-L/usr/lib/gcc-lib/i386-redhat-linux/2.96"
120 (defmethod database-type-load-foreign ((database-type (eql :oracle)))
121 (progv '(sys::*dso-linker*)
123 (ext:load-foreign (make-oracle-load-path)
124 :libraries (oracle-libraries))))
127 (database-type-load-foreign :oracle)