raven-rhel6/isp-php81/memcache-build-fix.patch
2024-02-21 20:14:44 +06:00

39 lines
1.2 KiB
Diff

diff -Naur a/ext/memcache/config9.m4 b/ext/memcache/config9.m4
--- a/ext/memcache/config9.m4 2023-04-30 17:27:52.000000000 +0600
+++ b/ext/memcache/config9.m4 2024-01-23 10:08:35.200466340 +0600
@@ -64,24 +64,19 @@
fi
AC_MSG_CHECKING(PHP version)
- if test -d $abs_srcdir/src ; then
- dnl # only when for PECL, not for PHP
- export OLD_CPPFLAGS="$CPPFLAGS"
- export CPPFLAGS="$CPPFLAGS $INCLUDES"
- AC_TRY_COMPILE([#include <php_version.h>], [
+ export OLD_CPPFLAGS="$CPPFLAGS"
+ export CPPFLAGS="$CPPFLAGS $INCLUDES -I$srcdir/main"
+ AC_TRY_COMPILE([#include <php_version.h>], [
#if PHP_MAJOR_VERSION < 7
#error "PHP < 7"
#endif
- ], [
- subdir=src
- AC_MSG_RESULT([PHP 7.x])
- ],
- AC_MSG_ERROR([PHP 7.x required for pecl-php-memcache ver 4+. Use pecl-php-memcache ver 3.x for PHP 5.x.])
- )
- export CPPFLAGS="$OLD_CPPFLAGS"
- else
- AC_MSG_ERROR([unknown])
- fi
+ ], [
+ subdir=src
+ AC_MSG_RESULT([PHP 7.x])
+ ],
+ AC_MSG_ERROR([PHP 7.x required for pecl-php-memcache ver 4+. Use pecl-php-memcache ver 3.x for PHP 5.x.])
+ )
+ export CPPFLAGS="$OLD_CPPFLAGS"
if test "$PHP_MEMCACHE_SESSION" != "no"; then
AC_MSG_CHECKING([for session includes])