From 79836520d989a19bc49b912698b22fdc8a65ca59 Mon Sep 17 00:00:00 2001
From: citibeth <rpf2116@columbia.edu>
Date: Sun, 3 Apr 2016 21:38:29 -0400
Subject: [PATCH] Fixed up to work on a machine without any system-install tcl.

---
 .../builtin/packages/environment-modules/package.py      | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/var/spack/repos/builtin/packages/environment-modules/package.py b/var/spack/repos/builtin/packages/environment-modules/package.py
index cc5d76760e..45181da41b 100644
--- a/var/spack/repos/builtin/packages/environment-modules/package.py
+++ b/var/spack/repos/builtin/packages/environment-modules/package.py
@@ -14,16 +14,21 @@ class EnvironmentModules(Package):
     depends_on('tcl')
 
     def install(self, spec, prefix):
+        tcl_spec = spec['tcl']
+
         # See: https://sourceforge.net/p/modules/bugs/62/
         CPPFLAGS = ['-DUSE_INTERP_ERRORLINE']
         config_args = [
-            '--prefix=%s' % prefix,
+            "--without-tclx",
+            "--with-tclx-ver=0.0",
+            "--prefix=%s" % prefix,
+            "--with-tcl=%s" % join_path(tcl_spec.prefix, 'lib'),    # It looks for tclConfig.sh
+            "--with-tcl-ver=%d.%d" % (tcl_spec.version.version[0], tcl_spec.version.version[1]),
             '--disable-debug',
             '--disable-dependency-tracking',
             '--disable-silent-rules',
             '--disable-versioning', 
             '--datarootdir=%s' % prefix.share,
-            '--with-tcl=%s' % join_path(spec['tcl'].prefix, 'lib'),    # It looks for tclConfig.sh
             'CPPFLAGS=%s' % ' '.join(CPPFLAGS)
         ]
 
-- 
GitLab