autotools: tests: disable test_fork if fork() is not available

fork() support is optional and its availability is correctly detected at
contfigure time.

But test_fork was all always built, preventing build for targets that do
not provide fork() from building successfully.

This pacth fixes the autotools on this point.
cmake: tests: disable test_fork if fork() is not available

fork() support is optional and its availability is correctly detected at
contfigure time.

But test_fork was all always built, preventing build for targets that do
not provide fork() from building successfully.

This pacth fixes the CMakeLists.txt on this point.
cmake: fix indentation
Merge pull request #1007 from tSed/sma/fork-fix

Build-system: disable test_fork when fork() is not available