diff options
author | Adam Kocoloski <adam@cloudant.com> | 2011-01-04 15:14:58 -0500 |
---|---|---|
committer | Adam Kocoloski <adam@cloudant.com> | 2011-01-04 15:19:06 -0500 |
commit | 0ddca37246a5541b38a266809fb77cfeeeb174f7 (patch) | |
tree | 7c438999b10eaeeb7f573b6212765aada3ea2cdc /couchjs | |
parent | 11af04ba67499a5aa3e85076b223c5ae8a9b500b (diff) | |
parent | 582e1f9f93d8d6896320edad103a8027bdaf8006 (diff) |
Merge pull request #29 for FreeBSD compatibility
Diffstat (limited to 'couchjs')
-rw-r--r-- | couchjs/c_src/SConscript | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/couchjs/c_src/SConscript b/couchjs/c_src/SConscript index 757e0289..f61cdf8b 100644 --- a/couchjs/c_src/SConscript +++ b/couchjs/c_src/SConscript @@ -11,6 +11,7 @@ # 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 def require_lib(name): if not conf.CheckLib(name): @@ -18,6 +19,14 @@ def require_lib(name): Exit(1) env = Environment(CCFLAGS='-g -O2 -DXP_UNIX') + +if os.uname()[0] == 'FreeBSD': + env['CCFLAGS'] += ' -I/usr/local/include' + env.Append(LINKFLAGS=['-L/usr/local/lib']) + env['LIB_DL'] = env['LIB_RT'] = '' + env['LIB_COMPAT'] = 'compat' + + if not env.GetOption('clean'): conf = Configure(env, config_h='config.h') |