#!/bin/sh

LIBPATH=/opt/picoquant/mhlib/libmhlib.so
echo checking $LIBPATH

if ! test -f $LIBPATH
then 
    echo "failed: $LIBPATH does not exist!" 
    exit 1
fi


if ! command -v strings 2>&1 >/dev/null
then 
    echo "error: the strings command was not found"
    echo "try this:  sudo apt-get install binutils" 
    exit 1
fi

VERSTR=`strings $LIBPATH | grep "MHLIB VERSION"`

if [ -z "$VERSTR" ]
then
    echo "failed: library version info not found!"
    exit 1
else
    echo found  $VERSTR
fi


echo checking ldconfig for $LIBPATH

LDCONFSTR=`ldconfig -p | grep $LIBPATH`

if [ -z "$LDCONFSTR" ]
then
    echo "failed: $LIBPATH not found in ldconfig!"
    exit 1
else
    echo did find:  $LDCONFSTR
fi


