Skip to content

Commit

Permalink
check for hash extension during the build
Browse files Browse the repository at this point in the history
  • Loading branch information
remicollet authored and michael-grunder committed Jul 1, 2020
1 parent a5783b2 commit 3c56289
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,28 @@ if test "$PHP_REDIS" != "no"; then
AC_DEFINE(PHP_SESSION,1,[redis sessions])
fi

AC_MSG_CHECKING([for hash includes])
hash_inc_path=""
if test -f "$abs_srcdir/include/php/ext/hash/php_hash.h"; then
hash_inc_path="$abs_srcdir/include/php"
elif test -f "$abs_srcdir/ext/hash/php_hash.h"; then
hash_inc_path="$abs_srcdir"
elif test -f "$phpincludedir/ext/hash/php_hash.h"; then
hash_inc_path="$phpincludedir"
else
for i in php php7; do
if test -f "$prefix/include/$i/ext/hash/php_hash.h"; then
hash_inc_path="$prefix/include/$i"
fi
done
fi

if test "$hash_inc_path" = ""; then
AC_MSG_ERROR([Cannot find php_hash.h])
else
AC_MSG_RESULT([$hash_inc_path])
fi

if test "$PHP_REDIS_JSON" != "no"; then
AC_MSG_CHECKING([for json includes])
json_inc_path=""
Expand Down

0 comments on commit 3c56289

Please sign in to comment.