<?xml version="1.0"?>

<!-- build configuration -->
<project name="nenya-checks" basedir=".">

  <!-- checks the availability of certain libraries -->
  <target name="check-available">
    <available property="lwjgl.present"
     classname="org.lwjgl.LWJGLException" classpathref="classpath"/>
    <echo message="Have LWJGL: ${lwjgl.present}"/>

    <available property="jme.present"
     classname="com.jme.scene.Node" classpathref="classpath"/>
    <echo message="Have JME: ${jme.present}"/>

    <available property="jme-bui.present"
     classname="com.jmex.bui.BWindow" classpathref="classpath"/>
    <echo message="Have JME-BUI: ${jme-bui.present}"/>

    <available property="jme-sound.present"
     classname="com.jmex.sound.openAL.SoundSystem" classpathref="classpath"/>
    <echo message="Have OpenAL: ${jme-sound.present}"/>

    <available property="xml-writer.present"
     classname="com.megginson.sax.DataWriter" classpathref="classpath"/>
    <echo message="Have XML Writer: ${xml-writer.present}"/>

    <condition property="build.jme">
      <and>
        <isset property="jme.present"/>
        <isset property="jme-bui.present"/>
      </and>
    </condition>

    <condition property="build.openal">
      <and>
        <isset property="lwjgl.present"/>
        <isset property="jme-sound.present"/>
      </and>
    </condition>

    <condition property="build.xml">
      <isset property="xml-writer.present"/>
    </condition>
  </target>

</project>
