diff options
author | wohali <joant@ieee.org> | 2012-10-03 04:48:03 -0400 |
---|---|---|
committer | wohali <joant@ieee.org> | 2012-10-03 04:48:03 -0400 |
commit | 3d1812d5ef567a023e68458b1c040b3aac8176e7 (patch) | |
tree | ae9fa0bb61422589b8a004c313d7ae1af97602f0 /couchjs | |
parent | ce2fc13730266b220e7afd6809b0b1aa2123bd49 (diff) |
Support multiarch library paths on Linux.
Diffstat (limited to 'couchjs')
-rw-r--r-- | couchjs/c_src/SConscript | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/couchjs/c_src/SConscript b/couchjs/c_src/SConscript index 3f6a0cc7..ea78c587 100644 --- a/couchjs/c_src/SConscript +++ b/couchjs/c_src/SConscript @@ -1,4 +1,4 @@ -# Copyright 2010 Cloudant +# Copyright 2010-2012 Cloudant # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of @@ -11,8 +11,9 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations under # the License. -import os import commands +import os +import platform def require_lib(name): if not conf.CheckLib(name): @@ -25,6 +26,11 @@ def runcmd(cmd): env = Environment(CC="c++", CCFLAGS='-g -O2 -DXP_UNIX', CPPPATH=os.getenv("CPPPATH")) +if os.uname()[0] == 'Linux': + platlibpath = "/usr/lib/%s-linux-gnu" % platform.machine() + if os.path.exists(platlibpath): + env.Append(LINKFLAGS="-L%s" % platlibpath) + if os.uname()[0] == 'SunOS': env['CC'] = '/usr/sfw/bin/gcc' env['CCFLAGS'] += ' -I/opt/local/include' |