tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Anderson" <MMAND...@novell.com>
Subject Re: Detecting OS in jkant
Date Tue, 04 Dec 2001 17:39:56 GMT
Jean-frederic,

That might not work for my platform (NetWare) because I actually build
the
binaries on a windows box so the os.arch property wouldn't match.  On
the 
other hand, if you set it in the appropriate compiler class
(LibtoolCompiler, or
CcCompiler) then it should only affect the *nix platforms.  That is
what we
have done in the MwccCompiler for NetWare, and the MsvcCompiler for
Windows (look at the setSoTask methods).  

The other thing we could maybe do is set a property that contains the
additional path to the platform specific directory
(project.setProperty("jni_md_dir", "linux")) and use that property in
the
build.xml file:

<include name="${java.home}../include/${jni_md_dir}" />

I'm not sure if that would work because of when the variables in the
path are
actually resolved, but maybe Costin (or another Ant guru) would be able
to shed
some light on this.

Mike Anderson

>>> jfrederic.clere@fujitsu-siemens.com 12/04/01 06:18AM >>>
>Hi,
>
>I am thinking of detecting the OS in jkant via
System.getProperty("os.arch") and
>System.getProperty("os.name").
>Basicly I have problems to build jni because jni_md.h cannot be found
because it
>is in a sub-directory of java.home/include
>                 PC     RM            Sparc   BS200
>os.arch          i386   mips          sparc   osd
>os.name          Linux  ReliantUnix-N SunOS   POSIX-BC
>subdirectory     linux  mips          solaris osd
>
>After the detection should I use a
project.setProperty("system_name","true"); or
>make it more generic?
>
.Cheers
>
>Jean-frederic
>
>--
>To unsubscribe, e-mail:  
<mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail:
<mailto:tomcat-dev-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message