--- build.xml.orig	2005-06-24 18:20:08.000000000 +0200
+++ build.xml	2005-06-24 19:04:03.000000000 +0200
@@ -32,6 +32,9 @@
   <property file="build.properties"/>
 
   <target name="check_versions">
+  <!-- Comment out so no jdbc decision is done - this way
+       we can set JDBC Specification directly during build with
+       -Djdbc2=true or -Djdbc3=true
     <condition property="jdbc2">
       <or>
         <equals arg1="${ant.java.version}" arg2="1.2"/>
@@ -43,7 +46,7 @@
     </condition>
     <condition property="jdbc3g">
 	<equals arg1="${ant.java.version}" arg2="1.5"/>
-    </condition>
+    </condition>-->
     <condition property="jdbc3any">
       <or>
         <isset property="jdbc3" />
@@ -52,7 +55,10 @@
     </condition>
 
     <available property="datasource" classname="javax.sql.DataSource"/>
-    <available property="ssl" classname="javax.net.ssl.SSLContext"/>
+    <!-- Comment out so no SSL decision is done - this way
+         we can request SSL inclusion during build explicit with 
+         -Dssl=true (for no SSL support just don't set -Dsss to anything)    
+    <available property="ssl" classname="javax.net.ssl.SSLContext"/>-->
     <available property="junit" classname="junit.framework.Test"/>
     <available property="junit.task" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
 
@@ -107,8 +113,8 @@
 
     <available classname="org.postgresql.Driver" property="old.driver.present" />
     <fail message="Old driver was detected on classpath or in jre/lib/ext, please remove and try again." if="old.driver.present" />
-
-    <javac classpath="${srcdir}" srcdir="${srcdir}" destdir="${builddir}" debug="${debug}">
+    <!-- Include target flag for explicit specification of target 1.3 or 1.4 (JDBC2 = 1.3 / JDBC3 = 1.4) -->
+    <javac classpath="${srcdir}" srcdir="${srcdir}" destdir="${builddir}" debug="${debug}" source="${target}" target="${target}">
       <!-- This is the core of the driver.  It is common for all versions. -->
        <include name="${package}/*.java" />
        <include name="${package}/core/**" />
@@ -225,6 +231,15 @@
       <not><equals arg1="${jdbc3any}" arg2="true" /></not>
     </condition>
 
+    <condition property="InitCause" value="">
+      <equals arg1="${jdbc3any}" arg2="true" />
+    </condition>
+    
+    <condition property="InitCause" value="//">
+      <not><equals arg1="${jdbc3any}" arg2="true" /></not>
+    </condition>
+
+
     <!-- determine the ssl status -->
     <condition property="ssl_config" value="">
         <equals arg1="${ssl}" arg2="true"/>
@@ -251,6 +266,7 @@
     <filter token="DEF_PGPORT" value="${def_pgport}" />
     <filter token="SSL" value="${ssl_config}" />
     <filter token="NOINITCAUSE" value="${noInitCause}" />
+    <filter token="INITCAUSE" value="${InitCause}" />
 
      <fail unless="major" message="'major' undefined. Please follow the directions in README."/>
      <fail unless="minor" message="'minor' undefined. Please follow the directions in README."/>
