Index: contrib/misc/build.xml
===================================================================
--- contrib/misc/build.xml	(revision 1089136)
+++ contrib/misc/build.xml	(working copy)
@@ -17,7 +17,7 @@
     limitations under the License.
  -->
 
-<project name="misc" default="default">
+<project name="misc" default="default" xmlns:cpptasks="antlib:net.sf.antcontrib.cpptasks">
 
   <!-- TODO: add javacc capability for PrecedenceQueryParser -->
 
@@ -42,4 +42,24 @@
       <fileset dir="${common.dir}/../modules/analysis/common" includes="build.xml"/>
     </subant>
   </target>
+
+  <target name="build-native" >
+
+		<property environment="env"/>
+		<property name="jni1" location="${env.JAVA_HOME}/include" />
+		<property name="jni2" location="${env.JAVA_HOME}/include/linux" />
+
+    <cpptasks:cc outtype="shared" subsystem="console" outfile="src/java/org/apache/lucene/store/NativePosixUtil" >
+	    <fileset file="src/java/org/apache/lucene/store/NativePosixUtil.cpp" />
+			<includepath>
+  			<pathelement location="${jni1}"/>
+  			<pathelement location="${jni2}"/>
+			</includepath>
+     	<compilerarg value="-fPIC" />
+		</cpptasks:cc>
+
+    <cpptasks:compiler name="gcc" >
+	  </cpptasks:compiler>
+  </target>
+
 </project>
