This essentially reverts #18917 as it seems to no longer be necessary due to recent autotools changes in core spack.