#! /usr/bin/env bash # These variables need to exist prefix=/users/kepingx/gcc7/mcfmbridge if [[ $# -eq 0 || -n $( echo $* | egrep -- "--help|-h" ) ]]; then echo "mcfmbridge-config: configuration tool for the APPLgrid - mcfm bridge" echo " http://projects.hepforge.org/applgrid/" echo echo "Usage: mcfmbridge-config [[--help|-h] | [--prefix] | [...]]" echo "Options:" echo " --help | -h : this help" echo echo " --prefix : installation prefix (cf. autoconf)" echo " --incdir : path to the bridge header directory" echo " --libdir : path to the bridge library directory" echo " --cxxflags : compiler flags for the C preprocessor" echo " --ldflags : compiler flags for the linker " echo echo " --version : release version number" fi OUT="" tmp=$( echo "$*" | egrep -- '--\') test -n "$tmp" && OUT="$OUT /users/kepingx/gcc7/mcfmbridge" tmp=$( echo "$*" | egrep -- '--\') test -n "$tmp" && OUT="$OUT ${prefix}/include" tmp=$( echo "$*" | egrep -- '--\') test -n "$tmp" && OUT="$OUT -I${prefix}/include" tmp=$( echo "$*" | egrep -- '--\') test -n "$tmp" && OUT="$OUT ${prefix}${exec_prefix}/lib" symbol=$( nm ${prefix}${exec_prefix}/lib/libmcfmbridge.a | sed -n 's/.* T \(.*setup_mcfmbridge\)/\1/p' | head -1 ) applgrid_ldflags=$( applgrid-config --ldflags ) root_ldflags=$( root-config --ldflags ) root_libs=$( root-config --libs ) tmp=$( echo "$*" | egrep -- '--\') test -n "$tmp" && OUT="$OUT -u $symbol -L${prefix}${exec_prefix}/lib -lmcfmbridge $applgrid_ldflags $root_ldflags $root_libs -lstdc++" ## Version tmp=$( echo "$*" | egrep -- '--\') test -n "$tmp" && OUT="$OUT 0.0.35" echo $OUT