From dce590fb21af844230727b283f6c8bf759ea805c Mon Sep 17 00:00:00 2001
From: Todd Gamblin <tgamblin@llnl.gov>
Date: Sat, 26 Mar 2016 19:59:02 -0700
Subject: Add a dso_suffix variable to build_environment

- Consolidate this in one place so that we don't have to do it in every build.

- Will update further once better OS support is committed.  Shoudl
  really be an attribute of the forthcoming `Platform` class.
---
 lib/spack/spack/build_environment.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index 119a255a34..640db0c1d1 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -59,6 +59,11 @@ SPACK_SHORT_SPEC       = 'SPACK_SHORT_SPEC'
 SPACK_DEBUG_LOG_DIR    = 'SPACK_DEBUG_LOG_DIR'
 
 
+# Platform-specific library suffix.
+dso_suffix = 'dylib' if sys.platform == 'darwin' else 'so'
+
+
+
 class MakeExecutable(Executable):
     """Special callable executable object for make so the user can
        specify parallel or not on a per-invocation basis.  Using
@@ -246,6 +251,9 @@ def set_module_variables_for_package(pkg, module):
     # a Prefix object.
     m.prefix  = pkg.prefix
 
+    # Platform-specific library suffix.
+    m.dso_suffix = dso_suffix
+
 
 def get_rpaths(pkg):
     """Get a list of all the rpaths for a package."""
-- 
cgit v1.2.3-70-g09d2