#!/bin/csh cat - <& /dev/null if ( $status != 0 ) then echo You don\'t have ${CXX}. You can download g++ from http://www.gnu.org/ exit 1 endif make --version x >& /dev/null if ( $status != 0 ) then foreach makename (gmake gnumake) $makename --version x >& /dev/null if ( $status == 0 ) then echo It looks like GNU make on your system is called $makename echo Please use $makename exit 1 endif end echo You do not have gnu make. Please download it from http://www.gnu.org/ exit 1 endif perl -v >& /dev/null if ( $status != 0 ) then echo You do not have perl. Please download it from http://www.perl.com/ exit 1 endif #tail +2 $0 >& /dev/null #if ( $status != 0 ) then # tail -n +2 $0 >& /dev/null # if ( $status == 0 ) then # echo Patching tail command... # ./patchtail # endif #endif cd src echo Testing compiler features... echo -n 'PATCHCXXFLAGS=' >! makefileflags foreach feature ( ) echo -n " " $feature ": " ${CXX} test${feature}.c++ -o test${feature} >&! tmp.out if (`cat tmp.out | wc -l` != 0) then echo -n ' -ffriend-injection' >> makefileflags echo "patched" else echo "ok" endif rm -f tmp.out end echo "#\!/bin/sh" >! ./patchlang echo -n "cat -" >> ./patchlang echo -n " | ./patchconst " >> ./patchlang chmod +x ./patchlang foreach feature ( friend doth str2s template uT static ) echo -n " " $feature ": " ${CXX} test${feature}.c++ -o test${feature} >&! tmp.out if (`cat tmp.out | wc -l` != 0) then echo -n ' | ' ./patch${feature} >> ./patchlang echo "patched" else echo "ok" endif rm -f tmp.out end echo "" >> ./patchlang cd .. echo Tests successfully passed.