-#if HTTP_HAVE_EXT(HASH)
-# if defined(HTTP_HAVE_EXT_HASH)
-# include "php_hash.h"
-# elif defined(HTTP_HAVE_HASH_EXT_HASH)
-# define HTTP_HAVE_EXT_HASH
-# include "hash/php_hash.h"
-# elif defined(HTTP_HAVE_EXT_HASH_EXT_HASH)
-# define HTTP_HAVE_EXT_HASH
-# include "ext/hash/php_hash.h"
-# endif
+
+#if defined(HTTP_HAVE_PHP_HASH_H) && HTTP_HAVE_EXT(HASH)
+# define HTTP_HAVE_EXT_HASH 1
+# include "php_hash.h"
+#else
+# define HTTP_HAVE_EXT_HASH 0