From 9f9ef89aa3bbc51e364908469d5aabd351aa1c7c Mon Sep 17 00:00:00 2001 From: Chen Yufei Date: Wed, 12 Jan 2022 17:49:53 +0800 Subject: autoconf: run autoreconf for configure.in configure.in is the old name for autoconf input. --- xmake/modules/package/tools/autoconf.lua | 6 ++++-- xmake/modules/private/action/trybuild/autotools.lua | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua index 12b94d64f..ed5157f8a 100644 --- a/xmake/modules/package/tools/autoconf.lua +++ b/xmake/modules/package/tools/autoconf.lua @@ -325,8 +325,10 @@ function configure(package, configs, opt) if not os.isfile("configure") then if os.isfile("autogen.sh") then os.vrunv("sh", {"./autogen.sh"}, {envs = autogen_envs(package, opt)}) - elseif os.isfile("configure.ac") then - os.vrunv("sh", {"autoreconf", "--install", "--symlink"}, {envs = autogen_envs(package, opt)}) + elseif os.isfile("configure.ac") or os.isfile("configure.in") then + local autoreconf = find_tool("autoreconf") + assert(autoreconf, "autoreconf not found!") + os.vrunv("sh", {autoreconf.program, "--install", "--symlink"}, {envs = autogen_envs(package, opt)}) end end diff --git a/xmake/modules/private/action/trybuild/autotools.lua b/xmake/modules/private/action/trybuild/autotools.lua index 1d4090522..fe484c98e 100644 --- a/xmake/modules/private/action/trybuild/autotools.lua +++ b/xmake/modules/private/action/trybuild/autotools.lua @@ -221,8 +221,10 @@ function build() if not os.isfile("configure") then if os.isfile("autogen.sh") then os.vexecv("sh", {"./autogen.sh"}) - elseif os.isfile("configure.ac") then - os.vexecv("sh", {"autoreconf", "--install", "--symlink"}) + elseif os.isfile("configure.ac") or os.isfile("configure.in") then + local autoreconf = find_tool("autoreconf") + assert(autoreconf, "autoreconf not found!") + os.vexecv("sh", {autoreconf.program, "--install", "--symlink"}) end end -- cgit v1.3.1