#!/bin/sh DARSHAN_LIB_PATH="@darshan_lib_path@" DARSHAN_SHARE_PATH="@darshan_share_path@" DARSHAN_LD_FLAGS="@LDFLAGS@" # NOTE: # - we deliberately list libdarshan-mpi-io twice in the link command. The # first is necessary to correctly use the MPI profiling interface. The # final one is necessary to give the linker a change to resolve indirect # dependencies on PnetCDF and HDF5 symbols (if the app used a library which # in turn used one of those HLLs). PRE_LD_FLAGS="-L$DARSHAN_LIB_PATH $DARSHAN_LD_FLAGS -ldarshan -lz -Wl,@$DARSHAN_SHARE_PATH/ld-opts/darshan-base-ld-opts" POST_LD_FLAGS="-L$DARSHAN_LIB_PATH -Wl,--start-group -ldarshan -ldarshan-stubs -Wl,--end-group -lz -lrt -lpthread" usage="\ Usage: darshan-config [--pre-ld-flags] [--post-ld-flags]" if test $# -eq 0; then echo "${usage}" 1>&2 exit 1 fi while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac case $1 in --pre-ld-flags) echo $PRE_LD_FLAGS ;; --post-ld-flags) echo $POST_LD_FLAGS ;; *) echo "${usage}" 1>&2 exit 1 ;; esac shift done