#!/bin/sh # # check that the host has the right version of BaBar required UNIX tools # # This script should not assume that the host system has any BaBar # software installed yet, but does check things there # # Doug Wright, July 1995 original, tested gmake # Bob Jacobsen, Dec 1995 added g++, fixed gmake # Bob Jacobsen, Jan 1996 added environment variables # versions to search for # minimal gmake gmake_ver=3.74 # requested cvs, followed by minimal acceptable cvs cvs_ver=1.6 cvs_ok=1.3 cvs_date="March 1996" # current gcc/g++, followed by the one we will switch to gcc_ver=2.6.3 gcc_ver_next=2.7.2 gcc_date="March 1996" ##### start echo "Checking that `hostname` has the required UNIX utilities for BaBar Software\n" ##### internal variables ##### check gmake gmake_ask="please acquire gmake version $gmake_ver from another system \n or from prep.ai.mit.edu:pub/gnu" if t=`gmake -v` then v=`expr substr "$t" 18 4` # get gmake version number if a=`expr $v \>= $gmake_ver` then echo gmake version=$v is OK else echo gmake is out of date, $gmake_ask fi else echo gmake is missing, $gmake_ask fi ##### check gcc # version string is sent to stderr, dammit v=`gcc -V$gcc_ver -v 2>&1 | grep version|cut -f3 -d" "` if [ "$v" = "$gcc_ver" ]; then echo "gcc/g++ version=$v is available, OK" else echo "gcc/g++ version $gcc_ver is currently required, please acquire it from another system or prep.ai.mit.edu:/pub/gnu" fi v=`gcc -V$gcc_ver_next -v 2>&1 | grep version|cut -f3 -d" "` if [ "$v" = "$gcc_ver_next" ]; then echo "gcc/g++ version=$v is available, OK" else echo "gcc/g++ version $gcc_ver_next will be required after $gcc_date, please acquire it from another system or prep.ai.mit.edu:/pub/gnu" fi ##### check awk or gawk ##### check CVS, rCVS, and rdist v=`cvs -v | grep Concurrent| cut -f5 -d" " ` if a=`expr $v \>= $cvs_ver` then echo cvs version=$v is OK else if a=`expr $v \>= $cvs_ok` then echo "cvs $v is OK only until $cvs_date, please contact Terry Hung at SLAC for $cvs_ver" else echo "cvs $v is out of date and will not work, please contact Terry Hung at SLAC for $cvs_ver" cvs -v | grep Concurrent fi fi ##### start SRT checks if [ "`printenv BFROOT`" = "" ]; then echo "BFROOT not set"; fi if [ "`printenv BFDIST`" = "" ]; then echo "BFDIST not set; usually set by SRTstartup script"; fi if [ "`printenv BFARCH`" = "" ]; then echo "BFARCH not set; usually set by SRTstartup script"; fi ##### verify gcc library setup #then # echo "Starting to verify BaBar installation" #else # echo "gmake not present, cannot continue" # exit 1 #fi