summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/autoconf.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-09-14 00:34:10 +0800
committerruki <[email protected]>2019-09-13 21:25:01 +0800
commit56021b09ccfadde89756298c7d9afd688c896d21 (patch)
tree36583a33a2dfe80c0e86fa66d54f97c31942e688 /xmake/modules/package/tools/autoconf.lua
parent0e7517f359db6abf0afe7c6380d68a0b17cadfff (diff)
fix autoconf for mingw
Diffstat (limited to 'xmake/modules/package/tools/autoconf.lua')
-rw-r--r--xmake/modules/package/tools/autoconf.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua
index 349b2c5b5..f32c64805 100644
--- a/xmake/modules/package/tools/autoconf.lua
+++ b/xmake/modules/package/tools/autoconf.lua
@@ -93,6 +93,19 @@ function buildenvs(package)
envs.ARFLAGS = table.concat(table.wrap(package:build_getenv("arflags")), ' ')
envs.LDFLAGS = table.concat(table.wrap(package:build_getenv("ldflags")), ' ')
envs.SHFLAGS = table.concat(table.wrap(package:build_getenv("shflags")), ' ')
+ if package:is_plat("mingw") then
+ -- fix linker error, @see https://github.com/xmake-io/xmake/issues/574
+ -- libtool: line 1855: lib: command not found
+ envs.ARFLAGS = nil
+ local ld = envs.LD
+ if ld then
+ if ld:endswith("x86_64-w64-mingw32-g++") then
+ envs.LD = path.join(path.directory(ld), "x86_64-w64-mingw32-ld")
+ elseif ld:endswith("i686-w64-mingw32-g++") then
+ envs.LD = path.join(path.directory(ld), "i686-w64-mingw32-ld")
+ end
+ end
+ end
end
local ACLOCAL_PATH = {}
local PKG_CONFIG_PATH = {}