Welcome to little lamb

Code » comain » master » tree

[master] / meta / deps.tpl / skalibs / is_found

#!/bin/sh
isint=$1
type=$2
dir=$3
in=

case "$type" in
    shared)
        file=libskarnet.so
        ;;
    static)
        file=libskarnet.a
        ;;
    include)
        test $isint -eq 1 && in=src/include
        file=skalibs/skalibs.h
        ;;
    *)
        exit 1
        ;;
esac

if test -e "$dir/$in/$file"; then
    echo $in
    exit 0
fi

if test "$type" = "static" && test -e "$dir/skalibs/$file"; then
    echo skalibs
    exit 0
fi

exit 1