-;;;; 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
-
-(defvar *clsql-mysql-library-filename*
- (uffi:find-foreign-library
- "clsql-mysql"
- `(,(make-pathname :directory (pathname-directory *load-truename*))
- "/opt/lisp/clsql/db-mysql/"
- "/home/kevin/debian/src/clsql/db-mysql/")
- :drive-letters '("C" "D" "E" "F" "G")))
-
-(defvar *mysql-library-filename*
- (cond
- ((probe-file "/opt/mysql/lib/mysql/libmysqlclient.so")
- "/opt/mysql/lib/mysql/libmysqlclient.so")
- ((probe-file "/usr/local/lib/libmysqlclient.so")
- "/usr/local/lib/libmysqlclient.so")
- ((probe-file "/usr/lib/libmysqlclient.so")
- "/usr/lib/libmysqlclient.so")
- #+(or win32 mswindows)
- ((probe-file "c:/mysql/lib/opt/libmysql.dll")
- "c:/mysql/lib/opt/libmysql.dll")
- (t
- (warn "Can't find MySQL client library to load.")))
- "Location where the MySQL client library is to be found.")
+;; searches clsql_mysql64 to accomodate both 32-bit and 64-bit libraries on same system
+(defparameter *clsql-mysql-library-candidate-names*
+ `(,@(when (> most-positive-fixnum (expt 2 32)) (list "clsql_mysql64"))
+ "clsql_mysql"))