Index: /trunk/gsdl3/build.xml
===================================================================
--- /trunk/gsdl3/build.xml	(revision 10900)
+++ /trunk/gsdl3/build.xml	(revision 10901)
@@ -86,4 +86,6 @@
   <property name="os.linux" value="Linux"/> 
   <property name="os.mac" value="Mac OS X"/>
+  <property name="os.solaris" value="SunOS"/>
+  <property name="os.unix" value="${os.linux},${os.mac},${os.solaris}"/>
   <property name="os.windows" value="Windows 95,Windows 98,Windows 2000,Windows XP,Windows NT,Windows ME"/> <!-- check this!!!-->
 
@@ -215,4 +217,5 @@
     <echo>is unixnotmac : ${current.os.isunixnotmac}</echo>
     <echo>is windows : ${current.os.iswindows}</echo>
+    <echo>os.unix: ${os.unix}</echo>
   </target>
 <!-- ==================== Primary and Global Targets ============================= -->
@@ -543,5 +546,5 @@
     <property name="tomcat.path" refid="local.tomcat.path"/>
     <property name="catalina.opts" value="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=$GSDL3HOME -DGSDLOS=$GSDLOS -DPATH=$PATH -Xmx400M"/>
-    <exec executable="${catalina.home}/bin/startup.sh" os="${os.linux},${os.mac}" dir="${catalina.home}/bin" spawn="false">
+    <exec executable="${catalina.home}/bin/startup.sh" os="${os.unix}" dir="${catalina.home}/bin" spawn="false">
       <!--<env key="GSDLOS" value="linux"/> do we need this?? -->
       <env key="GSDL3HOME" value="${basedir}"/>
@@ -571,5 +574,5 @@
   <!-- windows: do we want to launch a webrowser?? -->
   <target name="stop-tomcat" description="Shutdown only Tomcat" depends="init" if="tomcat.islocal">
-    <exec executable="${catalina.home}/bin/shutdown.sh" os="${os.linux},${os.mac}" dir="${catalina.home}/bin" spawn="false">
+    <exec executable="${catalina.home}/bin/shutdown.sh" os="${os.unix}" dir="${catalina.home}/bin" spawn="false">
       <env key="CATALINA_HOME" value="${catalina.home}"/>
     </exec>
@@ -1071,5 +1074,5 @@
       Configuring MG
     </echo>
-    <exec executable="${mg.home}/configure" os="${os.linux},${os.mac}" 
+    <exec executable="${mg.home}/configure" os="${os.unix}" 
       dir="${mg.home}">
       <arg value="--prefix=${basedir}"/>
@@ -1079,5 +1082,5 @@
       Configuring MGPP
     </echo>
-    <exec executable="${mgpp.home}/configure" os="${os.linux},${os.mac}"
+    <exec executable="${mgpp.home}/configure" os="${os.unix}"
       dir="${mgpp.home}">
       <arg value="--prefix=${basedir}"/>
@@ -1087,5 +1090,5 @@
       Configuring JavaGDBM
     </echo>
-    <exec executable="${javagdbm.home}/configure" os="${os.linux}"
+    <exec executable="${javagdbm.home}/configure" os="${os.linux},${os.solaris}"
       dir="${javagdbm.home}">
       <arg value="--prefix=${basedir}"/>
@@ -1105,15 +1108,15 @@
   <target name="clean-packages-c++" depends="init">
     <!-- mg : just call the make target -->
-    <exec executable="make" os="${os.linux},${os.mac}"
+    <exec executable="make" os="${os.unix}"
       dir="${mg.home}">
       <arg value="clean"/>
     </exec>
     <!-- mgpp -->
-    <exec executable="make" os="${os.linux},${os.mac}"
+    <exec executable="make" os="${os.unix}"
       dir="${mgpp.home}">
       <arg value="clean"/>
     </exec>
     <!-- javagdbm -->
-    <exec executable="make" os="${os.linux},${os.mac}"
+    <exec executable="make" os="${os.unix}"
       dir="${javagdbm.home}">
       <arg value="clean"/>
@@ -1123,15 +1126,15 @@
   <target name="distclean-packages-c++" depends="init">
     <!-- mg : just call the make target -->
-    <exec executable="make" os="${os.linux},${os.mac}"
+    <exec executable="make" os="${os.unix}"
       dir="${mg.home}">
       <arg value="distclean"/>
     </exec>
     <!-- mgpp -->
-    <exec executable="make" os="${os.linux},${os.mac}"
+    <exec executable="make" os="${os.unix}"
       dir="${mgpp.home}">
       <arg value="distclean"/>
     </exec>
     <!-- javagdbm -->
-    <exec executable="make" os="${os.linux},${os.mac}"
+    <exec executable="make" os="${os.unix}"
       dir="${javagdbm.home}">
       <arg value="distclean"/>
@@ -1152,8 +1155,8 @@
     description="Compile only the packages">
     <echo>Compiling MG</echo>
-    <exec executable="make" os="${os.linux},${os.mac}"
+    <exec executable="make" os="${os.unix}"
        dir="${mg.home}">
     </exec>
-    <exec executable="make" os="${os.linux},${os.mac}"
+    <exec executable="make" os="${os.unix}"
       dir="${mg.home}">
       <arg value="install"/>
@@ -1170,8 +1173,8 @@
     <!-- mgpp -->
     <echo>Compiling MGPP</echo>
-    <exec executable="make" os="${os.linux},${os.mac}"
+    <exec executable="make" os="${os.unix}"
        dir="${mgpp.home}">
     </exec>
-    <exec executable="make" os="${os.linux},${os.mac}"
+    <exec executable="make" os="${os.unix}"
       dir="${mgpp.home}">
       <arg value="install"/>
@@ -1187,8 +1190,8 @@
     
     <!-- javagdbm -->
-    <exec executable="make" os="${os.linux},${os.mac}"
+    <exec executable="make" os="${os.unix}"
       dir="${javagdbm.home}">
     </exec>
-    <exec executable="make" os="${os.linux},${os.mac}"
+    <exec executable="make" os="${os.unix}"
       dir="${javagdbm.home}">
       <arg value="install"/>
@@ -1378,5 +1381,5 @@
   <target name="configure-gs2building" depends="init" if="gsdl2.islocal"
     description="Configure only the Greenstone 2 building components">
-    <exec executable="${gs2build.home}/configure" os="${os.linux}"
+    <exec executable="${gs2build.home}/configure" os="${os.linux},${os.solaris}"
       dir="${gs2build.home}">
       <arg value="--prefix=${gs2build.home}"/>
@@ -1395,5 +1398,5 @@
     <property name="gli.home" value="${basedir}/gli"/>
     <!-- linux -->
-    <exec executable="clean.sh" os="${os.linux},${os.mac}" dir="${gli.home}"
+    <exec executable="clean.sh" os="${os.unix}" dir="${gli.home}"
       resolveExecutable="true"/>
     <!-- windows -->
@@ -1404,5 +1407,5 @@
     <!-- gs2build -->
     <!--linux:  -->
-    <exec executable="make" os="${os.linux},${os.mac}" dir="${gs2build.home}">
+    <exec executable="make" os="${os.unix}" dir="${gs2build.home}">
       <arg value="clean"/>
     </exec>
@@ -1412,5 +1415,5 @@
     <!-- gs2build -->
     <!--linux:  -->
-    <exec executable="make" os="${os.linux},${os.mac}" dir="${gs2build.home}">
+    <exec executable="make" os="${os.unix}" dir="${gs2build.home}">
       <arg value="distclean"/>
     </exec>
@@ -1434,5 +1437,5 @@
     <property name="gli.home" value="${basedir}/gli"/>
     <!-- linux -->
-    <exec executable="makegli.sh" os="${os.linux},${os.mac}" dir="${gli.home}"
+    <exec executable="makegli.sh" os="${os.unix}" dir="${gli.home}"
       resolveExecutable="true"/>
     <!-- windows -->
@@ -1441,7 +1444,7 @@
     <!-- gs2build -->
     <!--linux: make, make install -->
-    <exec executable="make" os="${os.linux},${os.mac}" dir="${gs2build.home}">
-    </exec>
-    <exec executable="make" os="${os.linux},${os.mac}" dir="${gs2build.home}">
+    <exec executable="make" os="${os.unix}" dir="${gs2build.home}">
+    </exec>
+    <exec executable="make" os="${os.unix}" dir="${gs2build.home}">
       <arg value="install"/>
     </exec>
@@ -1462,5 +1465,5 @@
 
   <target name="gli-local" depends="init" if="gsdl2.islocal">
-    <exec executable="${basedir}/gli/gli4gs3.sh" os="${os.linux}" dir="${basedir}/gli" spawn="true">
+    <exec executable="${basedir}/gli/gli4gs3.sh" os="${os.linux},${os.solaris}" dir="${basedir}/gli" spawn="true">
       <env key="gsdl3path" path="${basedir}"/>
       <env key="gsdlpath" path="${basedir}/gs2build"/>
@@ -1480,7 +1483,12 @@
   
   <target name="gli-external" depends="init" unless="gsdl2.islocal">
-    <exec executable="${gsdl2.installed.path}/gli/gli4gs3.sh" os="${os.linux},${os.mac}" dir="${gsdl2.installed.path}/gli" spawn="true">
+    <exec executable="${gsdl2.installed.path}/gli/gli4gs3.sh" os="${os.linux},${os.solaris}" dir="${gsdl2.installed.path}/gli" spawn="true">
       <env key="gsdl3path" path="${basedir}"/>
       <env key="gsdlpath"  path="${gsdl2.installed.path}"/>
+    </exec>
+    <exec executable="${gsdl2.installed.path}/gli/gli4gs3.sh" os="${os.mac}" dir="${gsdl2.installed.path}/gli" spawn="true">
+      <env key="gsdl3path" path="${basedir}"/>
+      <env key="gsdlpath"  path="${gsdl2.installed.path}"/>
+      <env key="DYLD_LIBRARY_PATH" path="${env.DYLD_LIBRARY_PATH}:${gdbm.installed.path}/lib"/>
     </exec>
     <exec executable="${gsdl2.installed.path}/gli/gli4gs3.bat" os="${os.windows}" dir="${gsdl2.installed.path}/gli" spawn="true">
