瀏覽代碼

improve sqlite3

ruki 4 年之前
父節點
當前提交
dd4dabe730
共有 1 個文件被更改,包括 10 次插入1 次删除
  1. 10 1
      packages/s/sqlite3/xmake.lua

+ 10 - 1
packages/s/sqlite3/xmake.lua

@@ -32,7 +32,16 @@ package("sqlite3")
     end)
 
     on_install("macosx", "linux", function (package)
-        import("package.tools.autoconf").install(package, {package:debug() and "--enable-debug" or ""})
+        local configs = {}
+        table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
+        table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
+        if package:config("pic") ~= false then
+            table.insert(configs, "--with-pic")
+        end
+        if package:debug() then
+            table.insert(configs, "--enable-debug")
+        end
+        import("package.tools.autoconf").install(package, configs)
     end)
 
     on_test(function (package)