summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-06-19 14:45:35 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-06-19 14:45:35 +0200
commitf370bd47b058677ffa108d7312bb6ff2609ac4e3 (patch)
tree4c7c7ba30c0ac6cfcd1f280f856031a55d855106
parent7646eb6a0fe9c28cdd006493502bd4b36ccfd2bc (diff)
downloadsamba-f370bd47b058677ffa108d7312bb6ff2609ac4e3.tar.gz
samba-f370bd47b058677ffa108d7312bb6ff2609ac4e3.tar.bz2
samba-f370bd47b058677ffa108d7312bb6ff2609ac4e3.zip
wafsamba: Allow manually specifying cflags/ldflags for system libraries.
-rw-r--r--buildtools/wafsamba/samba_autoconf.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 3551e0263b..3f9aa3a34d 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -449,13 +449,14 @@ def library_flags(conf, libs):
ccflags = []
ldflags = []
for lib in TO_LIST(libs):
- inc_path = None
inc_path = getattr(conf.env, 'CPPPATH_%s' % lib.upper(), [])
lib_path = getattr(conf.env, 'LIBPATH_%s' % lib.upper(), [])
- for i in inc_path:
- ccflags.append('-I%s' % i)
- for l in lib_path:
- ldflags.append('-L%s' % l)
+ ccflags.extend(['-I%s' % i for i in inc_path])
+ ldflags.extend(['-L%s' % l for l in lib_path])
+ extra_ccflags = TO_LIST(getattr(conf.env, 'CCFLAGS_%s' % lib.upper(), []))
+ extra_ldflags = TO_LIST(getattr(conf.env, 'LDFLAGS_%s' % lib.upper(), []))
+ ccflags.extend(extra_ccflags)
+ ldflags.extend(extra_ldflags)
return (ccflags, ldflags)