build: make 'check' target depend on 'test' target

We also add a 'test' target when --enable-tests flag has *not* been
used, so the user knows the reason of the failure.

The target 'check' is run by the target 'distcheck' (the one we use
to generate the tarball, when doing a release) so it is important
that we don't miss the tests.