tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native2 build.xml
Date Wed, 22 May 2002 23:40:02 GMT
costin      02/05/22 16:40:02

  Modified:    jk/native2 build.xml
  Log:
  Added IIS to the build targets ( if detected ). We'll look for MSVC, as the
  required headers are included - you don't need IIS to compile the DLL ( and
  I think it'll work with the personal web server as well, probably any ISAPI
  server with a bit more work ).
  
  Added detection for solaris and hpux.
  
  Few more tweaks.
  
  As soon as I have some time I'll integrate the ant types that are used
  in the cc-tasks ( that would be a good first step into merging, if we
  use the same DTD that's already a big step forward ). This will allow
  us to specify the includes, flags, etc only once.
  
  I got it to compile on a Windows, I still have few problems with solaris
  and HPUX.  More targets are wellcomed - also someone should test on netware.
  After we merge the syntax with cc-tasks ( on sourceforge/ant-contrib ) we
  might be able to support all the compilers they support and more
  environments.
  
  Revision  Changes    Path
  1.28      +47 -113   jakarta-tomcat-connectors/jk/native2/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/build.xml,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- build.xml	22 May 2002 21:26:22 -0000	1.27
  +++ build.xml	22 May 2002 23:40:02 -0000	1.28
  @@ -63,58 +63,60 @@
   
     <!-- ==================== Targets ==================== -->
   
  -  <target name="main" depends="init,apache20,apache13,jni">
  +  <target name="main" depends="init,apache20,apache13,jni,iis">
     </target>
   
     <target name="all" depends="jkant,init,apache20,apache13,jni">
     </target>
   
     <target name="guess.env" >
  -    <echo message="build.properties ${os.arch}.${os.name}" />
       <taskdef resource="META-INF/ant.tasks" 
   	     classpathref="jkant" />
   
  -    <available property="HAS_APR" file="${apr.include}/apr.h" />
  +    <echo message="build.properties ${os.arch}.${os.name}" />
  +
  +    <!-- What servers do we have ? -->
       <available property="apache13.detect" 
                  file="${apache13.home}/bin/htpasswd" />
       <available property="apache2.detect" 
                  file="${apache2.home}" />
       <available property="iis.detect" 
  -               file="${iis.home}" />
  +               file="${mssdk.home}" />
       <available property="iplanet.detect" 
                  file="${iplanet.home}" />
  +    <echo message="Apache2 ${apache2.home} ${apache2.detect}" />
  +    <echo message="Apache13 ${apache13.home} ${apache13.detect}" />
  +    <echo message="IIS ${iis.home} ${iis.detect}" />
  +    <echo message="Iplanet ${iplanet.home} ${iplanet.detect}" />
  +    <echo message="" />
   
  +    <!-- What OS ( it'll determine the includes ) -->
       <condition property="linux">
          <equals arg1="${os.name}" arg2="Linux"/>
       </condition>
  +    <condition property="solaris">
  +       <equals arg1="${os.name}" arg2="SunOS"/>
  +    </condition>
       <condition property="win32">
         <os family="windows"/>
       </condition>
       <condition property="hpux">
  -      <equals arg1="${os.name}" arg2="???"/>
  +      <equals arg1="${os.name}" arg2="HP-UX"/>
       </condition>
  -    <condition property="solaris">
  -      <equals arg1="${os.name}" arg2="???"/>
  -    </condition>
  -
       <!-- I believe they are using cross-compilation, so checking the os.name
            doesn't help. We'll check if the NDK is installed instead -->
       <condition property="netware">
         <available file="novellndk.home" />
       </condition>
   
  -    <echo message="Apache2 ${apache2.home} ${apache2.detect}" />
  -    <echo message="Apache13 ${apache13.home} ${apache13.detect}" />
  -    <echo message="IIS ${iis.home} ${iis.detect}" />
  -    <echo message="Iplanet ${iplanet.home} ${iplanet.detect}" />
  -    <echo message="" />
  -    <echo message="Linux:${linux} Win32:${win32} Netware:${netware}" />
  +    <echo message="Linux:${linux} Win32:${win32} Netware:${netware} Solaris:${solaris}
HPUX:${hpux}" />
     </target>
   
     <target name="init.win32" if="win32" >
       <property name="build.compiler.base" location="${mssdk.home}" />
       <property name="build.compiler.cc" location="${mssdk.home}/bin/cl" />
       <property name="build.compiler.ld" location="${mssdk.home}/bin/link" />
  +    <echo message="MSDEV compiler: ${mssdk.home}" />
     </target>
   
     <target name="init.netware" if="netware" >
  @@ -122,6 +124,8 @@
       <property name="build.compiler.cc" location="${build.compiler.base}/bin/mwccnlm"
/>
       <property name="build.compiler.ld" location="${build.compiler.base}/bin/mwldnlm"
/>
       <property name="novelllibc.dir" location="${novellndk.home}/libc" />
  +    <echo message="MWCC compiler: ${mw.home}" />
  +    <echo message="NDK: ${novellndk.home}" />
     </target>
   
     <target name="init" depends="guess.env,init.win32,init.netware" >
  @@ -171,6 +175,7 @@
           <include name="${java.home}/../include/linux" if="linux" />
           <include name="${java.home}/../include/hp-ux" if="hpux" />        
           <include name="${java.home}/../include/win32" if="win32" />        
  +        <include name="${java.home}/../include/solaris" if="solaris" />        
           <include name="&quot;${mssdk.home}/include&quot;" if="win32"/>
         </includes>
         <depends>
  @@ -180,16 +185,18 @@
         <import fileName="libhttpd.lib" if="win32" />
         <import fileName="libapr.lib" if="win32" />
         <import fileName="libaprutil.lib" if="win32" />
  -      <!-- import fileName="wsock32.lib" if="win32" />
  -      <import fileName="kernel32.lib" if="win32" />
  +      <import fileName="advapi32.lib" if="win32" />
  +      <import fileName="wsock32.lib" if="win32" />
  +      <!-- <import fileName="kernel32.lib" if="win32" />
         <import fileName="user32.lib" if="win32" />
         <import fileName="gdi32.lib" if="win32" />
         <import fileName="winspool.lib" if="win32" />
         <import fileName="comdlg32.lib" if="win32" /-->
  -      <linkOpt value="/libpath:&quot;${build.compiler.base}/lib&quot;" if="win32"
/>
         <linkOpt value="/libpath:&quot;${apr.lib}&quot;" if="win32" />
         <linkOpt value="/libpath:&quot;${apr-util.lib}&quot;" if="win32" />
  -      <linkOpt value="/libpath:&quot;${apache2.lib}&quot;" if="win32" />
  +      <linkOpt value="/libpath:&quot;${apache2.home}/lib&quot;" if="win32" />
  +      <linkOpt value="/libpath:&quot;${mssdk.home}/lib&quot;" if="win32" />
  +      <linkOpt value="/libpath:&quot;${mssdk.home}/../Common/MSDev98/bin&quot;"
if="win32" />
       </so>
     </target>
     
  @@ -223,6 +230,7 @@
           <include name="${java.home}/../include/netware" if="netware" />
           
           <include name="${java.home}/../include/win32" if="win32" />
  +        <include name="${java.home}/../include/solaris" if="solaris" />        
           <include name="${java.home}/../include/linux" if="linux" />
         </includes>
         <depends>
  @@ -267,7 +275,16 @@
         <def name="_MBCS" if="win32" />
         <def name="_USRDLL" if="win32" />
         <def name="JNI_CONNECT_EXPORTS" if="win32" />
  -      <linkOpt value="/libpath:&quot;${build.compiler.base}/lib&quot;" if="win32"
/>
  +      <import fileName="libhttpd.lib" if="win32" />
  +      <import fileName="libapr.lib" if="win32" />
  +      <import fileName="libaprutil.lib" if="win32" />
  +      <import fileName="advapi32.lib" if="win32" />
  +      <import fileName="wsock32.lib" if="win32" />
  +      <linkOpt value="/libpath:&quot;${apr.lib}&quot;" if="win32" />
  +      <linkOpt value="/libpath:&quot;${apr-util.lib}&quot;" if="win32" />
  +      <linkOpt value="/libpath:&quot;${apache2.home}/lib&quot;" if="win32" />
  +      <linkOpt value="/libpath:&quot;${mssdk.home}/lib&quot;" if="win32" />
  +      <linkOpt value="/libpath:&quot;${mssdk.home}/../Common/MSDev98/bin&quot;"
if="win32" />
       </so>
     </target>
   
  @@ -307,6 +324,7 @@
   	<include name="${apache13.home}/os/win32" if="win32" />
           <include name="${java.home}/../include/win32" if="win32" />
           <include name="${native.dir}/common" if="win32" />
  +        <include name="${java.home}/../include/solaris" if="solaris" />        
           <include name="${java.home}/../include/hp-ux" if="hpux" />        
           <include name="${java.home}/../include/linux" if="linux" />
         </includes>
  @@ -372,14 +390,13 @@
         <src dir=".">
           <include name="server/isapi/*.c" />
           <include name="common/*.c" />
  -        <exclude name="common/jk_channel_apr_socket.c"/>
  -        <exclude name="common/jk_pool_apr.c"/>
           <exclude name="jk_nwmain.c" unless="netware" />
   	<include name="jni/*.c" />
           <exclude name="jk_apr.c" unless="netware" />
         </src>
         <includes>
           <include name="${java.home}/../include" />
  +        <include name="${apr.include}/../include" />
   	<include name="${native.dir}/include" />
           <include name="${java.home}/../include/win32" />
           <include name="${native.dir}/common" />
  @@ -400,107 +417,24 @@
         <def name="_MBCS" />
         <def name="_USRDLL" />
         <def name="ISAPI_EXPORTS" />
  +      <def name="HAS_APR" />
  +      <def name="HAVE_JNI" 
  +	   info="Jni worker" />
  +      <def name="MOD_JK2_EXPORTS" if="win32" />
  +
         <import fileName="advapi32.lib" />
         <import fileName="wsock32.lib" />
  +      <import fileName="libapr.lib" if="win32" />
  +      <import fileName="libaprutil.lib" if="win32" />
         <export symbol="HttpFilterProc"/>
         <export symbol="GetFilterVersion"/>
         <export symbol="GetExtensionVersion"/>
         <export symbol="HttpExtensionProc"/>
         <export symbol="TerminateFilter"/>
         <export symbol="TerminateExtension"/>
  -      <!--linkOpt value="/libpath:&quot;${build.compiler.base}/lib&quot;" if="win32"
/-->
         <linkOpt value="/libpath:&quot;${mssdk.home}/lib&quot;" if="win32" />
         <linkOpt value="/libpath:&quot;${mssdk.home}/../Common/MSDev98/bin&quot;"
if="win32" />
  -    </so>
  -  </target>
  -
  -  <target name="netscape" depends="init" if="iplanet.detect">
  -    <available property="unix" file="/etc/passwd" />
  -  
  -    <mkdir dir="netscape/obj" />
  -    <so sofile="nsapi_redirector" 
  -	buildDir="netscape/obj"
  -	optimize="${so.optimize}"
  -	debug="${so.debug}"
  -	profile="${so.profile}">
  -
  -      <src dir=".">
  -	<include name="netscape/jk_nsapi_plugin.c" />
  -	<include name="common/*.c" />
  -        <exclude name="jk_nwmain.c" unless="netware" />
  -        <include name="common/apr/*.c" unless="HAVE_APR" />
  -	<include name="jni/*.c" />
  -      </src>
  -      <includes>
  -	<include name="${native.dir}/common" />
  -	<include name="${build.compiler.base}/include" />
  -	<include name="${native.dir}/include" />
  -	<include name="${netscape.home}/include" />
  -	<include name="${java.home}/../include" />
  -
  -        <!-- Platform specific includes -->
  -        
  -	<include name="${novellndk.home}/include/nlm" if="netware" />
  -	<include name="${novellndk.home}/include" if="netware" />
  -        <include name="${java.home}/../include/netware" if="netware" />
  -                 
  -	<include name="${apache13.home}/os/win32" if="win32" />
  -        <include name="${java.home}/../include/win32" if="win32" />
  -        <include name="${java.home}/../include/linux" if="linux" />
  -        <include name="${native.dir}/common" if="win32" />
  -      </includes>
  -      <depends>
  -	<fileset dir="${native.dir}/common" includes="*.h" />
  -      </depends>
  -
  -      <!-- Platform-specific tags -->
  -      <altSoFile value="nsapi_rd" if="netware" />
  -      
  -      <def name="N_PLAT_NLM" if="netware"
  -	   info="Building for NetWare platform" />
  -      <def name="NETWARE" if="netware"
  -	   info="Building for NetWare platform" />
  -      <def name="XP_NETWARE" if="netware"
  -	   info="Building for NetWare platform" />
  -      <def name="USE_SPRINTF" if="netware"
  -	   info="Use the sprintf function to build strings" />
  -           
  -      <def name="WIN32" if="win32" />
  -      <def name="NDEBUG" if="win32.release" />
  -      <def name="_DEBUG" if="win32.debug" />
  -      <def name="_WINDOWS" if="win32" />
  -      <def name="_MBCS" if="win32" />
  -      <def name="_USRDLL" if="win32" />
  -      <def name="XP_WIN32" if="win32" />
  -      <def name="NSAPI_EXPORTS" if="win32" />
  -      
  -      <def name="XP_UNIX" if="unix"
  -	   info="Unix platform - needed for nsapi.h" />
  -      
  -      <nlmmodule value="nshttpd" if="netware" />
  -      <import fileName="${novellndk.home}/imports/clib.imp" if="netware" />
  -      <import fileName="${novellndk.home}/imports/lib0.imp" if="netware" />
  -      <import fileName="${novellndk.home}/imports/nlmlib.imp" if="netware" />
  -      <import fileName="${novellndk.home}/imports/threads.imp" if="netware" />
  -      <import fileName="${novellndk.home}/imports/socklib.imp" if="netware" />
  -      <import fileName="${netscape.home}/imports/nsapi.imp" if="netware" />
  -      <export symbol="jk_init" if="netware" />
  -      <export symbol="jk_service" if="netware" />
  -      <linkOpt value="-desc &quot;Netscape Plugin for Tomcat&quot;" if="netware"
/>
  -      <linkOpt value="-screenname &quot;System Console&quot;" if="netware" />
  -      <linkOpt value="-nlmversion 1,20,2" if="netware" />
  -      <linkOpt value="-threadname &quot;NSTomcat Thread&quot;" if="netware"
/>
  -      <linkOpt value="-stacksize 64000" if="netware" />
  -      
  -      <import fileName="ns-httpd36.lib" if="win32" />
  -      <import fileName="wsock32.lib" if="win32" />
  -      <import fileName="kernel32.lib" if="win32" />
  -      <import fileName="user32.lib" if="win32" />
  -      <import fileName="gdi32.lib" if="win32" />
  -      <import fileName="winspool.lib" if="win32" />
  -      <import fileName="comdlg32.lib" if="win32" />
  -      <linkOpt value="/libpath:&quot;${build.compiler.base}/lib&quot;" if="win32"
/>
  -      <linkOpt value="/libpath:&quot;${netscape.home}/lib&quot;" if="win32"
/>
  +      <linkOpt value="/libpath:&quot;${apr.lib}&quot;" if="win32" />
       </so>
     </target>
   
  
  
  

--
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