#!/bin/sh
#
# CAS Configurator
#
PREFIX=/usr/local
CXXFLAGS="-O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing  -DLIBICONV_PLUG"
MAKE=/usr/local/bin/ninja
CC=/usr/bin/cc
CXX=/usr/bin/c++
INCLUDE="/usr/local/include/cas"
LIBS="/usr/local/lib"
VERSION="3.8.0"
SHAREDIR="/usr/local/share/cas"
LIBEXEC_DIR="libexec/cas"

if test "x$1" = "x"; then
  echo "Usage:"
  echo "  cas-config [--flags] [--cc] [--cxx] [--make] [--libs] [--includes] [--sharedir] [--libexecdir] [--version]"
  echo "                  ... [see below for complete flag list]"
  echo ""
  echo "    --version         displays the CAS version number"
  echo "    --flags           displays C++ compiler flags"
  echo "    --cc              displays executable name of C compiler"
  echo "    --cxx             displays executable name of C++ compiler"
  echo "    --make            displays executable name of make"
  echo "    --libs            displays list of libraries"
  echo "    --includes        displays list of include dirs"
  echo "    --sharedir        displays directory with shared files, examples, etc"
  echo "    --libexecdir      displays directory with loadable modules"
  echo ""
else
   while test "x$done" = "x" -a "x$1" != "x"; do
       case $1 in
           --version*)
           echo ${VERSION}
           ;;

           --flags*)
           echo ${CXXFLAGS}
           ;;

           --cc*)
           echo ${CC}
           ;;

           --cxx*)
           echo ${CXX}
           ;;

           --make*)
           echo ${MAKE}
           ;;

           --libs*)
           echo ${LIBS}
           ;;

           --includes*)
           echo ${INCLUDE}
           ;;

           --sharedir*)
           echo ${SHAREDIR}
           ;;

           --libexecdir*)
           echo ${LIBEXEC_DIR}
           ;;
       esac
       shift
   done
fi
