r2043: Debian build
[clsql.git] / interfaces / mysql / mysql-loader.cl
index 7434670da5a235391e45b2e3d2ed5506c7710bfe..85ccff222842d2abcc540009986ac5cabdd0ffdc 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmers:   Kevin M. Rosenberg
 ;;;; Date Started:  Feb 2002
 ;;;;
-;;;; $Id: mysql-loader.cl,v 1.8 2002/05/13 22:05:21 kevin Exp $
+;;;; $Id: mysql-loader.cl,v 1.11 2002/05/14 16:16:54 kevin Exp $
 ;;;;
 ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
 ;;;;      -- support Allegro CL and Lispworks
 
 (defvar *clsql-mysql-library-filename* 
-    (translate-logical-pathname 
-     #+(or linux unix) "CL-LIBRARY:clsql;interfaces;mysql;clsql-mysql.so"
-     #+(or mswindows win32) "CL-LIBRARY:clsql;interfaces;mysql;clsql-mysql.dll"
-     ))
+  (uffi:find-foreign-library
+   "clsql-mysql"
+   `(,(translate-logical-pathname 
+       "CL-LIBRARY:clsql;interfaces;clsql-uffi;")
+     "/usr/share/common-lisp/source/clsql/interfaces/clsql-uffi/")))
 
 (defvar *mysql-library-filename*
     (cond
@@ -75,8 +76,7 @@ set to the right path before compiling or loading the system.")
     (uffi:load-foreign-library 
      (uffi:find-foreign-library '("libz" "zlib")
                                '("/usr/lib/" "/usr/local/" "/lib/")))
-    (when
-       (and
+    (if        (and
         (uffi:load-foreign-library mysql-path
                                    :module "mysql" 
                                    :supporting-libraries 
@@ -85,7 +85,9 @@ set to the right path before compiling or loading the system.")
                                    :module "clsql-mysql" 
                                    :supporting-libraries 
                                    (append *mysql-supporting-libraries*)))
-      (setq *mysql-library-loaded* t))))
+       (setq *mysql-library-loaded* t)
+      (warn "Unable to load MySQL client library ~A or CLSQL-MySQL library ~A"
+           mysql-path *clsql-mysql-library-filename*))))
 
 
 (clsql-sys:database-type-load-foreign :mysql)