Description: Change buildsystem setup for Debian
Forwarded: not-needed
Author: Michael Hanke <michael.hanke@gmail.com>
--- a/build
+++ b/build
@@ -180,6 +180,15 @@ if profile:
   ld_flags = ld_flags_profile
   ld_lib_flags = ld_lib_flags_profile
 
+# honor the environment
+try:
+  # the splitting is needed because the command is submitted as a list
+  # and we need individual options -- it may not be that simple though...
+  env_flags = os.environ['LDFLAGS'].split()
+  ld_flags.extend(env_flags)
+  ld_lib_flags.extend(env_flags)
+except:
+  pass
 
 # used to set install_name on MacOSX:
 ld_lib_flags = [ entry.replace ('LIBNAME', libname) for entry in ld_lib_flags ]
