make/chklib.sh

changeset 197
9cbd4f09a22f
equal deleted inserted replaced
196:168a38ae1b2d 197:9cbd4f09a22f
1 #!/bin/sh
2
3 libname="$1"
4 cc="$CC"
5 if test -z "$cc"; then cc=cc; fi
6 if test -z "$libname"; then exit 1; fi
7
8 echo 'int main(){return 0;}' > .chklib-test.c
9
10 if $cc -o /dev/null .chklib-test.c "-l$libname" ; then
11 rm .chklib-test.c
12 exit 0
13 else
14 rm .chklib-test.c
15 exit 1
16 fi

mercurial