These tests check for both the declared symbol in php_config.h and presence of the required header file.
Though it is very unlikely that the header won't be there, this will make sure that the compilation won't be aborted if the header is not found.