configure.ac: Porting changes for AIX 7.1.
configure.ac: Porting changes for AIX 7.1.

On at least one instance of AIX 7.1, we need to build without -g
to avoid getting "The symbol refers to a csect with symbol number 0,
which was not found. The new symbol cannot be associated with a
csect and is being ignored." from the linker.

Also, wait4(2) and __thread are broken on AIX 7.1 like they are on
AIX 5.1, so expand the tests for those to cover all versions of AIX.

Signed-off-by: Lennert Buytenhek <8858498612e3a522354216649776e3032dcb7e5b@wantstofly.org>

buytenh/ivykis,buytenh/ivykis