--- projects/cms/source/conient/configure 2001/01/24 03:03:13 1.1 +++ projects/cms/source/conient/configure 2001/07/18 16:09:08 1.6 @@ -1,33 +1,50 @@ #!/bin/sh -HTTPSERVER="http://killigrew.ukc.ac.uk/" +# +# i-scream Distributed Centralised Monitoring System +# Conient configure script +# +# $Id: configure,v 1.6 2001/07/18 16:09:08 tdb Exp $ +# -echo "Generating Makefile includes" -echo "SOURCEROOT="`pwd` > Config.inc -echo "include \$(SOURCEROOT)/Config2.inc" >> Config.inc +## Config -echo "Checking for required libraries" +# HTTP Server. This is the source of all downloads. +HTTPSERVER="http://www.i-scream.org.uk/downloads/lib/" + +# This script uses wget, set it's path and parameters here +WGETPARAM="-nv" +WGET="/usr/local/bin/wget ${WGETPARAM}" + +# This should always be the same +SRCROOT=`pwd` + +## Library check + +echo "> Checking for required libraries" cd build/lib -if test -r "jaxp.jar"; then \ - echo " jaxp.jar found"; \ -else \ - echo " jaxp.jar not found, fetching from ${HTTPSERVER}jaxp.jar"; \ - wget -nv ${HTTPSERVER}jaxp.jar; \ -fi +LIBRARIES="crimson.jar jaxp.jar iscream-util.jar" -if test -r "parser.jar"; then \ - echo " parser.jar found"; \ -else \ - echo " parser.jar not found, fetching from ${HTTPSERVER}parser.jar"; \ - wget -nv ${HTTPSERVER}parser.jar; \ -fi +for LIB in ${LIBRARIES}; do + + if test -r "${LIB}"; then \ + echo " + ${LIB} found"; \ + else \ + echo " - ${LIB} not found, fetching from ${HTTPSERVER}${LIB}"; \ + ${WGET} ${HTTPSERVER}${LIB}; \ + fi + +done -if test -r "iscream-util.jar"; then \ - echo " iscream-util.jar found"; \ -else \ - echo " iscream-util.jar not found, fetching from ${HTTPSERVER}iscream-util.jar"; \ - wget -nv ${HTTPSERVER}iscream-util.jar; \ -fi +## Write out the include file for the Makefile's -echo "Configure Completed" +echo "> Generating Makefile includes" +echo " + writing root of source tree" +echo "SOURCEROOT=${SRCROOT}" > ${SRCROOT}/Config.inc +echo " + writing include" +echo "include \$(SOURCEROOT)/Config2.inc" >> ${SRCROOT}/Config.inc + +echo "> Configure Completed" + +## End