aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/cfg.lua23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua
index 63285229..efe5de36 100644
--- a/src/luarocks/cfg.lua
+++ b/src/luarocks/cfg.lua
@@ -69,6 +69,10 @@ elseif system == "OpenBSD" then
69 detected.unix = true 69 detected.unix = true
70 detected.openbsd = true 70 detected.openbsd = true
71 detected.bsd = true 71 detected.bsd = true
72elseif system == "NetBSD" then
73 detected.unix = true
74 detected.netbsd = true
75 detected.bsd = true
72elseif system == "Darwin" then 76elseif system == "Darwin" then
73 detected.unix = true 77 detected.unix = true
74 detected.macosx = true 78 detected.macosx = true
@@ -315,6 +319,8 @@ if detected.unix then
315 defaults.variables.CFLAGS = "-O2" 319 defaults.variables.CFLAGS = "-O2"
316 defaults.cmake_generator = "Unix Makefiles" 320 defaults.cmake_generator = "Unix Makefiles"
317 defaults.platforms = { "unix" } 321 defaults.platforms = { "unix" }
322 defaults.variables.CC = "gcc"
323 defaults.variables.LD = "gcc"
318 defaults.variables.LIBFLAG = "-shared" 324 defaults.variables.LIBFLAG = "-shared"
319 defaults.external_deps_patterns = { 325 defaults.external_deps_patterns = {
320 bin = { "?" }, 326 bin = { "?" },
@@ -345,7 +351,8 @@ if detected.cygwin then
345end 351end
346 352
347if detected.bsd then 353if detected.bsd then
348 defaults.variables.STATFLAG = "-f '%Op'" 354 defaults.variables.MAKE = "gmake"
355 defaults.variables.STATFLAG = "-f '%OLp'"
349end 356end
350 357
351if detected.macosx then 358if detected.macosx then
@@ -361,18 +368,11 @@ end
361if detected.linux then 368if detected.linux then
362 defaults.arch = "linux-"..proc 369 defaults.arch = "linux-"..proc
363 defaults.platforms = {"unix", "linux"} 370 defaults.platforms = {"unix", "linux"}
364 defaults.variables.CC = "gcc"
365 defaults.variables.LD = "gcc"
366 defaults.variables.LIBFLAG = "-shared"
367end 371end
368 372
369if detected.freebsd then 373if detected.freebsd then
370 defaults.arch = "freebsd-"..proc 374 defaults.arch = "freebsd-"..proc
371 defaults.platforms = {"unix", "bsd", "freebsd"} 375 defaults.platforms = {"unix", "bsd", "freebsd"}
372 defaults.variables.MAKE = "gmake"
373 defaults.variables.CC = "gcc"
374 defaults.variables.LD = "gcc"
375 defaults.variables.LIBFLAG = "-shared"
376end 376end
377 377
378if detected.openbsd then 378if detected.openbsd then
@@ -380,12 +380,15 @@ if detected.openbsd then
380 defaults.platforms = {"unix", "bsd", "openbsd"} 380 defaults.platforms = {"unix", "bsd", "openbsd"}
381end 381end
382 382
383if detected.netbsd then
384 defaults.arch = "netbsd-"..proc
385 defaults.platforms = {"unix", "bsd", "netbsd"}
386end
387
383if detected.solaris then 388if detected.solaris then
384 defaults.arch = "solaris-"..proc 389 defaults.arch = "solaris-"..proc
385 defaults.platforms = {"unix", "solaris"} 390 defaults.platforms = {"unix", "solaris"}
386 defaults.variables.MAKE = "gmake" 391 defaults.variables.MAKE = "gmake"
387 defaults.variables.CC = "gcc"
388 defaults.variables.LD = "gcc"
389end 392end
390 393
391-- Expose some more values detected by LuaRocks for use by rockspec authors. 394-- Expose some more values detected by LuaRocks for use by rockspec authors.