Is it possible to preset the SYBASE_OCS variable?

"Christian Behrens" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase
Message-ID <[email protected]>
I apologize if this has been asked before, but I searched the archive and
haven't found a real answer.

Here's the situation:

I've been asked to look into setting up SybPerl (current release 2.17_3) in
a way that the Sybase environment doesn't have to be set to run scripts.

This is the relevant part in the CONFIG file I use:

"# Where is the Sybase directory on your system (include files &
# libraries are expected to be found at SYBASE/include & SYBASE/lib
SYBASE=/usr/global/opt/sybase

# If EMBED_SYBASE is TRUE (1), then we add BEGIN { $ENV{SYBASE} = $SYBASE}
# at the top of both Sybase::DBlib and Sybase::CTlib. This ensures that
# the correct value for the SYBASE environment variable is always set.
# The downside is that if you install a new version of Sybase (OpenClient
# in particular) in a different location (say /opt/sybase/11.9.2 instead of
# /opt/sybase/11.5.1) then you need to rebuild sybperl with the new value -
# setting the SYBASE environment variable will have no effect.
EMBED_SYBASE = 1"

Now, as we use Sybase 12.5, there are no SYBASE/include & SYBASE/lib
directories, thus I had to set links to OCS/lib and OCS/include,
respectively.

Also, the comment about EMBED_SYBASE that "setting the SYBASE environment
variable will have no effect" doesn't seem to be true (anymore?), as
CTlib.pm and DBlib.pm have this:

BEGIN {
    if(!$ENV{'SYBASE'}) {
        $ENV{'SYBASE'} = '/usr/global/opt/sybase';
    }
}

That suggests to me that a previously set SYBASE env var would have
preference, no?

But what about SYBASE_OCS, is there any way to pre-set that as well? If not,
is there any way to not have to set the links to 'lib' and 'include' as
mentioned above?

I tried to simply extend the above to also set SYBASE_OCS, but the symbolic
links were still needed in order to find the libraries.

Thanks for any insight.

-Christian Behrens

-- 
Geschenkt: 3 Monate GMX ProMail + 3 Top-Spielfilme auf DVD
++ Jetzt kostenlos testen http://www.gmx.net/de/go/mail ++
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.