lib/autobuild/packages/autotools.rb in autobuild-1.5.0 vs lib/autobuild/packages/autotools.rb in autobuild-1.5.1
- old
+ new
@@ -136,31 +136,35 @@
else
# Autodetect autoconf/aclocal/automake
#
# Let the user disable the use of autoconf explicitely by using 'false'.
# 'nil' means autodetection
- using[:autoconf] = true if using[:autoconf].nil?
+ if using[:autoconf].nil?
+ if File.file?(File.join(srcdir, 'configure.in')) || File.file?(File.join(srcdir, 'configure.ac'))
+ using[:autoconf] = true
+ end
+ end
using[:aclocal] = using[:autoconf] if using[:aclocal].nil?
if using[:automake].nil?
using[:automake] = File.exists?(File.join(srcdir, 'Makefile.am'))
end
+ if using[:libtool].nil?
+ using[:libtool] = File.exists?(File.join(srcdir, 'ltmain.sh'))
+ end
+ if using[:libtool]
+ Subprocess.run(self, 'configure', Autobuild.tool('libtoolize'), '--copy')
+ end
+
[ :aclocal, :autoconf, :autoheader, :automake ].each do |tool|
if tool_flag = using[tool]
tool_program = if tool_flag.respond_to?(:to_str)
tool_flag.to_str
else; Autobuild.tool(tool)
end
Subprocess.run(self, 'configure', tool_program)
end
- end
-
- if using[:libtool].nil?
- using[:libtool] = File.exists?(File.join(srcdir, 'ltmain.sh'))
- end
- if using[:libtool]
- Subprocess.run(self, 'configure', Autobuild.tool('libtoolize'), '--copy')
end
end
end
end