Skip to content

Commit 3c56289

Browse files
remicolletmichael-grunder
authored andcommitted
check for hash extension during the build
1 parent a5783b2 commit 3c56289

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

config.m4

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,28 @@ if test "$PHP_REDIS" != "no"; then
4141
AC_DEFINE(PHP_SESSION,1,[redis sessions])
4242
fi
4343

44+
AC_MSG_CHECKING([for hash includes])
45+
hash_inc_path=""
46+
if test -f "$abs_srcdir/include/php/ext/hash/php_hash.h"; then
47+
hash_inc_path="$abs_srcdir/include/php"
48+
elif test -f "$abs_srcdir/ext/hash/php_hash.h"; then
49+
hash_inc_path="$abs_srcdir"
50+
elif test -f "$phpincludedir/ext/hash/php_hash.h"; then
51+
hash_inc_path="$phpincludedir"
52+
else
53+
for i in php php7; do
54+
if test -f "$prefix/include/$i/ext/hash/php_hash.h"; then
55+
hash_inc_path="$prefix/include/$i"
56+
fi
57+
done
58+
fi
59+
60+
if test "$hash_inc_path" = ""; then
61+
AC_MSG_ERROR([Cannot find php_hash.h])
62+
else
63+
AC_MSG_RESULT([$hash_inc_path])
64+
fi
65+
4466
if test "$PHP_REDIS_JSON" != "no"; then
4567
AC_MSG_CHECKING([for json includes])
4668
json_inc_path=""

0 commit comments

Comments
 (0)