#!/bin/sh
prefix=/usr/local
cflags="-I/usr/local/include -g -O2 -Wall -Wuninitialized -DINCLUDE_FTPLIB -DOS_LINUX -fPIC -Wno-unused-function -DHAVE_ODBC -DHAVE_ZLIB"
st_libs="-lutil -lpthread -lodbc -lz /usr/local/lib/libmidas.a"
dyn_libs="-lutil -lpthread -lodbc -lz -L/usr/local/lib -lmidas"
incdir=/usr/local/include
libdir=/usr/local/lib
svnver=r4621
platform=linux
drvdir=/usr/local/share/drivers
camacdir=/usr/local/share/drivers/camac
vmedir=/usr/local/share/drivers/vme
srcdir=/usr/local/share/src
exampledir=/usr/local/share/examples
out=""
while test $# -gt 0; do
case "$1" in
-*=*) optarg=/usr/local ;;
*) optarg= ;;
esac
case $1 in
--prefix)
out="$out ${prefix}"
;;
--cflags|-c)
out="$out ${cflags}"
;;
--incdir|-dI)
out="$out ${incdir}"
;;
--libdir|-dL)
out="$out ${libdir}"
;;
--libs|--static-libs|-l)
out="$out ${st_libs}"
;;
--dyn-libs)
out="$out ${dyn_libs}"
;;
--platform)
out="$out ${platform}"
;;
--drvdir|-dD)
out="$out ${drvdir}"
;;
--camacdir|-dC)
out="$out ${camacdir}"
;;
--vmedir|-dV)
out="$out ${vmedir}"
;;
--srcdir|-dS)
out="$out ${srcdir}"
;;
--exampledir|-dE)
out="$out ${exampledir}"
;;
--version|-v)
out="$out ${svnver}"
;;
--help|-h)
echo "Usage: midas-config [options]"
echo "Options:"
echo " --prefix Display the installation prefix"
echo " --cflags,-c Display C/C++ flags using for compilation"
echo " --incdir,-dI Display midas header directory installed"
echo " --libdir,-dL Display midas library directory installed"
echo " --libs, -l"
echo " --static-libs Display link flags while linking with static midas library"
echo " --dyn-libs Display link flags while linking with dynamic library"
echo " --platform Display installed platform"
echo " --drvdir,-dD Display the driver directory"
echo " --camacdir,-dC Display the directory including CAMAC APIs"
echo " --vmedir,-dV Display the directory including VME APIs"
echo " --srcdir,-dS Display the source directory"
echo " --exampledir,-dE Display the examples directory"
echo " --version, -v Show the subversion number"
echo " --help, -h Display this usage"
echo
exit 0
;;
*)
### Give an error
echo "Unknown argument \"/usr/local\"!" 1>&2
echo "${usage}" 1>&2
exit 1
;;
esac
shift
done
echo $out
|