#!/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 [ "$make_install" = "yes" ]; then install_prefix=$SIMPATH_INSTALL else install_prefix=$SIMPATH/cern/clhep fi checkfile=$install_prefix/lib/libCLHEP.a if (not_there Clhep $checkfile); 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" -ge 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=$install_prefix --libdir=$install_prefix/lib $MAKE_command install -j$number_of_processes if [ "$platform" = "macosx" ]; then cd $install_prefix/lib create_links dylib so fi check_all_libraries $install_prefix/lib check_success Clhep $checkfile 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