--- ant	Mon Apr  8 03:00:58 2002
+++ /usr/bin/ant	Thu Apr 25 17:16:25 2002
@@ -3,6 +3,12 @@
 #   Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
 #   reserved.
 
+# load system-wide ant configuration
+if [ -f "/etc/ant.conf" ] ; then 
+  . /etc/ant.conf
+fi
+
+# load user ant configuration
 if [ -f "$HOME/.antrc" ] ; then 
   . $HOME/.antrc
 fi
@@ -84,6 +90,18 @@
   LOCALCLASSPATH="$CLASSPATH"
 fi
 
+# in rpm_mode get ant/optional/xml parser&api from JAVALIBDIR 
+if $rpm_mode; then
+	JAVALIBDIR=/usr/share/java
+	for i in ant ant-optional jaxp_parser xml_apis 
+	do
+	if [ -z "$LOCALCLASSPATH" ] ; then
+        LOCALCLASSPATH=$JAVALIBDIR/$i.jar
+    else
+        LOCALCLASSPATH="$i.jar":"$LOCALCLASSPATH"
+    fi
+    done
+else
 # add in the dependency .jar files
 DIRLIBS="${ANT_HOME}"/lib
 for i in "${DIRLIBS}"/*.jar
@@ -99,6 +117,8 @@
     fi
 done
 
+fi
+
 if [ -n "$JAVA_HOME" ] ; then
   if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
     LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar"
@@ -132,6 +152,11 @@
     JIKESPATH=`cygpath --path --windows "$JIKESPATH"`
   fi
   ANT_OPTS="$ANT_OPTS -Djikes.class.path=$JIKESPATH"
+fi
+
+# Allow Jikes support (off by default)
+if $usejikes; then
+    ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes"
 fi
 
 # For Cygwin, switch paths to Windows format before running java
