r9336: 12 May 2004 Kevin Rosenberg (kevin@rosenberg.net)
[clsql.git] / db-mysql / mysql-loader.lisp
index 957c39e48e7123105a067436e3c0180635b94b35..d93b783b88049bd7d26bbf278bea586f2f4166a6 100644 (file)
 
 (in-package #:mysql)
 
-;;;; Modified by Kevin Rosenberg 
-;;;;  - probe potential directories to find library
-;;;;  - Changed from CMUCL functions to UFFI to
-;;;;      -- prevent library from being loaded multiple times
-;;;;      -- support Allegro CL and Lispworks
-
 (defparameter *clsql-mysql-library-path* 
   (uffi:find-foreign-library
    "mysql"
@@ -37,6 +31,7 @@
   (uffi:find-foreign-library
    '("libz" "zlib")
    `(,(make-pathname :directory (pathname-directory *load-truename*))
+     #+64bit "/usr/lib64/"
       "/usr/lib/"
       "/sw/lib/"
       "/usr/local/lib/"
@@ -50,7 +45,9 @@
 
 (defparameter *mysql-library-candidate-directories*
     `(,(pathname-directory *load-pathname*)
-      "/opt/mysql/lib/mysql/" "/usr/local/lib/" "/usr/lib/" "/usr/local/lib/mysql/" "/usr/lib/mysql/" "/mysql/lib/opt/" "/sw/lib/mysql/"))
+      "/opt/mysql/lib/mysql/" "/usr/local/lib/"
+      #+64bit "/usr/lib64/"
+      "/usr/lib/" "/usr/local/lib/mysql/" "/usr/lib/mysql/" "/mysql/lib/opt/" "/sw/lib/mysql/"))
 
 (defvar *mysql-library-candidate-drive-letters* '("C" "D" "E"))
 
@@ -62,10 +59,10 @@ set to the right path before compiling or loading the system.")
 (defvar *mysql-library-loaded* nil
   "T if foreign library was able to be loaded successfully")
 
-(defmethod clsql-base:database-type-library-loaded ((database-type (eql :mysql)))
+(defmethod clsql-sys:database-type-library-loaded ((database-type (eql :mysql)))
   *mysql-library-loaded*)
                                      
-(defmethod clsql-base:database-type-load-foreign ((database-type (eql :mysql)))
+(defmethod clsql-sys:database-type-load-foreign ((database-type (eql :mysql)))
   (let ((mysql-path
         (uffi:find-foreign-library *mysql-library-candidate-names*
                                    *mysql-library-candidate-directories*
@@ -85,5 +82,5 @@ set to the right path before compiling or loading the system.")
   (setq *mysql-library-loaded* t))
 
 
-(clsql-base:database-type-load-foreign :mysql)
+(clsql-sys:database-type-load-foreign :mysql)