autotools: Fix config.guess detection, take two (#17333)
The previous fix from #17149 contained a thinko that produced errors for packages that overwrite configure_directory.
This commit is contained in:
parent
eb3792ec65
commit
e9e2a84be1
@ -117,17 +117,15 @@ def _do_patch_config_files(self):
|
|||||||
config_file = 'config.{0}'.format(config_name)
|
config_file = 'config.{0}'.format(config_name)
|
||||||
if os.path.exists(config_file):
|
if os.path.exists(config_file):
|
||||||
# First search the top-level source directory
|
# First search the top-level source directory
|
||||||
my_config_files[config_name] = os.path.join(
|
my_config_files[config_name] = os.path.abspath(config_file)
|
||||||
self.configure_directory, config_file)
|
|
||||||
else:
|
else:
|
||||||
# Then search in all sub directories recursively.
|
# Then search in all sub directories recursively.
|
||||||
# We would like to use AC_CONFIG_AUX_DIR, but not all packages
|
# We would like to use AC_CONFIG_AUX_DIR, but not all packages
|
||||||
# ship with their configure.in or configure.ac.
|
# ship with their configure.in or configure.ac.
|
||||||
config_path = next((os.path.join(r, f)
|
config_path = next((os.path.join(r, f)
|
||||||
for r, ds, fs in os.walk(
|
for r, ds, fs in os.walk('.') for f in fs
|
||||||
self.configure_directory) for f in fs
|
|
||||||
if f == config_file), None)
|
if f == config_file), None)
|
||||||
my_config_files[config_name] = config_path
|
my_config_files[config_name] = os.path.abspath(config_path)
|
||||||
|
|
||||||
if my_config_files[config_name] is not None:
|
if my_config_files[config_name] is not None:
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user