diff --git a/lib/spack/spack/build_systems/autotools.py b/lib/spack/spack/build_systems/autotools.py
index f07a2169ac03f32b852b1d0d7845c52ec68e7e93..1ea238e2d162fdc6d2dee16f799b0305bdbdfcc4 100644
--- a/lib/spack/spack/build_systems/autotools.py
+++ b/lib/spack/spack/build_systems/autotools.py
@@ -123,10 +123,10 @@ def _do_patch_config_files(self):
                 # 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)
+                config_path = next((os.path.abspath(os.path.join(r, f))
                                     for r, ds, fs in os.walk('.') for f in fs
                                     if f == config_file), None)
-                my_config_files[config_name] = os.path.abspath(config_path)
+                my_config_files[config_name] = config_path
 
             if my_config_files[config_name] is not None:
                 try: