php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #67219
Patch sphinx_67219.diff revision 2014-05-06 15:54 UTC by tony2001@php.net
Patch sph-rank-const-fix revision 2014-05-06 15:20 UTC by saprykin dot dmitry at gmail dot com

Patch sph-rank-const-fix for sphinx Bug #67219

Patch version 2014-05-06 15:20 UTC

Return to Bug #67219 | Download this patch
Patch Revisions:

Developer: saprykin.dmitry@gmail.com

--- config.m4	2014-05-06 19:14:17.807423497 +0400
+++ config.m4.patched	2014-05-06 19:13:58.443422904 +0400
@@ -1,16 +1,17 @@
 dnl $Id$
 
 AC_DEFUN([SPHINX_CHECK_ENUM], [
-  AC_MSG_CHECKING(for $1 in sphinxclient.h)
-  AC_EGREP_HEADER($1,
-    [sphinxclient.h],
-	AC_DEFINE([HAVE_]$1, [], [Define if $1 is available])
-	AC_MSG_RESULT([found]),
-	AC_MSG_RESULT([not found])
-  )
+  AC_MSG_CHECKING([for $1 in sphinxclient.h])  
+  AC_TRY_COMPILE([#include <sphinxclient.h>], [int i = $1],
+    [check_sphinx_const_]$1=yes, [check_sphinx_const_]$1=no)
+  if test [check_sphinx_const_]$1 = yes; then
+    AC_DEFINE([HAVE_]$1, [], [Define if $1 is available])
+    AC_MSG_RESULT([found])
+  else
+    AC_MSG_RESULT([not found])
+  fi
 ])
 

 PHP_ARG_WITH(sphinx, for sphinx support,
 [  --with-sphinx             Include sphinx support])
 
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Jan 25 12:03:34 2022 UTC