#!/bin/bash blrtsgnu=/bgl/BlueLight/ppcfloor/blrts-gnu bglsys=/bgl/BlueLight/ppcfloor/bglsys installdir=/gpfs/scratch/s/smeds/bgoctave/octave-3.0.1b export CC=${blrtsgnu}/bin/powerpc-bgl-blrts-gnu-gcc export CFLAGS="-I${bglsys}/include/ -O3" export PATH=${blrtsgnu}/bin:$PATH export CPPFLAGS=-I${bglsys}/include export CXX=${blrtsgnu}/bin/powerpc-bgl-blrts-gnu-g++ export CXXFLAGS="-I${bglsys}/include -O3" export F77=${blrtsgnu}/bin/powerpc-bgl-blrts-gnu-g77 export FFLAGS="-I${bglsys}/include -fno-underscoring -fno-second-underscore -O3" export LDFLAGS="-Wl,-static " # For linking with IBM ESSL accelerated BLAS/LAPACK libraries export LIBS="-L/opt/ibmmath/lib -lesslbg" export LIBS="$LIBS /opt/ibmcmp/xlsmp/bg/1.7/blrts_lib/libxlomp_ser.a" # Supporting Fortran libraries needed for linking export LIBS="$LIBS /opt/ibmcmp/xlf/bg/11.1/blrts_lib/libxlf90.a" export LIBS="$LIBS /opt/ibmcmp/xlf/bg/11.1/blrts_lib/libxlfmath.a" export LIBS="$LIBS /opt/ibmcmp/xlf/bg/11.1/blrts_lib/libxl.a" # MPICH libraries export LIBS="$LIBS -L${bglsys}/lib/ -lmpich.rts -lmsglayer.rts -lrts.rts -ldevices.rts" # For linking with IBM MASS accelerated math routines. (Need to come before -lm) export LIBS="$LIBS -Wl,--allow-multiple-definition /opt/ibmcmp/xlmass/bg/4.4/bglib/libmass.a -lm" # Supporting libraries needed by some network related routines exercised by Octave export LIBS="$LIBS -L${blrtsgnu}/powerpc-bgl-blrts-gnu/lib -Wl,--start-group -lc -lnss_dns -lnss_files -lresolv -Wl,--end-group" # These tests fail in configure since we are cross-compiling. We # state the what they should return explicitly using a cache file cachefile=`pwd`/CONFIG.CACHE cat > $cachefile << __EOF__ ac_cv_sizeof_int=4 ac_cv_sizeof_long=4 ac_cv_sizeof_long_long=8 ac_cv_sizeof_short=2 ac_cv_func_glob=${ac_cv_func_glob=yes} ac_cv_header_glob_h=${ac_cv_header_glob_h=yes} ac_cv_func_fnmatch=${ac_cv_func_fnmatch=yes} ac_cv_header_fnmatch_h=${ac_cv_header_fnmatch_h=yes} ac_cv_header_sgtty_h=${ac_cv_header_sgtty_h=no} __EOF__ # Here comes the magic. Note disable-shared and disable-dl since Blue Gene/L # is a statically linked platform. ./configure --cache-file=$cachefile \ --disable-readline --disable-shared --disable-dl --enable-static --target=ppc-bgl-gnu \ --without-hdf5 --without-fftw --without-readline --without-gnuplot --with-blas=esslbg \ --prefix=$installdir