From: Emanuele Rocca <ema@debian.org>
Date: Thu, 20 Feb 2025 17:23:50 +0100
Subject: CXXFLAGS and LDFLAGS in SConstruct

---
 SConstruct | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/SConstruct b/SConstruct
index 8d7bd29..bf8350d 100644
--- a/SConstruct
+++ b/SConstruct
@@ -153,7 +153,10 @@ if version_at_least(SCons.__version__, "4.0"):
 
 
 env = Environment(variables=vars, ENV = os.environ)
-
+if 'CXXFLAGS' in os.environ:
+    env.Append(CXXFLAGS=os.environ['CXXFLAGS'].split())
+if 'LDFLAGS' in os.environ:
+    env.Append(LDFLAGS=os.environ['LDFLAGS'].split())
 
 build_path = env['build_dir']
 # If build_dir is a relative path then add a #build/ prefix:
