summaryrefslogtreecommitdiff
path: root/odk/setsdkenv_unix.sh.in
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2005-03-29 11:03:27 +0000
committerRüdiger Timm <rt@openoffice.org>2005-03-29 11:03:27 +0000
commit9b1f931b53b3e6daf7c0e34ec82c3386aee863fa (patch)
tree29d68245e249ed3dc7e191c0ba67a9a47bf4010d /odk/setsdkenv_unix.sh.in
parentf26f1ff656e815b41a1f18c621f0548ebe9ae625 (diff)
INTEGRATION: CWS sdkbugfix02 (1.3.2); FILE MERGED
2005/03/18 09:29:48 jsc 1.3.2.4: #i39684# adapt path to config.guess to work from everywhere, not only in sdk root dir 2005/03/17 13:57:41 jsc 1.3.2.3: #i41147# adapt platform check 2005/03/17 09:34:41 jsc 1.3.2.2: RESYNC: (1.3-1.4); FILE MERGED 2005/03/16 16:07:19 jsc 1.3.2.1: #120223# insert some checks if cpp compiler is not set
Diffstat (limited to 'odk/setsdkenv_unix.sh.in')
-rw-r--r--odk/setsdkenv_unix.sh.in32
1 files changed, 24 insertions, 8 deletions
diff --git a/odk/setsdkenv_unix.sh.in b/odk/setsdkenv_unix.sh.in
index e25bcbfd8276..ffd9f3845be1 100644
--- a/odk/setsdkenv_unix.sh.in
+++ b/odk/setsdkenv_unix.sh.in
@@ -3,6 +3,12 @@
# This script starts a new shell and sets all enviroment variables, which
# are necessary for building the examples of the Office Development Kit.
# The Script was developed for the operating systems Solaris and Linux.
+sdkscript=`echo $0 | grep setsdkenv_unix`
+if [ "$sdkscript" = "" ]
+then
+sdkscript=`history 1 | sed "s/.*\. //"`
+fi
+sdkdir=`dirname $sdkscript`
# The SDK name
OO_SDK_NAME=@OO_SDK_NAME@
@@ -77,12 +83,12 @@ then
fi
# Get the operating system.
-sd_platform=`./config.guess | cut -d"-" -f3,4`
+sd_platform=`$sdkdir/config.guess | cut -d"-" -f3,4`
# Set the directory name.
case $sd_platform in
solaris*)
- sd_proctype=`./config.guess | cut -d"-" -f1`
+ sd_proctype=`$sdkdir/config.guess | cut -d"-" -f1`
if [ "$sd_proctype" = "sparc" ]
then
directoryname=solsparc
@@ -97,8 +103,11 @@ case $sd_platform in
;;
darwin)
- SDK_GXX_INCLUDE_PATH=`echo "#include <cstring>" | $OO_SDK_CPP_HOME/g++ -E -xc++ - | sed -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
- export SDK_GXX_INCLUDE_PATH
+ if [ -n "$OO_SDK_CPP_HOME" ]
+ then
+ SDK_GXX_INCLUDE_PATH=`echo "#include <cstring>" | $OO_SDK_CPP_HOME/g++ -E -xc++ - | sed -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
+ export SDK_GXX_INCLUDE_PATH
+ fi
directoryname=macosx
exampleout=MACOSXexample.out
@@ -108,8 +117,11 @@ case $sd_platform in
;;
linux-gnu)
- SDK_GXX_INCLUDE_PATH=`echo "#include <cstring>" | $OO_SDK_CPP_HOME/g++ -E -xc++ - | sed -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
- export SDK_GXX_INCLUDE_PATH
+ if [ -n "$OO_SDK_CPP_HOME" ]
+ then
+ SDK_GXX_INCLUDE_PATH=`echo "#include <cstring>" | $OO_SDK_CPP_HOME/g++ -E -xc++ - | sed -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
+ export SDK_GXX_INCLUDE_PATH
+ fi
directoryname=linux
exampleout=LINUXexample.out
@@ -117,9 +129,13 @@ case $sd_platform in
LD_LIBRARY_PATH=$OO_SDK_HOME/$directoryname/lib:$OO_EXAMPLE_OUT/$exampleout/lib:$OFFICE_PROGRAM_PATH:.:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
;;
+
freebsd)
- SDK_GXX_INCLUDE_PATH=`echo "#include <cstring>" | $OO_SDK_CPP_HOME/g++ -E -xc++ - | sed -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
- export SDK_GXX_INCLUDE_PATH
+ if [ -n "$OO_SDK_CPP_HOME" ]
+ then
+ SDK_GXX_INCLUDE_PATH=`echo "#include <cstring>" | $OO_SDK_CPP_HOME/g++ -E -xc++ - | sed -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1`
+ export SDK_GXX_INCLUDE_PATH
+ fi
directoryname=freebsd
exampleout=FREEBSDexample.out