summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kuhn <michael.kuhn@informatik.uni-hamburg.de>2020-07-02 09:45:41 +0200
committerPeter Scheibel <scheibel1@llnl.gov>2020-07-10 13:05:49 -0700
commit44681dbca51447142e28b8bf941ba74a7a08c3eb (patch)
tree3e8612b4cb02e79c10c5d4124131efdd1d45a9bf
parentd4bf70d9882fcfe88507e9cb444331d7dd7ba71c (diff)
downloadspack-44681dbca51447142e28b8bf941ba74a7a08c3eb.tar.gz
spack-44681dbca51447142e28b8bf941ba74a7a08c3eb.tar.bz2
spack-44681dbca51447142e28b8bf941ba74a7a08c3eb.tar.xz
spack-44681dbca51447142e28b8bf941ba74a7a08c3eb.zip
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.
-rw-r--r--lib/spack/spack/build_systems/autotools.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/spack/spack/build_systems/autotools.py b/lib/spack/spack/build_systems/autotools.py
index 27a3ee7657..f07a2169ac 100644
--- a/lib/spack/spack/build_systems/autotools.py
+++ b/lib/spack/spack/build_systems/autotools.py
@@ -118,17 +118,15 @@ class AutotoolsPackage(PackageBase):
config_file = 'config.{0}'.format(config_name)
if os.path.exists(config_file):
# First search the top-level source directory
- my_config_files[config_name] = os.path.join(
- self.configure_directory, config_file)
+ my_config_files[config_name] = os.path.abspath(config_file)
else:
# Then search in all sub directories recursively.
# We would like to use AC_CONFIG_AUX_DIR, but not all packages
# ship with their configure.in or configure.ac.
config_path = next((os.path.join(r, f)
- for r, ds, fs in os.walk(
- self.configure_directory) for f in fs
+ for r, ds, fs in os.walk('.') for f in fs
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:
try: