Author: bugman
Date: Fri Jun  6 09:15:26 2014
New Revision: 23674
URL: http://svn.gna.org/viewcvs/relax?rev=23674&view=rev
Log:
The compilation of the C modules now respects the user defined environment.
This is the patch from Justin (https://gna.org/users/jlec) attached to bug 
#22145
(https://gna.org/bugs/?22145).  It has been modified to include a comment and 
remove a double empty
line.
Modified:
    trunk/sconstruct
Modified: trunk/sconstruct
URL: 
http://svn.gna.org/viewcvs/relax/trunk/sconstruct?rev=23674&r1=23673&r2=23674&view=diff
==============================================================================
--- trunk/sconstruct    (original)
+++ trunk/sconstruct    Fri Jun  6 09:15:26 2014
@@ -25,7 +25,7 @@
 
 
 # Import statements.
-from os import F_OK, access, getcwd, path, remove, rmdir, sep, walk
+from os import F_OK, access, getcwd, path, remove, rmdir, sep, walk, environ
 import platform
 from re import search
 from shutil import rmtree
@@ -630,6 +630,11 @@
         for file in files:
             nodes.append(env.SharedObject(dir + path.sep + file, 
CCFLAGS=cflags))
 
+        # Respect the user environment, specifically compiler, compiler- and 
linkerflags.
+        env.Append(LINKFLAGS = environ['LDFLAGS'])
+        env.Append(CFLAGS = environ['CFLAGS'])
+        env.Replace(CC = environ['CC'])
+
         # Build the relaxation curve fitting module.
         self.relax_fit_object = env.SharedLibrary(target=dir + path.sep + 
'relax_fit', source=nodes, SHLIBPREFIX=prefix, SHLIBSUFFIX=suffix)