#!/bin/bash if [ "$compiler" = "intel" ]; then export CXX=icc fi if [ "$system" = "64bit" ]; then CXXFLAGS_BAK=$CXXFLAGS CXXFLAGS="$CXXFLAGS -m64" export CXXFLAGS export CFLAGS=$CXXFLAGS fi if (not_there Clhep $SIMPATH/cern/clhep/lib/libCLHEP.a); then cd $SIMPATH/cern/clhep untar CLHEP $CLHEPVERSION.tgz cd $CLHEPINSTALLDIR if [ "$arch" = "solarisCC5" ]; then gpatch -p0 < ../../clhep_solaris.patch fi # icc version 10 has no libcxa and libunwind anymore # clhep links without this two libraries # patch configure files in all subdirectories if [ "$compiler" = "intel" -a "$icc_version" = "10" ]; then echo "*** Patching config files for Intel icc version 10" | tee -a $logfile for file in $(find -name configure.in); do mysed 'AM_LDFLAGS="-lstdc++ -lcxa -lunwind"' 'AM_LDFLAGS="-lstdc++"' $file mysed '-no-gcc' '' $file done for file in $(find -name configure); do mysed 'AM_LDFLAGS="-lstdc++ -lcxa -lunwind"' 'AM_LDFLAGS="-lstdc++"' $file mysed '-no-gcc' '' $file done fi cd ../.. if [ "$platform" = "macosx" ]; then export MACOSX_DEPLOYMENT_TARGET=10.5 fi ./$CLHEPINSTALLDIR/configure --prefix=$PWD $MAKE_command install -j$number_of_processes if [ "$platform" = "macosx" ]; then cd $SIMPATH/cern/clhep/lib create_links dylib so fi check_all_libraries $SIMPATH/cern/clhep/lib check_success Clhep $SIMPATH/cern/clhep/lib/libCLHEP.a check=$? fi if [ "$system" = "64bit" ]; then CXXFLAGS=$CXXFLAGS_BAK export CXXFLAGS export CFLAGS=$CXXFLAGS fi if [ "$compiler" = "intel" ]; then export CXX=icpc fi cd $SIMPATH return 1