From eb26228bccb92cb0c2fa23ff187abf36ba4b1f13 Mon Sep 17 00:00:00 2001 From: Robert Newson Date: Fri, 8 Apr 2011 08:53:20 +0100 Subject: add Solaris build support. --- README.Solaris | 4 ++++ apps/couch/rebar.config | 4 +++- configure | 2 +- couchjs/c_src/SConscript | 5 +++++ rel/overlay/bin/bigcouch | 2 +- 5 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 README.Solaris diff --git a/README.Solaris b/README.Solaris new file mode 100644 index 00000000..bcfb243d --- /dev/null +++ b/README.Solaris @@ -0,0 +1,4 @@ + +To build on solaris, you will need some additional packages. + +sudo pkgin install erlang-14.1.1 spidermonkey-1.8.0 icu-4.2.1 scmgit-1.7.0.7 diff --git a/apps/couch/rebar.config b/apps/couch/rebar.config index 94291c70..25b7e569 100644 --- a/apps/couch/rebar.config +++ b/apps/couch/rebar.config @@ -4,5 +4,7 @@ {"DRV_LDFLAGS", "$DRV_LDFLAGS -lm -licuuc -licudata -licui18n -lpthread"}, {"linux", "DRV_LDFLAGS", "$DRV_LDFLAGS -lcrypt"}, {"freebsd", "DRV_CFLAGS", "$DRV_CFLAGS -I/usr/local/include"}, - {"freebsd", "DRV_LDFLAGS", "$DRV_LDFLAGS -L/usr/local/lib"} + {"freebsd", "DRV_LDFLAGS", "$DRV_LDFLAGS -L/usr/local/lib"}, + {"solaris", "CC", "/usr/sfw/bin/gcc"}, + {"solaris", "DRV_LDFLAGS", "$DRV_LDFLAGS -L/opt/local/lib"} ]}. diff --git a/configure b/configure index f7ae3a31..43231b62 100755 --- a/configure +++ b/configure @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Copyright 2010 Cloudant # # Licensed under the Apache License, Version 2.0 (the "License"); you may not diff --git a/couchjs/c_src/SConscript b/couchjs/c_src/SConscript index f61cdf8b..7837be58 100644 --- a/couchjs/c_src/SConscript +++ b/couchjs/c_src/SConscript @@ -20,6 +20,11 @@ def require_lib(name): env = Environment(CCFLAGS='-g -O2 -DXP_UNIX') +if os.uname()[0] == 'SunOS': + env['CC'] = '/usr/sfw/bin/gcc' + env['CCFLAGS'] += ' -I/opt/local/include' + env.Append(LINKFLAGS=['-L/opt/local/lib']) + if os.uname()[0] == 'FreeBSD': env['CCFLAGS'] += ' -I/usr/local/include' env.Append(LINKFLAGS=['-L/usr/local/lib']) diff --git a/rel/overlay/bin/bigcouch b/rel/overlay/bin/bigcouch index 86aa29f4..22275daf 100755 --- a/rel/overlay/bin/bigcouch +++ b/rel/overlay/bin/bigcouch @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # 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 -- cgit v1.2.3