branch: elpa/emacsql commit a118b6c95af1306f0288a383d274b5dd93efbbda Author: Christopher Wellons <well...@nullprogram.com> Commit: Christopher Wellons <well...@nullprogram.com>
Don't use -lm flag on Windows (#55) No C implementation on Windows actually has a math library separate from the standard library. Mingw-w64 has an empty stub for compatilibilty. --- emacsql-sqlite.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/emacsql-sqlite.el b/emacsql-sqlite.el index 584da8d437..b14d1ac52b 100644 --- a/emacsql-sqlite.el +++ b/emacsql-sqlite.el @@ -165,9 +165,10 @@ If called with non-nil ASYNC the return value is meaningless." (files (mapcar (lambda (f) (expand-file-name f src)) '("sqlite3.c" "emacsql.c"))) (cflags (list (format "-I%s" src) (format "-O%d" (or o-level 2)))) - (ldlibs (if (memq system-type '(windows-nt berkeley-unix)) - (list "-lm") - (list "-lm" "-ldl"))) + (ldlibs (cl-case system-type + (windows-nt (list)) + (berkeley-unix (list "-lm")) + (otherwise (list "-lm" "-ldl")))) (options (emacsql-sqlite-compile-switches)) (output (list "-o" emacsql-sqlite-executable)) (arguments (nconc cflags options files ldlibs output)))