r9336: 12 May 2004 Kevin Rosenberg (kevin@rosenberg.net)
[clsql.git] / db-mysql / mysql-loader.lisp
index 40ae8f6f96e95dd1c7886a554a7b606d1c171ae8..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"
   (uffi:find-foreign-library
    '("libz" "zlib")
    `(,(make-pathname :directory (pathname-directory *load-truename*))
+     #+64bit "/usr/lib64/"
       "/usr/lib/"
       "/sw/lib/"
       "/usr/local/lib/"
-      "/home/kevin/debian/src/clsql/db-mysql/"
-      "/mysql/lib/opt/")
+       "/home/kevin/debian/src/clsql/db-mysql/"
+       "/mysql/lib/dll32/"
+       "/mysql/lib/opt/")
    :drive-letters '("C")))
   
 (defvar *mysql-library-candidate-names*
@@ -49,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"))
 
@@ -61,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-sys: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-sys: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*
@@ -84,5 +82,5 @@ set to the right path before compiling or loading the system.")
   (setq *mysql-library-loaded* t))
 
 
-(clsql-base-sys:database-type-load-foreign :mysql)
+(clsql-sys:database-type-load-foreign :mysql)