cvs: php4 / NEWS acinclude.m4 /ext/standard config.m4 reg.c
| From: | Jani Taskinen | Date: | Mon, 08 Apr 2002 18:43:35 +0000 |
| Subject: | cvs: php4 / NEWS acinclude.m4 /ext/standard config.m4 reg.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-10976@lists.php.net to get a copy of this message | ||
sniper Mon Apr 8 14:43:35 2002 EDT
Modified files:
/php4 NEWS acinclude.m4
/php4/ext/standard config.m4 reg.c
Log:
- Revert that change. Added a warning about this.
Index: php4/NEWS
diff -u php4/NEWS:1.933 php4/NEWS:1.934
--- php4/NEWS:1.933 Mon Apr 8 03:47:50 2002
+++ php4/NEWS Mon Apr 8 14:43:33 2002
@@ -1,7 +1,6 @@
PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2002, Version 4.3.0
-- Made PHP always use the bundled regex functions. (Jani)
- Added "ignore_repeated_errors" and "ignore_repeated_source" php.ini options
which can be used to disable logging of repeated error messages. (Marcus)
- Made pg_last_notice() work correctly. (Yasuo)
Index: php4/acinclude.m4
diff -u php4/acinclude.m4:1.181 php4/acinclude.m4:1.182
--- php4/acinclude.m4:1.181 Mon Apr 8 03:47:13 2002
+++ php4/acinclude.m4 Mon Apr 8 14:43:34 2002
@@ -1,4 +1,4 @@
-dnl $Id: acinclude.m4,v 1.181 2002/04/08 07:47:13 sniper Exp $
+dnl $Id: acinclude.m4,v 1.182 2002/04/08 18:43:34 sniper Exp $
dnl
dnl This file contains local autoconf functions.
@@ -1025,9 +1025,17 @@
])
AC_DEFUN(PHP_REGEX,[
+
+if test "$REGEX_TYPE" = "php"; then
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,[ ])
+fi
+
+AC_MSG_CHECKING([which regex library to use])
+AC_MSG_RESULT([$REGEX_TYPE])
])
dnl
Index: php4/ext/standard/config.m4
diff -u php4/ext/standard/config.m4:1.36 php4/ext/standard/config.m4:1.37
--- php4/ext/standard/config.m4:1.36 Mon Apr 8 03:47:17 2002
+++ php4/ext/standard/config.m4 Mon Apr 8 14:43:35 2002
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.36 2002/04/08 07:47:17 sniper Exp $ -*- sh -*-
+dnl $Id: config.m4,v 1.37 2002/04/08 18:43:35 sniper Exp $ -*- sh -*-
divert(3)dnl
@@ -198,6 +198,33 @@
divert(5)dnl
+AC_ARG_WITH(regex,
+[ --with-regex=TYPE regex library type: system, apache, php. Default: php
+ WARNING: Do NOT use unless you know what you are doing!],
+[
+ case $withval in
+ system)
+ if test "$PHP_SAPI" = "apache" || test "$PHP_SAPI" =
"apache2filter"; then
+ REGEX_TYPE=php
+ else
+ REGEX_TYPE=system
+ fi
+ ;;
+ apache)
+ REGEX_TYPE=apache
+ ;;
+ php)
+ REGEX_TYPE=php
+ ;;
+ *)
+ REGEX_TYPE=php
+ AC_MSG_WARN(Invalid regex library type. Using default value: php)
+ ;;
+ esac
+],[
+ REGEX_TYPE=php
+])
+
AC_CHECK_FUNCS(fnmatch glob)
if test "$PHP_SAPI" = "cgi"; then
Index: php4/ext/standard/reg.c
diff -u php4/ext/standard/reg.c:1.60 php4/ext/standard/reg.c:1.61
--- php4/ext/standard/reg.c:1.60 Mon Apr 8 03:47:17 2002
+++ php4/ext/standard/reg.c Mon Apr 8 14:43:35 2002
@@ -17,7 +17,7 @@
| Jaakko Hyvätti <jaakko@hyvatti.iki.fi> |
+----------------------------------------------------------------------+
*/
-/* $Id: reg.c,v 1.60 2002/04/08 07:47:17 sniper Exp $ */
+/* $Id: reg.c,v 1.61 2002/04/08 18:43:35 sniper Exp $ */
#include <stdio.h>
#include "php.h"
@@ -98,7 +98,11 @@
PHP_MINFO_FUNCTION(regex)
{
+#if HSREGEX
php_info_print_table_row(2, "Regex Library", "Bundled library enabled");
+#else
+ php_info_print_table_row(2, "Regex Library", "System library enabled");
+#endif
}