sniper          Wed Jul 13 10:33:40 2005 EDT

  Modified files:              
    /php-src    acinclude.m4 
  Log:
  - Added check whether re_magic exists in struct regex_t
  # per Andrei's request
  
  
http://cvs.php.net/diff.php/php-src/acinclude.m4?r1=1.327&r2=1.328&ty=u
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.327 php-src/acinclude.m4:1.328
--- php-src/acinclude.m4:1.327  Thu Jul  7 19:18:21 2005
+++ php-src/acinclude.m4        Wed Jul 13 10:33:38 2005
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: acinclude.m4,v 1.327 2005/07/07 23:18:21 sniper Exp $
+dnl $Id: acinclude.m4,v 1.328 2005/07/13 14:33:38 sniper Exp $
 dnl
 dnl This file contains local autoconf functions.
 dnl
@@ -2471,13 +2471,21 @@
 dnl
 AC_DEFUN([PHP_REGEX],[
   if test "$REGEX_TYPE" = "php"; then
+    AC_DEFINE(HAVE_REGEX_T_RE_MAGIC, 1, [ ])
     AC_DEFINE(HSREGEX,1,[ ])
     AC_DEFINE(REGEX,1,[ ])
     PHP_ADD_SOURCES(regex, regcomp.c regexec.c regerror.c regfree.c)
   elif test "$REGEX_TYPE" = "system"; then
     AC_DEFINE(REGEX,0,[ ])
+    dnl Check if field re_magic exists in struct regex_t
+    AC_CACHE_CHECK([whether field re_magic exists in struct regex_t], 
ac_cv_regex_t_re_magic, [
+      AC_TRY_COMPILE([#include <regex.h>], [struct regex_t rt; rt.re_magic;],
+      [ac_cv_regex_t_re_magic=yes], [ac_cv_regex_t_re_magic=no])
+    ])
+    if test "$ac_cv_regex_re_magic" = "yes"; then
+      AC_DEFINE([HAVE_REGEX_RE_MAGIC], [ ], 1)
+    fi 
   fi
-
   AC_MSG_CHECKING([which regex library to use])
   AC_MSG_RESULT([$REGEX_TYPE])
 ])

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to