Updates to release version 4

r4 on libgswteos is tested on linux, there was a missing -lm flag for
compiling the check functions.