#! /bin/sh prefix=/home/janne/opt/nest exec_prefix=${prefix} srcdir=/home/janne/Projects/nest/archive/NEST-SCModel/nest-2.2.2 builddir=/home/janne/Projects/nest/archive/NEST-SCModel/nest-2.2.2 usage() { cat <<EOF Usage: nest-config [OPTION] Known values for OPTION are: --prefix NEST install prefix for architecture-independent files --exec-prefix NEST install prefix for architecture-dependent files --libs print library linking information --cflags print pre-processor and compiler flags --compiler print the compiler used to compile NEST --help display this help and exit --version output version information EOF exit $1 } if test $# -eq 0; then usage 1 fi cflags=false libs=false while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac case "$1" in --prefix=*) prefix=$optarg ;; --prefix) echo $prefix ;; --exec-prefix) echo $exec_prefix ;; --version) echo 2.2.2 exit 0 ;; --help) usage 0 ;; --cflags) NEST_CFLAGS="-I${srcdir}/{libnestutil,librandom,sli,nestkernel,nest,topology} -fopenmp" if [ "${builddir}" != "${srcdir}" ]; then NEST_CFLAGS="-I${builddir}/libnestutil ${NEST_CFLAGS}" fi echo $NEST_CFLAGS ;; --libs) NEST_LDFLAGS="-l{models,precise,topology}module -l{nest,random,sli} -lcurses -lreadline -L/usr/lib -lgsl -lgslcblas -lm -lpthread -fopenmp -export-dynamic" if [ "${builddir}" != "${srcdir}" ]; then NEST_LDFLAGS="-L${builddir}/{nestkernel,models,precise,librandom,sli,topology}/.libs ${NEST_LDFLAGS}" else NEST_LDFLAGS="-L${srcdir}/{nestkernel,models,precise,librandom,sli,topology}/.libs ${NEST_LDFLAGS}" fi echo $NEST_LDFLAGS ;; --compiler) echo g++ ;; *) usage exit 1 ;; esac shift done exit 0