summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-06-28 15:50:47 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-06-28 15:50:47 +0000
commitcaec161501b7157e102c7e6532084616e8dce176 (patch)
tree309db281ba8898f82b385aff3c36369bc34a9031 /sca-cpp/trunk/modules
parent1e9176c21306dd9af9671f3599c377811f73bebc (diff)
Port to Mac OS X 10.6.7.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1140690 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules')
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/graph/graph.js3
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/public/notauth.html2
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/public/notfound.html2
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/public/notyet.html2
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/public/oops.html2
-rwxr-xr-xsca-cpp/trunk/modules/edit/ssl-start4
-rwxr-xr-xsca-cpp/trunk/modules/edit/start4
-rw-r--r--sca-cpp/trunk/modules/http/Makefile.am10
-rwxr-xr-xsca-cpp/trunk/modules/http/basic-auth-conf4
-rwxr-xr-xsca-cpp/trunk/modules/http/cert-auth-conf4
-rwxr-xr-xsca-cpp/trunk/modules/http/form-auth-conf4
-rwxr-xr-xsca-cpp/trunk/modules/http/group-auth-conf4
-rwxr-xr-xsca-cpp/trunk/modules/http/http-test2
-rwxr-xr-xsca-cpp/trunk/modules/http/httpd-addr1
-rwxr-xr-xsca-cpp/trunk/modules/http/httpd-conf19
-rwxr-xr-xsca-cpp/trunk/modules/http/httpd-debug4
-rwxr-xr-xsca-cpp/trunk/modules/http/httpd-event-conf4
-rwxr-xr-xsca-cpp/trunk/modules/http/httpd-memgrind4
-rwxr-xr-xsca-cpp/trunk/modules/http/httpd-restart4
-rwxr-xr-xsca-cpp/trunk/modules/http/httpd-ssl-conf6
-rwxr-xr-xsca-cpp/trunk/modules/http/httpd-start4
-rwxr-xr-xsca-cpp/trunk/modules/http/httpd-stop4
-rwxr-xr-xsca-cpp/trunk/modules/http/httpd-test4
-rwxr-xr-xsca-cpp/trunk/modules/http/httpd-worker-conf4
-rwxr-xr-xsca-cpp/trunk/modules/http/mod-security-conf4
-rwxr-xr-xsca-cpp/trunk/modules/http/open-auth-conf4
-rwxr-xr-xsca-cpp/trunk/modules/http/passwd-auth-conf4
-rwxr-xr-xsca-cpp/trunk/modules/http/proxy-conf4
-rwxr-xr-xsca-cpp/trunk/modules/http/proxy-member-conf4
-rwxr-xr-xsca-cpp/trunk/modules/http/proxy-ssl-conf4
-rwxr-xr-xsca-cpp/trunk/modules/http/proxy-ssl-member-conf4
-rwxr-xr-xsca-cpp/trunk/modules/http/proxy-test2
-rwxr-xr-xsca-cpp/trunk/modules/http/ssl-ca-conf8
-rwxr-xr-xsca-cpp/trunk/modules/http/ssl-cert-conf8
-rwxr-xr-xsca-cpp/trunk/modules/http/ssl-cert-find10
-rwxr-xr-xsca-cpp/trunk/modules/http/tunnel-ssl-conf4
-rwxr-xr-xsca-cpp/trunk/modules/http/vhost-conf8
-rwxr-xr-xsca-cpp/trunk/modules/http/vhost-ssl-conf8
-rw-r--r--sca-cpp/trunk/modules/java/Makefile.am6
-rwxr-xr-xsca-cpp/trunk/modules/java/java-conf13
-rwxr-xr-xsca-cpp/trunk/modules/java/server-test2
-rwxr-xr-xsca-cpp/trunk/modules/java/wiring-test4
-rwxr-xr-xsca-cpp/trunk/modules/js/util-test4
-rw-r--r--sca-cpp/trunk/modules/oauth/Makefile.am10
-rwxr-xr-xsca-cpp/trunk/modules/oauth/oauth-conf15
-rwxr-xr-xsca-cpp/trunk/modules/oauth/oauth-memcached-conf4
-rwxr-xr-xsca-cpp/trunk/modules/oauth/oauth1-appkey-conf4
-rwxr-xr-xsca-cpp/trunk/modules/oauth/oauth2-appkey-conf4
-rwxr-xr-xsca-cpp/trunk/modules/oauth/start-mixed-test2
-rwxr-xr-xsca-cpp/trunk/modules/openid/openid-conf4
-rwxr-xr-xsca-cpp/trunk/modules/openid/openid-memcached-conf4
-rwxr-xr-xsca-cpp/trunk/modules/openid/openid-step2-conf4
-rw-r--r--sca-cpp/trunk/modules/python/Makefile.am6
-rwxr-xr-xsca-cpp/trunk/modules/python/python-conf13
-rwxr-xr-xsca-cpp/trunk/modules/python/server-test2
-rwxr-xr-xsca-cpp/trunk/modules/python/wiring-test4
-rwxr-xr-xsca-cpp/trunk/modules/scdl/validate-test2
-rw-r--r--sca-cpp/trunk/modules/server/Makefile.am16
-rwxr-xr-xsca-cpp/trunk/modules/server/cpp-conf13
-rwxr-xr-xsca-cpp/trunk/modules/server/httpd-test4
-rwxr-xr-xsca-cpp/trunk/modules/server/scheme-conf13
-rwxr-xr-xsca-cpp/trunk/modules/server/server-conf15
-rwxr-xr-xsca-cpp/trunk/modules/server/server-test2
-rwxr-xr-xsca-cpp/trunk/modules/server/wiring-test4
-rwxr-xr-xsca-cpp/trunk/modules/wsgi/gae-start4
-rwxr-xr-xsca-cpp/trunk/modules/wsgi/gae-stop4
-rwxr-xr-xsca-cpp/trunk/modules/wsgi/gae-test2
-rwxr-xr-xsca-cpp/trunk/modules/wsgi/http-test4
-rwxr-xr-xsca-cpp/trunk/modules/wsgi/server-test2
-rwxr-xr-xsca-cpp/trunk/modules/wsgi/util-test4
-rwxr-xr-xsca-cpp/trunk/modules/wsgi/wiring-test4
-rwxr-xr-xsca-cpp/trunk/modules/wsgi/wsgi-start4
-rwxr-xr-xsca-cpp/trunk/modules/wsgi/wsgi-stop4
-rwxr-xr-xsca-cpp/trunk/modules/wsgi/wsgi-test4
74 files changed, 222 insertions, 169 deletions
diff --git a/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js b/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js
index 9d38fe6c6d..2ef53fa54a 100644
--- a/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js
+++ b/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js
@@ -45,7 +45,8 @@ graph.colors.link = '#598edd';
graph.colors.orange1 = '#ffbb00';
graph.colors.green1 = '#96d333';
-graph.colors.blue1 = '#00c3c9';
+//graph.colors.blue1 = '#00c3c9';
+graph.colors.blue1 = '#0d7cc1';
graph.colors.red1 = '#d03f41';
graph.colors.yellow1 = '#fcee21';
graph.colors.magenta1 = '#c0688a';
diff --git a/sca-cpp/trunk/modules/edit/htdocs/public/notauth.html b/sca-cpp/trunk/modules/edit/htdocs/public/notauth.html
index f6daa1b8be..63f9de36f4 100644
--- a/sca-cpp/trunk/modules/edit/htdocs/public/notauth.html
+++ b/sca-cpp/trunk/modules/edit/htdocs/public/notauth.html
@@ -37,7 +37,7 @@
<div id="menu"></div>
<table style="width: 100%;">
-<tr><td><h1><span id="h1"></span></h1></td></tr>
+<tr><td><h2><span id="h1"></span></h2></td></tr>
</table>
<div style="margin-left: auto; margin-right: auto; text-align: center;">
diff --git a/sca-cpp/trunk/modules/edit/htdocs/public/notfound.html b/sca-cpp/trunk/modules/edit/htdocs/public/notfound.html
index ce9fd94e6e..0d1ce6bb6e 100644
--- a/sca-cpp/trunk/modules/edit/htdocs/public/notfound.html
+++ b/sca-cpp/trunk/modules/edit/htdocs/public/notfound.html
@@ -37,7 +37,7 @@
<div id="menu"></div>
<table style="width: 100%;">
-<tr><td><h1><span id="h1"></span></h1></td></tr>
+<tr><td><h2><span id="h1"></span></h2></td></tr>
</table>
<div style="margin-left: auto; margin-right: auto; text-align: center;">
diff --git a/sca-cpp/trunk/modules/edit/htdocs/public/notyet.html b/sca-cpp/trunk/modules/edit/htdocs/public/notyet.html
index f6b8db1912..01413549f6 100644
--- a/sca-cpp/trunk/modules/edit/htdocs/public/notyet.html
+++ b/sca-cpp/trunk/modules/edit/htdocs/public/notyet.html
@@ -36,7 +36,7 @@
<div id="menu"></div>
<table style="width: 100%;">
-<tr><td><h1><span id="h1"></span></h1></td></tr>
+<tr><td><h2><span id="h1"></span></h2></td></tr>
</table>
<div style="margin-left: auto; margin-right: auto; text-align: center;">
diff --git a/sca-cpp/trunk/modules/edit/htdocs/public/oops.html b/sca-cpp/trunk/modules/edit/htdocs/public/oops.html
index f8d7bb6747..5e4c638487 100644
--- a/sca-cpp/trunk/modules/edit/htdocs/public/oops.html
+++ b/sca-cpp/trunk/modules/edit/htdocs/public/oops.html
@@ -37,7 +37,7 @@
<div id="menu"></div>
<table style="width: 100%;">
-<tr><td><h1><span id="h1"></span></h1></td></tr>
+<tr><td><h2><span id="h1"></span></h2></td></tr>
</table>
<div style="margin-left: auto; margin-right: auto; text-align: center;">
diff --git a/sca-cpp/trunk/modules/edit/ssl-start b/sca-cpp/trunk/modules/edit/ssl-start
index c400c8a54a..53803e4ba0 100755
--- a/sca-cpp/trunk/modules/edit/ssl-start
+++ b/sca-cpp/trunk/modules/edit/ssl-start
@@ -20,8 +20,8 @@
# For this module to work, add the app domains to your /etc/hosts as follows:
# 127.0.0.1 sca-store.com abc.sca-store.com xyz.sca-store.com ...
-here=`readlink -f $0`; here=`dirname $here`
-jsprefix=`readlink -f $here/../js`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
+jsprefix=`echo "import os; print os.path.realpath('$here/../js')" | python`
# Create SSL certificates
../../modules/http/ssl-ca-conf tmp sca-store.com
diff --git a/sca-cpp/trunk/modules/edit/start b/sca-cpp/trunk/modules/edit/start
index 554061073b..7d259314bf 100755
--- a/sca-cpp/trunk/modules/edit/start
+++ b/sca-cpp/trunk/modules/edit/start
@@ -20,8 +20,8 @@
# For this module to work, add the app domains to your /etc/hosts as follows:
# 127.0.0.1 sca-store.com abc.sca-store.com xyz.sca-store.com ...
-here=`readlink -f $0`; here=`dirname $here`
-jsprefix=`readlink -f $here/../js`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
+jsprefix=`echo "import os; print os.path.realpath('$here/../js')" | python`
# Configure server with virtual hosting
../../modules/http/httpd-conf tmp sca-store.com 8090 htdocs
diff --git a/sca-cpp/trunk/modules/http/Makefile.am b/sca-cpp/trunk/modules/http/Makefile.am
index f6e95b3996..07a797926a 100644
--- a/sca-cpp/trunk/modules/http/Makefile.am
+++ b/sca-cpp/trunk/modules/http/Makefile.am
@@ -33,17 +33,17 @@ curl_connect_SOURCES = curl-connect.cpp
curl_connect_LDFLAGS = -lxml2 -lcurl -lmozjs
mod_LTLIBRARIES = libmod_tuscany_ssltunnel.la libmod_tuscany_openauth.la
-noinst_DATA = libmod_tuscany_ssltunnel.so libmod_tuscany_openauth.so
+noinst_DATA = libmod_tuscany_ssltunnel${libsuffix} libmod_tuscany_openauth${libsuffix}
libmod_tuscany_ssltunnel_la_SOURCES = mod-ssltunnel.cpp
libmod_tuscany_ssltunnel_la_LDFLAGS = -lxml2 -lcurl -lmozjs
-libmod_tuscany_ssltunnel.so:
- ln -s .libs/libmod_tuscany_ssltunnel.so
+libmod_tuscany_ssltunnel${libsuffix}:
+ ln -s .libs/libmod_tuscany_ssltunnel${libsuffix}
libmod_tuscany_openauth_la_SOURCES = mod-openauth.cpp
libmod_tuscany_openauth_la_LDFLAGS = -lxml2 -lcurl -lmozjs
-libmod_tuscany_openauth.so:
- ln -s .libs/libmod_tuscany_openauth.so
+libmod_tuscany_openauth${libsuffix}:
+ ln -s .libs/libmod_tuscany_openauth${libsuffix}
mod_DATA = httpd.prefix httpd-apachectl.prefix httpd-modules.prefix curl.prefix
nobase_dist_mod_DATA = conf/*
diff --git a/sca-cpp/trunk/modules/http/basic-auth-conf b/sca-cpp/trunk/modules/http/basic-auth-conf
index c3018e1174..d8c013d853 100755
--- a/sca-cpp/trunk/modules/http/basic-auth-conf
+++ b/sca-cpp/trunk/modules/http/basic-auth-conf
@@ -18,9 +18,9 @@
# under the License.
# Generate a minimal HTTPD basic authentication configuration
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"`
host=`echo $conf | awk '{ print $6 }'`
diff --git a/sca-cpp/trunk/modules/http/cert-auth-conf b/sca-cpp/trunk/modules/http/cert-auth-conf
index c6720c7ae4..38e396b60d 100755
--- a/sca-cpp/trunk/modules/http/cert-auth-conf
+++ b/sca-cpp/trunk/modules/http/cert-auth-conf
@@ -18,9 +18,9 @@
# under the License.
# Generate a minimal HTTPD certificate-based authentication configuration
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"`
host=`echo $conf | awk '{ print $6 }'`
diff --git a/sca-cpp/trunk/modules/http/form-auth-conf b/sca-cpp/trunk/modules/http/form-auth-conf
index 42b1a656f3..910f906078 100755
--- a/sca-cpp/trunk/modules/http/form-auth-conf
+++ b/sca-cpp/trunk/modules/http/form-auth-conf
@@ -18,9 +18,9 @@
# under the License.
# Generate a minimal HTTPD form authentication configuration
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"`
host=`echo $conf | awk '{ print $6 }'`
diff --git a/sca-cpp/trunk/modules/http/group-auth-conf b/sca-cpp/trunk/modules/http/group-auth-conf
index dc8dad8641..c9cd7f6e2e 100755
--- a/sca-cpp/trunk/modules/http/group-auth-conf
+++ b/sca-cpp/trunk/modules/http/group-auth-conf
@@ -17,9 +17,9 @@
# specific language governing permissions and limitations
# under the License.
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
user=$2
group="members"
diff --git a/sca-cpp/trunk/modules/http/http-test b/sca-cpp/trunk/modules/http/http-test
index 0db47fe189..e9ce572994 100755
--- a/sca-cpp/trunk/modules/http/http-test
+++ b/sca-cpp/trunk/modules/http/http-test
@@ -29,4 +29,4 @@ rc=$?
# Cleanup
./httpd-stop tmp
sleep 2
-return $rc
+exit $rc
diff --git a/sca-cpp/trunk/modules/http/httpd-addr b/sca-cpp/trunk/modules/http/httpd-addr
index 62fc775ea7..735c152f43 100755
--- a/sca-cpp/trunk/modules/http/httpd-addr
+++ b/sca-cpp/trunk/modules/http/httpd-addr
@@ -51,4 +51,3 @@ fi
if [ "$1" = "vhost" ]; then
echo $vhost
fi
-return 0
diff --git a/sca-cpp/trunk/modules/http/httpd-conf b/sca-cpp/trunk/modules/http/httpd-conf
index 769211a125..1fac0d56e2 100755
--- a/sca-cpp/trunk/modules/http/httpd-conf
+++ b/sca-cpp/trunk/modules/http/httpd-conf
@@ -18,11 +18,11 @@
# under the License.
# Generate a minimal HTTPD configuration
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
-jsprefix=`readlink -f $here/../js`
+jsprefix=`echo "import os; print os.path.realpath('$here/../js')" | python`
host=$2
port=`$here/httpd-addr port $3`
@@ -31,11 +31,18 @@ listen=`$here/httpd-addr listen $3`
vhost=`$here/httpd-addr vhost $3`
mkdir -p $4
-htdocs=`readlink -f $4`
+htdocs=`echo "import os; print os.path.realpath('$4')" | python`
user=`id -un`
group=`id -gn`
+uname=`uname -s`
+if [ $uname = "Darwin" ]; then
+ libsuffix=".dylib"
+else
+ libsuffix=".so"
+fi
+
modules_prefix=`cat $here/httpd-modules.prefix`
mkdir -p $root
@@ -225,8 +232,8 @@ LoadModule slotmem_shm_module ${modules_prefix}/modules/mod_slotmem_shm.so
LoadModule ratelimit_module ${modules_prefix}/modules/mod_ratelimit.so
LoadModule reqtimeout_module ${modules_prefix}/modules/mod_reqtimeout.so
-LoadModule mod_tuscany_ssltunnel $here/libmod_tuscany_ssltunnel.so
-LoadModule mod_tuscany_openauth $here/libmod_tuscany_openauth.so
+LoadModule mod_tuscany_ssltunnel $here/libmod_tuscany_ssltunnel$libsuffix
+LoadModule mod_tuscany_openauth $here/libmod_tuscany_openauth$libsuffix
EOF
diff --git a/sca-cpp/trunk/modules/http/httpd-debug b/sca-cpp/trunk/modules/http/httpd-debug
index 93a6bf81d4..df0d21fbe5 100755
--- a/sca-cpp/trunk/modules/http/httpd-debug
+++ b/sca-cpp/trunk/modules/http/httpd-debug
@@ -18,8 +18,8 @@
# under the License.
# Start httpd server
-here=`readlink -f $0`; here=`dirname $here`
-root=`readlink -f $1`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
+root=`echo "import os; print os.path.realpath('$1')" | python`
httpd=`cat $here/httpd.prefix`
$httpd/bin/httpd -X -E $root/logs/error_log -d $root -f $root/conf/httpd.conf
diff --git a/sca-cpp/trunk/modules/http/httpd-event-conf b/sca-cpp/trunk/modules/http/httpd-event-conf
index 58923d9dd9..7bef30600b 100755
--- a/sca-cpp/trunk/modules/http/httpd-event-conf
+++ b/sca-cpp/trunk/modules/http/httpd-event-conf
@@ -18,9 +18,9 @@
# under the License.
# Configure HTTPD to run with the event MPM
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
modules_prefix=`cat $here/httpd-modules.prefix`
diff --git a/sca-cpp/trunk/modules/http/httpd-memgrind b/sca-cpp/trunk/modules/http/httpd-memgrind
index 3219046c22..55e113bbd3 100755
--- a/sca-cpp/trunk/modules/http/httpd-memgrind
+++ b/sca-cpp/trunk/modules/http/httpd-memgrind
@@ -18,8 +18,8 @@
# under the License.
# Start httpd server
-here=`readlink -f $0`; here=`dirname $here`
-root=`readlink -f $1`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
+root=`echo "import os; print os.path.realpath('$1')" | python`
httpd=`cat $here/httpd.prefix`
$here/../../etc/memgrind $httpd/bin/httpd -X -E $root/logs/error_log -d $root -f $root/conf/httpd.conf
diff --git a/sca-cpp/trunk/modules/http/httpd-restart b/sca-cpp/trunk/modules/http/httpd-restart
index 3e3b687f98..81b098d85d 100755
--- a/sca-cpp/trunk/modules/http/httpd-restart
+++ b/sca-cpp/trunk/modules/http/httpd-restart
@@ -18,8 +18,8 @@
# under the License.
# Restart httpd server
-here=`readlink -f $0`; here=`dirname $here`
-root=`readlink -f $1`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
+root=`echo "import os; print os.path.realpath('$1')" | python`
apachectl=`cat $here/httpd-apachectl.prefix`
$apachectl -k graceful -d $root -f $root/conf/httpd.conf
diff --git a/sca-cpp/trunk/modules/http/httpd-ssl-conf b/sca-cpp/trunk/modules/http/httpd-ssl-conf
index 9933d1c7d9..77a4898e74 100755
--- a/sca-cpp/trunk/modules/http/httpd-ssl-conf
+++ b/sca-cpp/trunk/modules/http/httpd-ssl-conf
@@ -18,9 +18,9 @@
# under the License.
# Generate a minimal HTTPD SSL configuration
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"`
host=`echo $conf | awk '{ print $6 }'`
@@ -34,7 +34,7 @@ sslvhost=`$here/httpd-addr vhost $2`
htdocs=`echo $conf | awk '{ print $8 }'`
mkdir -p $htdocs
-htdocs=`readlink -f $htdocs`
+htdocs=`echo "import os; print os.path.realpath('$htdocs')" | python`
# Extract organization name from our CA certificate
org=`openssl x509 -noout -subject -nameopt multiline -in $root/cert/ca.crt | grep organizationName | awk -F "= " '{ print $2 }'`
diff --git a/sca-cpp/trunk/modules/http/httpd-start b/sca-cpp/trunk/modules/http/httpd-start
index 5c006d1b54..e38c2f9a94 100755
--- a/sca-cpp/trunk/modules/http/httpd-start
+++ b/sca-cpp/trunk/modules/http/httpd-start
@@ -18,8 +18,8 @@
# under the License.
# Start httpd server
-here=`readlink -f $0`; here=`dirname $here`
-root=`readlink -f $1`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
+root=`echo "import os; print os.path.realpath('$1')" | python`
apachectl=`cat $here/httpd-apachectl.prefix`
$apachectl -E $root/logs/error_log -k start -d $root -f $root/conf/httpd.conf
diff --git a/sca-cpp/trunk/modules/http/httpd-stop b/sca-cpp/trunk/modules/http/httpd-stop
index cadec1e6a0..9010e4dd17 100755
--- a/sca-cpp/trunk/modules/http/httpd-stop
+++ b/sca-cpp/trunk/modules/http/httpd-stop
@@ -18,8 +18,8 @@
# under the License.
# Stop httpd server
-here=`readlink -f $0`; here=`dirname $here`
-root=`readlink -f $1`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
+root=`echo "import os; print os.path.realpath('$1')" | python`
apachectl=`cat $here/httpd-apachectl.prefix`
$apachectl -k graceful-stop -d $root -f $root/conf/httpd.conf 2>/dev/null
diff --git a/sca-cpp/trunk/modules/http/httpd-test b/sca-cpp/trunk/modules/http/httpd-test
index a3b9145871..909bfa29f1 100755
--- a/sca-cpp/trunk/modules/http/httpd-test
+++ b/sca-cpp/trunk/modules/http/httpd-test
@@ -18,7 +18,7 @@
# under the License.
echo "Testing..."
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
curl_prefix=`cat $here/../http/curl.prefix`
# Setup
@@ -37,4 +37,4 @@ sleep 2
if [ "$rc" = "0" ]; then
echo "OK"
fi
-return $rc
+exit $rc
diff --git a/sca-cpp/trunk/modules/http/httpd-worker-conf b/sca-cpp/trunk/modules/http/httpd-worker-conf
index bb6bca4562..0d0c866688 100755
--- a/sca-cpp/trunk/modules/http/httpd-worker-conf
+++ b/sca-cpp/trunk/modules/http/httpd-worker-conf
@@ -18,9 +18,9 @@
# under the License.
# Configure HTTPD to run with the worker MPM
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
modules_prefix=`cat $here/httpd-modules.prefix`
diff --git a/sca-cpp/trunk/modules/http/mod-security-conf b/sca-cpp/trunk/modules/http/mod-security-conf
index f988163cf4..c9f0728f88 100755
--- a/sca-cpp/trunk/modules/http/mod-security-conf
+++ b/sca-cpp/trunk/modules/http/mod-security-conf
@@ -18,9 +18,9 @@
# under the License.
# Generate a minimal mod-security configuration.
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
modules_prefix=`cat $here/httpd-modules.prefix`
modsecurity_prefix=`cat $here/modsecurity.prefix`
diff --git a/sca-cpp/trunk/modules/http/open-auth-conf b/sca-cpp/trunk/modules/http/open-auth-conf
index 1c4d18b1e9..cde0c6b05f 100755
--- a/sca-cpp/trunk/modules/http/open-auth-conf
+++ b/sca-cpp/trunk/modules/http/open-auth-conf
@@ -18,9 +18,9 @@
# under the License.
# Generate a minimal HTTPD form authentication configuration
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"`
host=`echo $conf | awk '{ print $6 }'`
diff --git a/sca-cpp/trunk/modules/http/passwd-auth-conf b/sca-cpp/trunk/modules/http/passwd-auth-conf
index 89a3f19e4b..119b0fbb3b 100755
--- a/sca-cpp/trunk/modules/http/passwd-auth-conf
+++ b/sca-cpp/trunk/modules/http/passwd-auth-conf
@@ -17,9 +17,9 @@
# specific language governing permissions and limitations
# under the License.
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
user=$2
pass=$3
diff --git a/sca-cpp/trunk/modules/http/proxy-conf b/sca-cpp/trunk/modules/http/proxy-conf
index e9abe8435f..8bca7cd2de 100755
--- a/sca-cpp/trunk/modules/http/proxy-conf
+++ b/sca-cpp/trunk/modules/http/proxy-conf
@@ -18,9 +18,9 @@
# under the License.
# Generate a minimal HTTPD proxy balancer configuration
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
cat >>$root/conf/vhost.conf <<EOF
# Generated by: proxy-conf $*
diff --git a/sca-cpp/trunk/modules/http/proxy-member-conf b/sca-cpp/trunk/modules/http/proxy-member-conf
index ef9cb35e8a..2e279e87c7 100755
--- a/sca-cpp/trunk/modules/http/proxy-member-conf
+++ b/sca-cpp/trunk/modules/http/proxy-member-conf
@@ -18,9 +18,9 @@
# under the License.
# Add a proxy balancer member
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
host=$2
port=`$here/httpd-addr port $3`
diff --git a/sca-cpp/trunk/modules/http/proxy-ssl-conf b/sca-cpp/trunk/modules/http/proxy-ssl-conf
index f5e2bfc4a4..af8fce8179 100755
--- a/sca-cpp/trunk/modules/http/proxy-ssl-conf
+++ b/sca-cpp/trunk/modules/http/proxy-ssl-conf
@@ -18,9 +18,9 @@
# under the License.
# Generate a minimal HTTPD proxy balancer configuration
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
cat >>$root/conf/vhost-ssl.conf <<EOF
# Generated by: proxy-ssl-conf $*
diff --git a/sca-cpp/trunk/modules/http/proxy-ssl-member-conf b/sca-cpp/trunk/modules/http/proxy-ssl-member-conf
index b6bf055ad8..0ae98af482 100755
--- a/sca-cpp/trunk/modules/http/proxy-ssl-member-conf
+++ b/sca-cpp/trunk/modules/http/proxy-ssl-member-conf
@@ -18,9 +18,9 @@
# under the License.
# Add a proxy balancer member
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
host=$2
sslport=`$here/httpd-addr port $3`
diff --git a/sca-cpp/trunk/modules/http/proxy-test b/sca-cpp/trunk/modules/http/proxy-test
index b6c9a6a0d9..d67d39aa1f 100755
--- a/sca-cpp/trunk/modules/http/proxy-test
+++ b/sca-cpp/trunk/modules/http/proxy-test
@@ -34,4 +34,4 @@ rc=$?
./httpd-stop tmp/proxy
./httpd-stop tmp
sleep 2
-return $rc
+exit $rc
diff --git a/sca-cpp/trunk/modules/http/ssl-ca-conf b/sca-cpp/trunk/modules/http/ssl-ca-conf
index e7b9f96ee2..bceca8f300 100755
--- a/sca-cpp/trunk/modules/http/ssl-ca-conf
+++ b/sca-cpp/trunk/modules/http/ssl-ca-conf
@@ -18,15 +18,15 @@
# under the License.
# Generate a test certification authority certificate
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
host=$2
# Don't override existing certificate
if [ -f $root/cert/ca.crt ]; then
- return 0
+ exit 0
fi
# Generate openssl configuration
@@ -92,5 +92,5 @@ openssl req -new -x509 -config $root/cert/openssl-ca.conf -out $root/cert/ca.crt
# Add to the hash directory and rehash
mkdir -p $root/cert/hash
cp $root/cert/ca.crt $root/cert/hash
-c_rehash $root/cert/hash
+perl /usr/bin/c_rehash $root/cert/hash
diff --git a/sca-cpp/trunk/modules/http/ssl-cert-conf b/sca-cpp/trunk/modules/http/ssl-cert-conf
index 57c4522535..9e785ec86e 100755
--- a/sca-cpp/trunk/modules/http/ssl-cert-conf
+++ b/sca-cpp/trunk/modules/http/ssl-cert-conf
@@ -18,9 +18,9 @@
# under the License.
# Generate a test certificate
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
host=$2
if [ "$3" != "" ]; then
@@ -31,7 +31,7 @@ fi
# Don't regenerate the certificate if it already exists
if [ -f $root/cert/$certname.crt ]; then
- return 0
+ exit 0
fi
# Generate openssl configuration
@@ -72,5 +72,5 @@ cat $root/cert/$certname.key >> $root/cert/$certname.pem
mkdir -p $root/cert/hash
cp $root/cert/$certname.crt $root/cert/hash
cp $root/cert/$certname.pem $root/cert/hash
-c_rehash $root/cert/hash
+perl /usr/bin/c_rehash $root/cert/hash
diff --git a/sca-cpp/trunk/modules/http/ssl-cert-find b/sca-cpp/trunk/modules/http/ssl-cert-find
index b5aefb8e38..7a4b4f0220 100755
--- a/sca-cpp/trunk/modules/http/ssl-cert-find
+++ b/sca-cpp/trunk/modules/http/ssl-cert-find
@@ -18,9 +18,13 @@
# under the License.
# List certificate files, useful to distribute them to another host
-here=`readlink -f $0`; here=`dirname $here`
-root=`readlink -f $1`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
+root=`echo "import os; print os.path.realpath('$1')" | python`
cd $root
-find -regex '.*\.\(\(crt\)\|\(pem\)\|\(p12\)\|\(key\)\|\(0\)\)' 2>/dev/null
+find . -name "*.crt"
+find . -name "*.pem"
+find . -name "*.p12"
+find . -name "*.key"
+find . -name "*.0"
diff --git a/sca-cpp/trunk/modules/http/tunnel-ssl-conf b/sca-cpp/trunk/modules/http/tunnel-ssl-conf
index 8cf4ada20a..021d205ed9 100755
--- a/sca-cpp/trunk/modules/http/tunnel-ssl-conf
+++ b/sca-cpp/trunk/modules/http/tunnel-ssl-conf
@@ -18,9 +18,9 @@
# under the License.
# Generate an SSL tunnel configuration
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"`
host=`echo $conf | awk '{ print $6 }'`
diff --git a/sca-cpp/trunk/modules/http/vhost-conf b/sca-cpp/trunk/modules/http/vhost-conf
index a36b195844..150d57f115 100755
--- a/sca-cpp/trunk/modules/http/vhost-conf
+++ b/sca-cpp/trunk/modules/http/vhost-conf
@@ -18,11 +18,11 @@
# under the License.
# Generate mass dynamic virtual hosting configuration
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
-vroot=`readlink -f $2`
+vroot=`echo "import os; print os.path.realpath('$2')" | python`
vhtdocs=$3
conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"`
@@ -34,7 +34,7 @@ vhost=`$here/httpd-addr vhost $addr`
htdocs=`echo $conf | awk '{ print $8 }'`
mkdir -p $htdocs
-htdocs=`readlink -f $htdocs`
+htdocs=`echo "import os; print os.path.realpath('$htdocs')" | python`
cat >>$root/conf/httpd.conf <<EOF
# Generated by: vhost-conf $*
diff --git a/sca-cpp/trunk/modules/http/vhost-ssl-conf b/sca-cpp/trunk/modules/http/vhost-ssl-conf
index 314773a338..7ddbee08e0 100755
--- a/sca-cpp/trunk/modules/http/vhost-ssl-conf
+++ b/sca-cpp/trunk/modules/http/vhost-ssl-conf
@@ -18,9 +18,9 @@
# under the License.
# Generate mass dynamic virtual hosting configuration
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"`
host=`echo $conf | awk '{ print $6 }'`
@@ -32,12 +32,12 @@ sslpport=`$here/httpd-addr pport $ssladdr`
sslvhost=`$here/httpd-addr vhost $ssladdr`
vhostconf=`cat $root/conf/httpd.conf | grep "# Generated by: vhost-conf"`
-vroot=`echo $vhostconf | awk '{ print $6 }'`; vroot=`readlink -f $vroot`
+vroot=`echo $vhostconf | awk '{ print $6 }'`; vroot=`echo "import os; print os.path.realpath('$vroot')" | python`
vhtdocs=`echo $vhostconf | awk '{ print $7 }'`
htdocs=`echo $conf | awk '{ print $8 }'`
mkdir -p $htdocs
-htdocs=`readlink -f $htdocs`
+htdocs=`echo "import os; print os.path.realpath('$htdocs')" | python`
cat >>$root/conf/httpd.conf <<EOF
# Generated by: vhost-ssl-conf $*
diff --git a/sca-cpp/trunk/modules/java/Makefile.am b/sca-cpp/trunk/modules/java/Makefile.am
index 39b7ad550a..5242349319 100644
--- a/sca-cpp/trunk/modules/java/Makefile.am
+++ b/sca-cpp/trunk/modules/java/Makefile.am
@@ -37,9 +37,9 @@ EXTRA_DIST = domain-test.composite
mod_LTLIBRARIES = libmod_tuscany_java.la
libmod_tuscany_java_la_SOURCES = mod-java.cpp
libmod_tuscany_java_la_LDFLAGS = -lxml2 -lcurl -lmozjs ${JAVA_LDFLAGS}
-noinst_DATA = libmod_tuscany_java.so
-libmod_tuscany_java.so:
- ln -s .libs/libmod_tuscany_java.so
+noinst_DATA = libmod_tuscany_java${libsuffix}
+libmod_tuscany_java${libsuffix}:
+ ln -s .libs/libmod_tuscany_java${libsuffix}
jni_test_SOURCES = jni-test.cpp
jni_test_LDFLAGS = ${JAVA_LDFLAGS}
diff --git a/sca-cpp/trunk/modules/java/java-conf b/sca-cpp/trunk/modules/java/java-conf
index cf5faddb84..baa5c059c2 100755
--- a/sca-cpp/trunk/modules/java/java-conf
+++ b/sca-cpp/trunk/modules/java/java-conf
@@ -18,14 +18,21 @@
# under the License.
# Generate a Java server conf
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
+
+uname=`uname -s`
+if [ $uname = "Darwin" ]; then
+ libsuffix=".dylib"
+else
+ libsuffix=".so"
+fi
cat >>$root/conf/modules.conf <<EOF
# Generated by: java-conf $*
# Support for Java SCA components
-LoadModule mod_tuscany_eval $here/libmod_tuscany_java.so
+LoadModule mod_tuscany_eval $here/libmod_tuscany_java${libsuffix}
EOF
diff --git a/sca-cpp/trunk/modules/java/server-test b/sca-cpp/trunk/modules/java/server-test
index dba63a9525..40e52d7153 100755
--- a/sca-cpp/trunk/modules/java/server-test
+++ b/sca-cpp/trunk/modules/java/server-test
@@ -38,4 +38,4 @@ rc=$?
# Cleanup
../http/httpd-stop tmp
sleep 2
-return $rc
+exit $rc
diff --git a/sca-cpp/trunk/modules/java/wiring-test b/sca-cpp/trunk/modules/java/wiring-test
index fb2ad48efc..941a75bc32 100755
--- a/sca-cpp/trunk/modules/java/wiring-test
+++ b/sca-cpp/trunk/modules/java/wiring-test
@@ -18,7 +18,7 @@
# under the License.
echo "Testing..."
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
curl_prefix=`cat $here/../http/curl.prefix`
# Setup
@@ -77,4 +77,4 @@ sleep 2
if [ "$rc" = "0" ]; then
echo "OK"
fi
-return $rc
+exit $rc
diff --git a/sca-cpp/trunk/modules/js/util-test b/sca-cpp/trunk/modules/js/util-test
index ccfb377bd1..08407ea2d1 100755
--- a/sca-cpp/trunk/modules/js/util-test
+++ b/sca-cpp/trunk/modules/js/util-test
@@ -18,7 +18,7 @@
# under the License.
# Run Javascript util test cases
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
echo "Testing..."
cat htdocs/util.js htdocs/elemutil.js htdocs/jsonutil.js json-test.js | ./js-eval 2>/dev/null 1>&2
@@ -27,4 +27,4 @@ if [ "$rc" = "0" ]; then
echo "OK"
fi
-return $rc
+exit $rc
diff --git a/sca-cpp/trunk/modules/oauth/Makefile.am b/sca-cpp/trunk/modules/oauth/Makefile.am
index 6c0cd2bc57..a5a5916a84 100644
--- a/sca-cpp/trunk/modules/oauth/Makefile.am
+++ b/sca-cpp/trunk/modules/oauth/Makefile.am
@@ -23,17 +23,17 @@ dist_mod_SCRIPTS = oauth-conf oauth-memcached-conf oauth1-appkey-conf oauth2-app
moddir=$(prefix)/modules/oauth
mod_LTLIBRARIES = libmod_tuscany_oauth1.la libmod_tuscany_oauth2.la
-noinst_DATA = libmod_tuscany_oauth1.so libmod_tuscany_oauth2.so
+noinst_DATA = libmod_tuscany_oauth1${libsuffix} libmod_tuscany_oauth2${libsuffix}
libmod_tuscany_oauth1_la_SOURCES = mod-oauth1.cpp
libmod_tuscany_oauth1_la_LDFLAGS = -L${LIBOAUTH_LIB} -R${LIBOAUTH_LIB} -loauth -lxml2 -lcurl -lmozjs
-libmod_tuscany_oauth1.so:
- ln -s .libs/libmod_tuscany_oauth1.so
+libmod_tuscany_oauth1${libsuffix}:
+ ln -s .libs/libmod_tuscany_oauth1${libsuffix}
libmod_tuscany_oauth2_la_SOURCES = mod-oauth2.cpp
libmod_tuscany_oauth2_la_LDFLAGS = -lxml2 -lcurl -lmozjs
-libmod_tuscany_oauth2.so:
- ln -s .libs/libmod_tuscany_oauth2.so
+libmod_tuscany_oauth2${libsuffix}:
+ ln -s .libs/libmod_tuscany_oauth2${libsuffix}
EXTRA_DIST = oauth.composite user-info.scm htdocs/index.html htdocs/login/index.html htdocs/logout/index.html htdocs/public/index.html
diff --git a/sca-cpp/trunk/modules/oauth/oauth-conf b/sca-cpp/trunk/modules/oauth/oauth-conf
index dc3a6ebc9d..02f81a240b 100755
--- a/sca-cpp/trunk/modules/oauth/oauth-conf
+++ b/sca-cpp/trunk/modules/oauth/oauth-conf
@@ -18,9 +18,16 @@
# under the License.
# Generate an OAuth server conf
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
+
+uname=`uname -s`
+if [ $uname = "Darwin" ]; then
+ libsuffix=".dylib"
+else
+ libsuffix=".so"
+fi
conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"`
host=`echo $conf | awk '{ print $6 }'`
@@ -29,8 +36,8 @@ host=`echo $conf | awk '{ print $6 }'`
cat >>$root/conf/modules.conf <<EOF
# Generated by: oauth-conf $*
# Load support for OAuth authentication
-LoadModule mod_tuscany_oauth1 $here/libmod_tuscany_oauth1.so
-LoadModule mod_tuscany_oauth2 $here/libmod_tuscany_oauth2.so
+LoadModule mod_tuscany_oauth1 $here/libmod_tuscany_oauth1$libsuffix
+LoadModule mod_tuscany_oauth2 $here/libmod_tuscany_oauth2$libsuffix
EOF
diff --git a/sca-cpp/trunk/modules/oauth/oauth-memcached-conf b/sca-cpp/trunk/modules/oauth/oauth-memcached-conf
index 23a82a0486..83477562f8 100755
--- a/sca-cpp/trunk/modules/oauth/oauth-memcached-conf
+++ b/sca-cpp/trunk/modules/oauth/oauth-memcached-conf
@@ -17,9 +17,9 @@
# specific language governing permissions and limitations
# under the License.
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
host=$2
port=$3
diff --git a/sca-cpp/trunk/modules/oauth/oauth1-appkey-conf b/sca-cpp/trunk/modules/oauth/oauth1-appkey-conf
index fca7d4e8f3..67b02ad639 100755
--- a/sca-cpp/trunk/modules/oauth/oauth1-appkey-conf
+++ b/sca-cpp/trunk/modules/oauth/oauth1-appkey-conf
@@ -17,9 +17,9 @@
# specific language governing permissions and limitations
# under the License.
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
name=$2
id=$3
secret=$4
diff --git a/sca-cpp/trunk/modules/oauth/oauth2-appkey-conf b/sca-cpp/trunk/modules/oauth/oauth2-appkey-conf
index 0a7986f07e..0d67e6ffbe 100755
--- a/sca-cpp/trunk/modules/oauth/oauth2-appkey-conf
+++ b/sca-cpp/trunk/modules/oauth/oauth2-appkey-conf
@@ -17,9 +17,9 @@
# specific language governing permissions and limitations
# under the License.
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
name=$2
id=$3
secret=$4
diff --git a/sca-cpp/trunk/modules/oauth/start-mixed-test b/sca-cpp/trunk/modules/oauth/start-mixed-test
index bfd7667ce4..29ddb6d647 100755
--- a/sca-cpp/trunk/modules/oauth/start-mixed-test
+++ b/sca-cpp/trunk/modules/oauth/start-mixed-test
@@ -18,7 +18,7 @@
# under the License.
# Test supporting both OpenID and OAuth in the same app
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
# Setup
../../components/cache/memcached-start 11212
diff --git a/sca-cpp/trunk/modules/openid/openid-conf b/sca-cpp/trunk/modules/openid/openid-conf
index 797f8b0607..4cc8bcdd40 100755
--- a/sca-cpp/trunk/modules/openid/openid-conf
+++ b/sca-cpp/trunk/modules/openid/openid-conf
@@ -18,9 +18,9 @@
# under the License.
# Generate an OpenID server conf
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"`
host=`echo $conf | awk '{ print $6 }'`
diff --git a/sca-cpp/trunk/modules/openid/openid-memcached-conf b/sca-cpp/trunk/modules/openid/openid-memcached-conf
index 1717b3ce92..fc56ee7639 100755
--- a/sca-cpp/trunk/modules/openid/openid-memcached-conf
+++ b/sca-cpp/trunk/modules/openid/openid-memcached-conf
@@ -17,9 +17,9 @@
# specific language governing permissions and limitations
# under the License.
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
host=$2
port=$3
diff --git a/sca-cpp/trunk/modules/openid/openid-step2-conf b/sca-cpp/trunk/modules/openid/openid-step2-conf
index 559a62d20b..9a32da498e 100755
--- a/sca-cpp/trunk/modules/openid/openid-step2-conf
+++ b/sca-cpp/trunk/modules/openid/openid-step2-conf
@@ -18,9 +18,9 @@
# under the License.
# Generate an OpenID Step2 server conf
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"`
host=`echo $conf | awk '{ print $6 }'`
diff --git a/sca-cpp/trunk/modules/python/Makefile.am b/sca-cpp/trunk/modules/python/Makefile.am
index 2f56b9a1db..9d0a399dde 100644
--- a/sca-cpp/trunk/modules/python/Makefile.am
+++ b/sca-cpp/trunk/modules/python/Makefile.am
@@ -36,9 +36,9 @@ EXTRA_DIST = domain-test.composite client-test.py server-test.py
mod_LTLIBRARIES = libmod_tuscany_python.la
libmod_tuscany_python_la_SOURCES = mod-python.cpp
libmod_tuscany_python_la_LDFLAGS = -lxml2 -lcurl -lmozjs -L${PYTHON_LIB} -R${PYTHON_LIB} -lpython2.6
-noinst_DATA = libmod_tuscany_python.so
-libmod_tuscany_python.so:
- ln -s .libs/libmod_tuscany_python.so
+noinst_DATA = libmod_tuscany_python${libsuffix}
+libmod_tuscany_python${libsuffix}:
+ ln -s .libs/libmod_tuscany_python${libsuffix}
python_test_SOURCES = python-test.cpp
python_test_LDFLAGS = -L${PYTHON_LIB} -R${PYTHON_LIB} -lpython2.6
diff --git a/sca-cpp/trunk/modules/python/python-conf b/sca-cpp/trunk/modules/python/python-conf
index a5b45357fc..359d596b05 100755
--- a/sca-cpp/trunk/modules/python/python-conf
+++ b/sca-cpp/trunk/modules/python/python-conf
@@ -18,13 +18,20 @@
# under the License.
# Generate a Python server conf
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
+
+uname=`uname -s`
+if [ $uname = "Darwin" ]; then
+ libsuffix=".dylib"
+else
+ libsuffix=".so"
+fi
cat >>$root/conf/modules.conf <<EOF
# Generated by: python-conf $*
# Support for Python SCA components
-LoadModule mod_tuscany_eval $here/libmod_tuscany_python.so
+LoadModule mod_tuscany_eval $here/libmod_tuscany_python$libsuffix
EOF
diff --git a/sca-cpp/trunk/modules/python/server-test b/sca-cpp/trunk/modules/python/server-test
index b01f5f501d..0932413ffd 100755
--- a/sca-cpp/trunk/modules/python/server-test
+++ b/sca-cpp/trunk/modules/python/server-test
@@ -36,4 +36,4 @@ rc=$?
# Cleanup
../http/httpd-stop tmp
sleep 2
-return $rc
+exit $rc
diff --git a/sca-cpp/trunk/modules/python/wiring-test b/sca-cpp/trunk/modules/python/wiring-test
index c571981bbd..22666c3925 100755
--- a/sca-cpp/trunk/modules/python/wiring-test
+++ b/sca-cpp/trunk/modules/python/wiring-test
@@ -18,7 +18,7 @@
# under the License.
echo "Testing..."
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
curl_prefix=`cat $here/../http/curl.prefix`
# Setup
@@ -75,4 +75,4 @@ sleep 2
if [ "$rc" = "0" ]; then
echo "OK"
fi
-return $rc
+exit $rc
diff --git a/sca-cpp/trunk/modules/scdl/validate-test b/sca-cpp/trunk/modules/scdl/validate-test
index e70fe67aa0..9f277cf15a 100755
--- a/sca-cpp/trunk/modules/scdl/validate-test
+++ b/sca-cpp/trunk/modules/scdl/validate-test
@@ -20,4 +20,4 @@
# Validate test composite
../../kernel/xsd-test ../../xsd/tuscany-sca-1.1.xsd test.composite 2>/dev/null
rc=$?
-return $rc
+exit $rc
diff --git a/sca-cpp/trunk/modules/server/Makefile.am b/sca-cpp/trunk/modules/server/Makefile.am
index 74674fa9a6..edc0dfb251 100644
--- a/sca-cpp/trunk/modules/server/Makefile.am
+++ b/sca-cpp/trunk/modules/server/Makefile.am
@@ -26,25 +26,25 @@ moddir = $(prefix)/modules/server
EXTRA_DIST = domain-test.composite client-test.scm server-test.scm htdocs/*.html htdocs/test/*.xml htdocs/test/*.txt
mod_LTLIBRARIES = libmod_tuscany_eval.la libmod_tuscany_wiring.la
-noinst_DATA = libmod_tuscany_eval.so libmod_tuscany_wiring.so
+noinst_DATA = libmod_tuscany_eval${libsuffix} libmod_tuscany_wiring${libsuffix}
libmod_tuscany_eval_la_SOURCES = mod-eval.cpp
libmod_tuscany_eval_la_LDFLAGS = -lxml2 -lcurl -lmozjs
-libmod_tuscany_eval.so:
- ln -s .libs/libmod_tuscany_eval.so
+libmod_tuscany_eval${libsuffix}:
+ ln -s .libs/libmod_tuscany_eval${libsuffix}
libmod_tuscany_wiring_la_SOURCES = mod-wiring.cpp
libmod_tuscany_wiring_la_LDFLAGS = -lxml2 -lcurl -lmozjs
-libmod_tuscany_wiring.so:
- ln -s .libs/libmod_tuscany_wiring.so
+libmod_tuscany_wiring${libsuffix}:
+ ln -s .libs/libmod_tuscany_wiring${libsuffix}
noinst_test_LTLIBRARIES = libimpl-test.la
noinst_testdir = `pwd`/tmp
-noinst_DATA += libimpl-test.so
+noinst_DATA += libimpl-test${libsuffix}
libimpl_test_la_SOURCES = impl-test.cpp
-libimpl-test.so:
- ln -s .libs/libimpl-test.so
+libimpl-test${libsuffix}:
+ ln -s .libs/libimpl-test${libsuffix}
client_test_SOURCES = client-test.cpp
client_test_LDFLAGS = -lxml2 -lcurl -lmozjs
diff --git a/sca-cpp/trunk/modules/server/cpp-conf b/sca-cpp/trunk/modules/server/cpp-conf
index 086bb49d38..6b74f60ec5 100755
--- a/sca-cpp/trunk/modules/server/cpp-conf
+++ b/sca-cpp/trunk/modules/server/cpp-conf
@@ -18,13 +18,20 @@
# under the License.
# Generate a C++ server conf
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
+
+uname=`uname -s`
+if [ $uname = "Darwin" ]; then
+ libsuffix=".dylib"
+else
+ libsuffix=".so"
+fi
cat >>$root/conf/modules.conf <<EOF
# Generated by: cpp-conf $*
# Support for C++ SCA components
-LoadModule mod_tuscany_eval $here/libmod_tuscany_eval.so
+LoadModule mod_tuscany_eval $here/libmod_tuscany_eval$libsuffix
EOF
diff --git a/sca-cpp/trunk/modules/server/httpd-test b/sca-cpp/trunk/modules/server/httpd-test
index e39412fe11..c56f0e0981 100755
--- a/sca-cpp/trunk/modules/server/httpd-test
+++ b/sca-cpp/trunk/modules/server/httpd-test
@@ -18,7 +18,7 @@
# under the License.
echo "Testing..."
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
curl_prefix=`cat $here/../http/curl.prefix`
# Setup
@@ -82,4 +82,4 @@ sleep 2
if [ "$rc" = "0" ]; then
echo "OK"
fi
-return $rc
+exit $rc
diff --git a/sca-cpp/trunk/modules/server/scheme-conf b/sca-cpp/trunk/modules/server/scheme-conf
index cd3c82b280..bc4074c8be 100755
--- a/sca-cpp/trunk/modules/server/scheme-conf
+++ b/sca-cpp/trunk/modules/server/scheme-conf
@@ -18,13 +18,20 @@
# under the License.
# Generate a Scheme server conf
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
+
+uname=`uname -s`
+if [ $uname = "Darwin" ]; then
+ libsuffix=".dylib"
+else
+ libsuffix=".so"
+fi
cat >>$root/conf/modules.conf <<EOF
# Generated by: scheme-conf $*
# Support for Scheme SCA components
-LoadModule mod_tuscany_eval $here/libmod_tuscany_eval.so
+LoadModule mod_tuscany_eval $here/libmod_tuscany_eval$libsuffix
EOF
diff --git a/sca-cpp/trunk/modules/server/server-conf b/sca-cpp/trunk/modules/server/server-conf
index d80f8a09e9..a8e57cf289 100755
--- a/sca-cpp/trunk/modules/server/server-conf
+++ b/sca-cpp/trunk/modules/server/server-conf
@@ -18,11 +18,18 @@
# under the License.
# Generate a server conf
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
-jsprefix=`readlink -f $here/../js`
+jsprefix=`echo "import os; print os.path.realpath('$here/../js')" | python`
+
+uname=`uname -s`
+if [ $uname = "Darwin" ]; then
+ libsuffix=".dylib"
+else
+ libsuffix=".so"
+fi
conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"`
host=`echo $conf | awk '{ print $6 }'`
@@ -46,7 +53,7 @@ fi
cat >>$root/conf/modules.conf <<EOF
# Generated by: server-conf $*
# Support for SCA component wiring
-LoadModule mod_tuscany_wiring $here/libmod_tuscany_wiring.so
+LoadModule mod_tuscany_wiring $here/libmod_tuscany_wiring$libsuffix
EOF
diff --git a/sca-cpp/trunk/modules/server/server-test b/sca-cpp/trunk/modules/server/server-test
index e53c7f5ef1..55e6f10926 100755
--- a/sca-cpp/trunk/modules/server/server-test
+++ b/sca-cpp/trunk/modules/server/server-test
@@ -36,4 +36,4 @@ rc=$?
# Cleanup
../http/httpd-stop tmp
sleep 2
-return $rc
+exit $rc
diff --git a/sca-cpp/trunk/modules/server/wiring-test b/sca-cpp/trunk/modules/server/wiring-test
index e791ec555b..4278e5e30d 100755
--- a/sca-cpp/trunk/modules/server/wiring-test
+++ b/sca-cpp/trunk/modules/server/wiring-test
@@ -18,7 +18,7 @@
# under the License.
echo "Testing..."
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
curl_prefix=`cat $here/../http/curl.prefix`
# Setup
@@ -75,4 +75,4 @@ sleep 2
if [ "$rc" = "0" ]; then
echo "OK"
fi
-return $rc
+exit $rc
diff --git a/sca-cpp/trunk/modules/wsgi/gae-start b/sca-cpp/trunk/modules/wsgi/gae-start
index a3ee8765cb..44008d10e2 100755
--- a/sca-cpp/trunk/modules/wsgi/gae-start
+++ b/sca-cpp/trunk/modules/wsgi/gae-start
@@ -18,8 +18,8 @@
# under the License.
# Start Google AppEngine server
-here=`readlink -f $0`; here=`dirname $here`
-root=`readlink -f $1`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
+root=`echo "import os; print os.path.realpath('$1')" | python`
port=$2
python_prefix=`cat $here/../python/python.prefix`
diff --git a/sca-cpp/trunk/modules/wsgi/gae-stop b/sca-cpp/trunk/modules/wsgi/gae-stop
index 69de7f0c2b..c0ff29cfaa 100755
--- a/sca-cpp/trunk/modules/wsgi/gae-stop
+++ b/sca-cpp/trunk/modules/wsgi/gae-stop
@@ -18,8 +18,8 @@
# under the License.
# Stop Google AppEngine server
-here=`readlink -f $0`; here=`dirname $here`
-root=`readlink -f $1`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
+root=`echo "import os; print os.path.realpath('$1')" | python`
port=$2
python_prefix=`cat $here/../python/python.prefix`
diff --git a/sca-cpp/trunk/modules/wsgi/gae-test b/sca-cpp/trunk/modules/wsgi/gae-test
index 1791a830ca..5cdbbe323d 100755
--- a/sca-cpp/trunk/modules/wsgi/gae-test
+++ b/sca-cpp/trunk/modules/wsgi/gae-test
@@ -27,4 +27,4 @@ rc=$?
# Cleanup
./gae-stop target 8090
-return $rc
+exit $rc
diff --git a/sca-cpp/trunk/modules/wsgi/http-test b/sca-cpp/trunk/modules/wsgi/http-test
index 5499399b31..aef76d47c4 100755
--- a/sca-cpp/trunk/modules/wsgi/http-test
+++ b/sca-cpp/trunk/modules/wsgi/http-test
@@ -23,7 +23,7 @@ mkdir -p tmp
sleep 2
# Test JSON-RPC
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
python_prefix=`cat $here/../python/python.prefix`
$python_prefix/bin/python http-test.py
rc=$?
@@ -31,4 +31,4 @@ rc=$?
# Cleanup
./wsgi-stop target 8090
sleep 2
-return $rc
+exit $rc
diff --git a/sca-cpp/trunk/modules/wsgi/server-test b/sca-cpp/trunk/modules/wsgi/server-test
index 9bd862c53a..20b0287874 100755
--- a/sca-cpp/trunk/modules/wsgi/server-test
+++ b/sca-cpp/trunk/modules/wsgi/server-test
@@ -27,4 +27,4 @@ rc=$?
# Cleanup
./wsgi-stop target 8090
-return $rc
+exit $rc
diff --git a/sca-cpp/trunk/modules/wsgi/util-test b/sca-cpp/trunk/modules/wsgi/util-test
index aa8725a200..184eb1c788 100755
--- a/sca-cpp/trunk/modules/wsgi/util-test
+++ b/sca-cpp/trunk/modules/wsgi/util-test
@@ -18,7 +18,7 @@
# under the License.
# Run Python util test cases
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
python_prefix=`cat $here/../python/python.prefix`
$python_prefix/bin/python stream-test.py
@@ -40,4 +40,4 @@ if [ "$rc" = "0" ]; then
rc=$?
fi
-return $rc
+exit $rc
diff --git a/sca-cpp/trunk/modules/wsgi/wiring-test b/sca-cpp/trunk/modules/wsgi/wiring-test
index f3c1bbb840..35d96a3889 100755
--- a/sca-cpp/trunk/modules/wsgi/wiring-test
+++ b/sca-cpp/trunk/modules/wsgi/wiring-test
@@ -18,7 +18,7 @@
# under the License.
echo "Testing..."
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
curl_prefix=`cat $here/../http/curl.prefix`
uri=$1
if [ "$uri" = "" ]; then
@@ -72,4 +72,4 @@ sleep 2
if [ "$rc" = "0" ]; then
echo "OK"
fi
-return $rc
+exit $rc
diff --git a/sca-cpp/trunk/modules/wsgi/wsgi-start b/sca-cpp/trunk/modules/wsgi/wsgi-start
index d020f3da14..685dab3c82 100755
--- a/sca-cpp/trunk/modules/wsgi/wsgi-start
+++ b/sca-cpp/trunk/modules/wsgi/wsgi-start
@@ -18,8 +18,8 @@
# under the License.
# Start WSGI server
-here=`readlink -f $0`; here=`dirname $here`
-root=`readlink -f $1`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
+root=`echo "import os; print os.path.realpath('$1')" | python`
port=$2
python_prefix=`cat $here/../python/python.prefix`
diff --git a/sca-cpp/trunk/modules/wsgi/wsgi-stop b/sca-cpp/trunk/modules/wsgi/wsgi-stop
index 7e12967adb..e47967e528 100755
--- a/sca-cpp/trunk/modules/wsgi/wsgi-stop
+++ b/sca-cpp/trunk/modules/wsgi/wsgi-stop
@@ -18,8 +18,8 @@
# under the License.
# Stop WSGI server
-here=`readlink -f $0`; here=`dirname $here`
-root=`readlink -f $1`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
+root=`echo "import os; print os.path.realpath('$1')" | python`
port=$2
python_prefix=`cat $here/../python/python.prefix`
diff --git a/sca-cpp/trunk/modules/wsgi/wsgi-test b/sca-cpp/trunk/modules/wsgi/wsgi-test
index 369ca5a677..c17e29047d 100755
--- a/sca-cpp/trunk/modules/wsgi/wsgi-test
+++ b/sca-cpp/trunk/modules/wsgi/wsgi-test
@@ -18,7 +18,7 @@
# under the License.
echo "Testing..."
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
curl_prefix=`cat $here/../http/curl.prefix`
# Setup
@@ -68,4 +68,4 @@ sleep 2
if [ "$rc" = "0" ]; then
echo "OK"
fi
-return $rc
+exit $rc