Added
Link Here
|
1 |
--- emacsql-sqlite.el.orig 2018-10-31 17:50:07 UTC |
2 |
+++ emacsql-sqlite.el |
3 |
@@ -27,11 +27,7 @@ |
4 |
(file-name-directory (or load-file-name buffer-file-name)) |
5 |
"Directory where EmacSQL is installed.") |
6 |
|
7 |
-(defvar emacsql-sqlite-executable |
8 |
- (expand-file-name (if (memq system-type '(windows-nt cygwin ms-dos)) |
9 |
- "sqlite/emacsql-sqlite.exe" |
10 |
- "sqlite/emacsql-sqlite") |
11 |
- emacsql-sqlite-data-root) |
12 |
+(defvar emacsql-sqlite-executable "%%PREFIX%%/bin/emacsql-sqlite" |
13 |
"Path to the EmacSQL backend (this is not the sqlite3 shell).") |
14 |
|
15 |
(defvar emacsql-sqlite-reserved |
16 |
@@ -82,6 +78,7 @@ http://www.sqlite.org/lang_keywords.html") |
17 |
(emacsql-wait connection) |
18 |
(emacsql connection [:pragma (= busy-timeout $s1)] |
19 |
(/ (* emacsql-global-timeout 1000) 2)) |
20 |
+ (emacsql connection [:pragma (= foreign_keys 1)]) |
21 |
(emacsql-register connection))) |
22 |
|
23 |
(cl-defun emacsql-sqlite (file &key debug) |
24 |
@@ -143,11 +140,11 @@ If called with non-nil ASYNC the return value is meani |
25 |
(let* ((cc (executable-find "cc")) |
26 |
(src (expand-file-name "sqlite" emacsql-sqlite-data-root)) |
27 |
(files (mapcar (lambda (f) (expand-file-name f src)) |
28 |
- '("sqlite3.c" "emacsql.c"))) |
29 |
+ '("emacsql.c"))) |
30 |
(cflags (list (format "-I%s" src) (format "-O%d" (or o-level 2)))) |
31 |
(ldlibs (if (memq system-type '(windows-nt berkeley-unix)) |
32 |
- (list "-lm") |
33 |
- (list "-lm" "-ldl"))) |
34 |
+ (list "-lm" "-lsqlite3") |
35 |
+ (list "-lm" "-ldl" "-lsqlite3"))) |
36 |
(options (emacsql-sqlite-compile-switches)) |
37 |
(output (list "-o" emacsql-sqlite-executable)) |
38 |
(arguments (nconc cflags options files ldlibs output))) |