summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/autoconf.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-02-19 23:06:29 +0800
committerruki <[email protected]>2020-02-19 12:38:56 +0800
commited49fcb8e77087a12b01cae2bb7841a75a25b0fc (patch)
tree25877850c5751989bf46251afc57c3495f7ea223 /xmake/modules/package/tools/autoconf.lua
parente630b2edcccc8fd988f630959ac0cda5933251da (diff)
support cross-compilation for autotools
Diffstat (limited to 'xmake/modules/package/tools/autoconf.lua')
-rw-r--r--xmake/modules/package/tools/autoconf.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua
index a93bb6a80..3dbc7853a 100644
--- a/xmake/modules/package/tools/autoconf.lua
+++ b/xmake/modules/package/tools/autoconf.lua
@@ -29,7 +29,7 @@ function _get_configs(package, configs)
table.insert(configs, "--prefix=" .. package:installdir())
-- add host for cross-complation
- if not configs.host and not package:is_plat(os.host()) then
+ if not configs.host and not package:is_plat(os.subhost()) then
if package:is_plat("iphoneos") then
local triples =
{
@@ -71,7 +71,7 @@ end
-- get the build environments
function buildenvs(package)
local envs = {}
- if package:is_plat(os.host()) then
+ if package:is_plat(os.subhost()) then
local cflags = table.join(table.wrap(package:config("cxflags")), package:config("cflags"))
local cxxflags = table.join(table.wrap(package:config("cxflags")), package:config("cxxflags"))
envs.CFLAGS = table.concat(cflags, ' ')