#!/bin/bash
##*************************************************************************##
##  CUBE        http://www.scalasca.org/                                   ##
##*************************************************************************##
##  Copyright (c) 1998-2018                                                ##
##  Forschungszentrum Juelich GmbH, Juelich Supercomputing Centre          ##
##                                                                         ##
##  Copyright (c) 2009-2015                                                ##
##  German Research School for Simulation Sciences GmbH,                   ##
##  Laboratory for Parallel Programming                                    ##
##                                                                         ##
##  This software may be modified and distributed under the terms of       ##
##  a BSD-style license.  See the COPYING file in the package base         ##
##  directory for details.                                                 ##
##*************************************************************************##


CUBE_EXTENSION="cubex"


prefix="/usr"
datadir="${prefix}/share"
exec_prefix="/usr"

. /usr/bin/jcuber-config-frontend


VERSION="4.4.1"
REVISION="18158"
CODENAME=""

NAME="jcuber"

PATCH=



print_summary ()
{
cat $datadir/$NAME/cube.summary
}

run_cases()
{
    case "$1" in
    --config-summary)
        print_summary
        ;;
     --interface-version)
        echo -n "$LIBRARY_INTERFACE_VERSION"
        ;;

    --name)
#undocumented option, used in configurations scripts to check presence of previous cube installations
        echo -n "CUBE" 
        ;;
    --version)
        echo -n "$NAME $VERSION $CODENAME (rev. $REVISION) " 
        ;;
    --cube-extension)
        echo -n "$CUBE_EXTENSION"
        ;;
    --classpath)
        echo -n "$JCUBER_JAR:$XERCES_JAR"
        ;;
    "" | --help)
	echo "cube-config  COMMAND [OPTION] ..."
	echo "Commands:"
	echo "      --config-summary          : Shows the configure summary of the CUBE package"	
	echo "      --version                 : Returns the version of CUBE"
	echo "      --cube-extension          : Returns the extension for the CUBE report (or its anchor file)"
	echo "      --classpath               : Returns the path to the CubeReader.jar to be used in java application"
	;;
   esac
}


run_cases $@



