#!/usr/bin/env sh

if [ "$1" = "-libnames" ]; then
    echo libdynd.dylib\;libdyndt.dylib
    exit 0
fi

if [ "$1" = "-libdir" ]; then
    # This script should be in .../bin relative to .../lib.
    # Note this isn't robust against symbolic links, etc.
    DIR=`dirname $0`
    echo `dirname ${DIR}`/lib
    exit 0
fi

if [ "$1" = "-includedir" ]; then
    # This script should be in .../bin relative to .../include.
    # Note this isn't robust against symbolic links, etc.
    DIR=`dirname $0`
    echo `dirname ${DIR}`/include
    exit 0
fi

if [ "$1" = "-rootdir" ]; then
    # This script should be in .../bin relative to .../include.
    # Note this isn't robust against symbolic links, etc.
    DIR=`dirname $0`
    echo `dirname ${DIR}`
    exit 0
fi

if [ "$1" = "-version" ]; then
    echo v0.7.2
    exit 0
fi

echo Usage: $0 OPTION
echo Print information for linking libdynd.
echo
echo Options:
echo   -libnames    Prints a semicolon separated list of the library names.
echo   -libdir      Prints the full path of the directory containing the libraries.
echo   -includedir  Prints the directory with the libdynd include files.
echo   -version     Prints the version of libdynd.
exit 1
