[cmake] Run src/ tests (#675)

diff --git a/src/check-static-inits.sh b/src/check-static-inits.sh
index 1446fa7..aa1b129 100755
--- a/src/check-static-inits.sh
+++ b/src/check-static-inits.sh
@@ -4,6 +4,7 @@
 export LC_ALL
 
 test -z "$srcdir" && srcdir=.
+test -z "$libs" && libs=.
 stat=0
 
 
@@ -14,7 +15,7 @@
 	exit 77
 fi
 
-OBJS=.libs/*.o
+OBJS=$libs/*.o
 if test "x`echo $OBJS`" = "x$OBJS" 2>/dev/null >/dev/null; then
 	echo "check-static-inits.sh: object files not found; skipping test"
 	exit 77