--- projects/cms/source/conient/configure 2001/03/14 21:56:00 1.3 +++ projects/cms/source/conient/configure 2004/08/01 10:39:59 1.14 @@ -4,27 +4,35 @@ # i-scream Distributed Centralised Monitoring System # Conient configure script # -# $Id: configure,v 1.3 2001/03/14 21:56:00 tdb Exp $ +# $Id: configure,v 1.14 2004/08/01 10:39:59 tdb Exp $ # ## Config # HTTP Server. This is the source of all downloads. -HTTPSERVER="http://killigrew.ukc.ac.uk/" +HTTPSERVER="http://www.i-scream.org/pub/i-scream/cms/lib/" # This script uses wget, set it's path and parameters here WGETPARAM="-nv" -WGET="/usr/local/bin/wget ${WGETPARAM}" +if test -x /usr/bin/wget; then + WGET="/usr/bin/wget ${WGETPARAM}" +else + if test -x /usr/local/bin/wget; then + WGET="/usr/local/bin/wget ${WGETPARAM}" + else + WGET="wget ${WGETPARAM}"; + fi +fi # This should always be the same -PWD=`pwd` +SRCROOT=`pwd` ## Library check echo "> Checking for required libraries" cd build/lib -LIBRARIES="crimson.jar jaxp.jar iscream-util.jar" +LIBRARIES="crimson.jar jaxp.jar iscream_util.jar" for LIB in ${LIBRARIES}; do @@ -32,18 +40,41 @@ for LIB in ${LIBRARIES}; do echo " + ${LIB} found"; \ else \ echo " - ${LIB} not found, fetching from ${HTTPSERVER}${LIB}"; \ - /usr/local/bin/wget -nv ${HTTPSERVER}${LIB}; \ + ${WGET} -nv ${HTTPSERVER}${LIB}; \ fi done +## Cache javadoc API package-list files +echo "> Caching remote API's" + +JDKURL="http://java.sun.com/j2se/1.4.2/docs/api/" +mkdir -p ${SRCROOT}/.api-cache/jdk +cd ${SRCROOT}/.api-cache/jdk +if test -r "package-list"; then \ + echo " + jdk/package-list found"; \ +else \ + echo " - jdk/package-list not found, fetching from ${JDKURL}package-list"; \ + ${WGET} ${JDKURL}package-list; \ +fi + +UTILURL="http://www.i-scream.org/javadoc/util/" +mkdir -p ${SRCROOT}/.api-cache/util +cd ${SRCROOT}/.api-cache/util +if test -r "package-list"; then \ + echo " + util/package-list found"; \ +else \ + echo " - util/package-list not found, fetching from ${UTILURL}package-list"; \ + ${WGET} ${UTILURL}package-list; \ +fi + ## Write out the include file for the Makefile's echo "> Generating Makefile includes" echo " + writing root of source tree" -echo "SOURCEROOT=${PWD}" > ${PWD}/Config.inc +echo "SOURCEROOT=${SRCROOT}" > ${SRCROOT}/Config.inc echo " + writing include" -echo "include \$(SOURCEROOT)/Config2.inc" >> ${PWD}/Config.inc +echo "include \$(SOURCEROOT)/Config2.inc" >> ${SRCROOT}/Config.inc echo "> Configure Completed"