#!/bin/sh

case $1 in
  --version)
    echo @SHERPA_VERSION@;;
  --prefix)
    echo @CMAKE_INSTALL_PREFIX@;;
  --libs)
    echo -L${SHERPA_LIBRARY_PATH:-@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/SHERPA-MC} -lSherpaMain @CONDITIONAL_HEPMC2LIBS@ @CONDITIONAL_HEPMC3LIBS@ @RIVET_CONFIG_LIBS_STRING@ @ROOT_CONFIG_LIBS_STRING@ -L@LHAPDF_LIBRARY_DIR@ -lLHAPDF;;
  --python-libs)
    echo @SHERPA_Python_SITEARCH@;;
  --load-mpi4py)
    echo @LOADMPIFORPY@;;
  --incdir)
    echo ${SHERPA_INCLUDE_PATH:-@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@/SHERPA-MC};;
  --libdir)
    echo ${SHERPA_LIBRARY_PATH:-@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/SHERPA-MC};;
  --datadir)
    echo ${SHERPA_SHARE_PATH:-@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_DATADIR@/SHERPA-MC};;
  --ldflags)
    echo -L${SHERPA_LIBRARY_PATH:-@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/SHERPA-MC} -lSherpaMain @CONDITIONAL_HEPMC2LIBS@ @CONDITIONAL_HEPMC3LIBS@ @RIVET_CONFIG_LIBS_STRING@ @ROOT_CONFIG_LIBS_STRING@ -L@LHAPDF_LIBRARY_DIR@ -lLHAPDF;;
  --cppflags)
    echo -I${SHERPA_INCLUDE_PATH:-@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@/SHERPA-MC} @CONDITIONAL_HEPMC2INCS@ @CONDITIONAL_HEPMC3INCS@ @RIVET_CONFIG_CPPFLAGS_STRING@ @ROOT_CONFIG_CPPFLAGS_STRING@ @LHAPDF_CONFIG_CPPFLAGS_STRING@;;
  --cxx)
    echo @CXX@;;
  --fc)
    echo @FC@;;
  *)
    echo "Sherpa-config: configuration tool for the Monte Carlo";
    echo "               event generator Sherpa: http://sherpa.hepforge.org";
    echo "Options:";
    echo "  Sherpa-config --version     : returns Sherpa version";
    echo "  Sherpa-config --prefix      : returns the installation path";
    echo "  Sherpa-config --incdir      : returns the path of Sherpa headers";
    echo "  Sherpa-config --libs        : returns the linker line to link with Sherpa";
    echo "  Sherpa-config --datadir     : returns the path of Sherpa data (like Decaydata, PDFs)";
    echo "  Sherpa-config --ldflags     : returns the LDFLAGS used for Sherpa";
    echo "  Sherpa-config --cppflags    : returns the preprocessor FLAGS needed for Sherpa headers";
    echo "  Sherpa-config --cxx         : returns the C++ compiler used";
    echo "  Sherpa-config --fc          : returns the FORTRAN compiler used";
    echo "  Sherpa-config --python-libs : returns the installation path of python libraries";;
esac
